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:
Bryan Schumaker 2012-02-25 14:04:31 -05:00
parent e03dfb33b8
commit 8d50e63df2
2 changed files with 5 additions and 1 deletions

View File

@ -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();
}

View File

@ -32,7 +32,6 @@ namespace libsaria
string queue::next_file()
{
Track *track = q_queue.next();
refresh();
return track->get_filepath();
}