-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
SearchQuery: Add ability to filter tracks in Mixxx library by iTunes playlist #11955
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small comments, full review to come some other time
8989453
to
d6c8dee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this review was pending from ages ago but I forgot to finish it. Better comment late and unfinished than never.
QStringLiteral("INSERT INTO %1 (id, artist, title, album, " | ||
"album_artist, genre, grouping, year, duration, " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this compile time instead then?
QStringLiteral("INSERT INTO %1 (id, artist, title, album, " | |
"album_artist, genre, grouping, year, duration, " | |
QStringLiteral("INSERT INTO " ITUNES_LIBRARY_TABLE " (id, artist, title, album, " | |
"album_artist, genre, grouping, year, duration, " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would've worked with the macro solution, but unfortunately not with constexpr statics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, the comment was from before we agreed to change it. I mean, if we didn't use QString it would've worked but we don't so yeah...
This PR is marked as stale because it has been open 90 days with no activity. |
Co-authored-by: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com>
fb62e41
to
612cc9e
Compare
This adds a new filter node to the search query machinery, namely
ExternalPlaylistFilterNode
that matches the name of an external playlist, along with a 'reference implementation'ITunesFilterNode
that uses the iTunes tables (though the mechanism is explicitly intended to be generic, so support for Serato, Traktor etc. could easily be added in the future).Thus, if the user has an iTunes playlist named "House", queries like
itunes:house
oritunes:house daft punk
will now explicitly search for tracks in that playlist in a similar way to thecrate
operator.External tracks are matched with library tracks via their location (since external libraries generally use a different track indexing scheme). Consequentially, this only affects the case where the external tracks are in the user's Mixxx library too (not necessarily the case, but probably common enough to make this a worthwhile use case).
To do
ITunesFilterNode
(if not, we might want to consider gating this behind the explicititunes
operator)itunes:
operator for now to avoid any potential performance regressions in regular searches, but leave this open for revisiting it in the future (See 1a2fca1)Future Directions
ExternalPlaylistFilterNode
and adding the corresponding operator toSearchQueryParser
)ITunesDAO::uniquifyPlaylistName
, we might want to store the non-unique playlist name in a separate column, that would require a schema change though and also require us to abstract over the playlist name column inExternalPlaylistFilterNode
since other external playlist integrations may not necessarily have this machinery).