libsaria: Turn recent playlist into a MRU list

Basically, don't list duplicates.  If a song on the list is added again,
instead I move it to the top of the list.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
Bryan Schumaker 2012-09-14 13:31:59 -04:00
parent fc7a27c99f
commit a8f18478fa
1 changed files with 2 additions and 3 deletions

View File

@ -173,9 +173,8 @@ namespace libsaria
void deck::list_recent(Track *track)
{
list<libsaria::Track *> tracks;
tracks.push_back(track);
recent_plist.add_tracks(tracks);
recent_plist.remove_track(track);
recent_plist.add_track(track);
recent_plist.reset_iterator();
}