Skip to content

Conversation

@DidierMalenfant
Copy link

As mentioned in #15645, library importers build TreeItems with the name of the playlist as the label and the path to the playlist as data. Therefore createPlaylistModelForPlaylist() should get the data member of the TreeItem and not the label in order for the playlist to be found during import.

Importers build TreeItems with the name of the playlist as the label and the path to the playlist as data. Therefore createPlaylistModelForPlaylist() should get the data member of the TreeItem and not the label in order for the playlist to be found.
Per coding standard
@DidierMalenfant DidierMalenfant changed the title Library: Fixed playlist name incorrectly used as path for importing fix(Library): Fixed playlist name incorrectly used as path for importing Nov 24, 2025
Comment on lines +169 to +171
const auto* pTreeItem = static_cast<TreeItem*>(
m_lastRightClickedIndex.internalPointer());
*pPlaylist = pTreeItem->getLabel();
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const auto* pTreeItem = static_cast<TreeItem*>(
m_lastRightClickedIndex.internalPointer());
*pPlaylist = pTreeItem->getLabel();
const auto* pTreeItem = static_cast<TreeItem*>(
m_lastRightClickedIndex.internalPointer());
VERIFY_OR_DEBUG_ASSERT(pTreeItem) {
return;
}
*pPlaylist = pTreeItem->getLabel();

@DidierMalenfant
Copy link
Author

I need to test this with other importers like rekordbox or Serato because it looks like createPlaylistModelForPlaylist() expects a playlist name for most xxxxFeature implementations apart from Traktor.

If that's the case then this would break those other importers which would now receive a playlist ID or path from TreeItem:data instead of the playlist name from TreeItem:label.

I'll investigate more and report back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants