Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add playlist FileItem classify #25200

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

notspiff
Copy link
Contributor

Description

Move playlist fileitem classifiers to separate file

Motivation and context

Reduce CFileItem interface

How has this been tested?

Builds + I have added tests

What is the effect on users?

None

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • Student submission (PR was done for educational purposes and will be treated as such)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@notspiff notspiff added Type: Improvement non-breaking change which improves existing functionality v22 "P" labels May 12, 2024
@notspiff notspiff added this to the "P" 22.0 Alpha 1 milestone May 12, 2024
@notspiff notspiff requested a review from DaveTBlake as a code owner May 12, 2024 09:18
@notspiff notspiff force-pushed the add_playlist_fileitem_classify branch from 498fc83 to 452f666 Compare May 12, 2024 15:53
@@ -517,7 +517,10 @@ bool CGUIWindowMusicBase::OnContextButton(int itemNumber, CONTEXT_BUTTON button)

case CONTEXT_BUTTON_EDIT_SMART_PLAYLIST:
{
std::string playlist = item->IsSmartPlayList() ? item->GetPath() : m_vecItems->GetPath(); // save path as activatewindow will destroy our items
std::string playlist =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might as well throw in a const.

@@ -940,7 +940,10 @@ bool CGUIWindowVideoBase::OnContextButton(int itemNumber, CONTEXT_BUTTON button)
return true;
case CONTEXT_BUTTON_EDIT_SMART_PLAYLIST:
{
std::string playlist = m_vecItems->Get(itemNumber)->IsSmartPlayList() ? m_vecItems->Get(itemNumber)->GetPath() : m_vecItems->GetPath(); // save path as activatewindow will destroy our items
std::string playlist =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const?

Comment on lines +26 to +27
if (item.HasProperty("library.smartplaylist") &&
item.GetProperty("library.smartplaylist").asBoolean())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

item.GetProperty("library.smartplaylist").asBoolean(false)?

@CrystalP
Copy link
Contributor

I probably didn't noticed in previous PR, the copyright years of the new files seem strange? I don't know the rules though, is that on purpose?
Copyright (C) 2005-2018 Team Kodi for TestPlayListFileItemClassify.cpp, PlayListFileItemClassify.h, PlayListFileItemClassify.cpp

@jenkins4kodi jenkins4kodi added the Rebase needed PR that does not apply/merge cleanly to current base branch label May 29, 2024
@jenkins4kodi
Copy link
Contributor

@notspiff this needs a rebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rebase needed PR that does not apply/merge cleanly to current base branch Type: Improvement non-breaking change which improves existing functionality v22 "P"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants