Ticket #4077: queue.patch
File queue.patch, 2.2 KB (added by , 13 years ago) |
---|
-
mythmusic/mythmusic/playbackbox.cpp
628 628 SLOT(byGenre())); 629 629 playlist_popup->addButton(tr("Tracks from current Year"), this, 630 630 SLOT(byYear())); 631 playlist_popup->addButton(tr("Add playing to active play queue"), this, 632 SLOT(addPlayingtoActive())); 633 playlist_popup->addButton(tr("Add selected to active play queue"), this, 634 SLOT(addSelectedtoActive())); 631 635 } 632 636 633 637 playlist_popup->ShowPopup(this, SLOT(closePlaylistPopup())); … … 750 754 updatePlaylistFromQuickPlaylist(whereClause); 751 755 } 752 756 757 void PlaybackBoxMusic::addPlayingtoActive() 758 // adds the currently playing track to the active play queue 759 { 760 if (!playlist_popup || !curMeta) 761 return; 762 763 QString value = formattedFieldValue(curMeta->ID()); 764 QString whereClause = "WHERE song_id = " + value; 765 closePlaylistPopup(); 766 updatePlaylistFromQuickPlaylist(whereClause); 767 } 768 769 void PlaybackBoxMusic::addSelectedtoActive() 770 // adds the currently selected track to the active play queue 771 { 772 if (!playlist_popup || !curMeta) 773 return; 774 775 GenericTree *node = music_tree_list->getCurrentNode(); 776 Metadata *selectedMeta = all_music->getMetadata( node->getInt() ); 777 778 QString value = formattedFieldValue(selectedMeta->ID()); 779 QString whereClause = "WHERE song_id = " + value; 780 closePlaylistPopup(); 781 updatePlaylistFromQuickPlaylist(whereClause); 782 } 783 753 784 void PlaybackBoxMusic::updatePlaylistFromQuickPlaylist(QString whereClause) 754 785 { 755 786 doUpdatePlaylist(whereClause); -
mythmusic/mythmusic/playbackbox.h
89 89 void byAlbum(); 90 90 void byGenre(); 91 91 void byYear(); 92 void addPlayingtoActive(); 93 void addSelectedtoActive(); 92 94 void fromCD(); 93 95 void showSmartPlaylistDialog(); 94 96 void showSearchDialog();