libsaria: Remove refresh() after picking next queued song
Unfortunately, this doesn't hide the queue when empty anymore. I probably won't see this behavior again until I create the stack. Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
e03dfb33b8
commit
8d50e63df2
|
@ -1,5 +1,6 @@
|
|||
// Copyright (c) 2012 Bryan Schumaker.
|
||||
#include <libsaria/playlist.h>
|
||||
#include <libsaria/renderer.h>
|
||||
#include <libsaria/index.h>
|
||||
#include <libsaria/prefs.h>
|
||||
|
||||
|
@ -75,6 +76,7 @@ namespace libsaria
|
|||
|
||||
Track *Playlist::next()
|
||||
{
|
||||
int index;
|
||||
Track *track;
|
||||
|
||||
if (choose_randomly(flags))
|
||||
|
@ -85,7 +87,10 @@ namespace libsaria
|
|||
track = (*cur);
|
||||
|
||||
if (flags & PL_DRAIN) {
|
||||
index = distance(cur, plist.begin());
|
||||
plist.erase(cur);
|
||||
if (renderer)
|
||||
renderer->index_removed(index);
|
||||
cur = plist.end();
|
||||
save();
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@ namespace libsaria
|
|||
string queue::next_file()
|
||||
{
|
||||
Track *track = q_queue.next();
|
||||
refresh();
|
||||
return track->get_filepath();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue