-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add an option to replace the autoDJ queue with the selected tracks #1163
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9241ba6
Add an option to replace the autoDJ queue with the selected tracks
potocpav 20cd114
When replacing the queue, retain the first track if it is in the deck.
potocpav ff7e7f0
Fix comments
potocpav 8baaa18
Remove `replaceTracksInPlaylist`, rename `clearPlaylist` and move the…
potocpav File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ | |
| #include "library/coverart.h" | ||
| #include "library/dlgtagfetcher.h" | ||
| #include "library/libraryview.h" | ||
| #include "library/trackcollection.h" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is to pull in |
||
| #include "library/trackmodel.h" // Can't forward declare enums | ||
| #include "track/track.h" | ||
| #include "util/duration.h" | ||
|
|
@@ -44,8 +45,9 @@ class WTrackTableView : public WLibraryTableView { | |
| void slotPurge(); | ||
| void onSearchStarting(); | ||
| void onSearchCleared(); | ||
| void slotSendToAutoDJ() override; | ||
| void slotSendToAutoDJBottom() override; | ||
| void slotSendToAutoDJTop() override; | ||
| void slotSendToAutoDJReplace() override; | ||
|
|
||
| private slots: | ||
| void slotRemove(); | ||
|
|
@@ -79,7 +81,8 @@ class WTrackTableView : public WLibraryTableView { | |
| void slotTagFetcherClosed(); | ||
|
|
||
| private: | ||
| void sendToAutoDJ(bool bTop); | ||
|
|
||
| void sendToAutoDJ(PlaylistDAO::AutoDJSendLoc loc); | ||
| void showTrackInfo(QModelIndex index); | ||
| void showDlgTagFetcher(QModelIndex index); | ||
| void createActions(); | ||
|
|
@@ -128,8 +131,9 @@ class WTrackTableView : public WLibraryTableView { | |
| QAction* m_pAddToPreviewDeck; | ||
|
|
||
| // Send to Auto-DJ Action | ||
| QAction *m_pAutoDJAct; | ||
| QAction *m_pAutoDJBottomAct; | ||
| QAction *m_pAutoDJTopAct; | ||
| QAction *m_pAutoDJReplaceAct; | ||
|
|
||
| // Remove from table | ||
| QAction *m_pRemoveAct; | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this enum defined in the right place? Should it be scoped? It leads to e.g.
PlaylistDAO::AutoDJSendLoc::BOTTOM, which seems a little ugly.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.
It's fine with me -- regardless it'll be easy to move later.
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.
Hm, maybe it should eject the loaded, stopped track, remove it from the top of the queue, and load the new first track in the queue.
Uh oh!
There was an error while loading. Please reload this page.
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.
Looks like a more useful variant to me
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.
I would not touch the track, loaded on the deck. This could be an action out of sight.
Removing the top track from Auto DJ will remove the loaded track anyway if the user enables AutoDJ.