libsaria: Remove other playlist types
They were nice for queue vs set, but I'd rather just reintroduce the random button. Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
64b5b78a42
commit
a730eaa2cc
|
@ -20,7 +20,6 @@ enum PlaylistFlags {
|
|||
enum PlaylistType {
|
||||
PLIST_SET,
|
||||
PLIST_QUEUE,
|
||||
PLIST_LIST,
|
||||
};
|
||||
|
||||
namespace libsaria
|
||||
|
@ -96,30 +95,6 @@ namespace libsaria
|
|||
};
|
||||
|
||||
|
||||
class Set : public Playlist {
|
||||
public:
|
||||
Set(unsigned int);
|
||||
Set(string, unsigned int);
|
||||
~Set();
|
||||
};
|
||||
|
||||
|
||||
class Queue : public Playlist {
|
||||
public:
|
||||
Queue(unsigned int);
|
||||
Queue(string, unsigned int);
|
||||
~Queue();
|
||||
};
|
||||
|
||||
|
||||
class Stack : public Playlist {
|
||||
public:
|
||||
Stack(unsigned int);
|
||||
Stack(string, unsigned int);
|
||||
~Stack();
|
||||
};
|
||||
|
||||
|
||||
struct PlaylistNotification {
|
||||
Playlist *plist;
|
||||
Track *track;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <library.h>
|
||||
#include <ban.h>
|
||||
|
||||
static libsaria::Set banned_plist("Banned", PL_STATIC | PL_NO_DRAIN);
|
||||
static libsaria::Playlist banned_plist("Banned", PL_STATIC | PL_NO_DRAIN, PLIST_SET);
|
||||
|
||||
namespace libsaria
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace std;
|
|||
|
||||
static unsigned int next_id = 0;
|
||||
static list<struct libsaria::library::Path> path_list;
|
||||
libsaria::Set lib_playlist("Library", PL_STATIC | PL_NO_DRAIN);
|
||||
libsaria::Playlist lib_playlist("Library", PL_STATIC | PL_NO_DRAIN, PLIST_SET);
|
||||
|
||||
libsaria::library::Path *push_path(libsaria::library::Path &path)
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <playlist.h>
|
||||
#include <library.h>
|
||||
|
||||
extern libsaria::Set lib_playlist;
|
||||
extern libsaria::Playlist lib_playlist;
|
||||
|
||||
void do_update_path(struct libsaria::library::Path *);
|
||||
libsaria::library::Path *push_path(libsaria::library::Path &);
|
||||
|
|
|
@ -15,7 +15,7 @@ static AutoPauseType pause_type;
|
|||
static unsigned short pause_count = 0;
|
||||
|
||||
static list<libsaria::Playlist *> playlist_deck;
|
||||
static libsaria::Stack recent_plist("Recent", PL_STATIC | PL_NO_DRAIN);
|
||||
static libsaria::Playlist recent_plist("Recent", PL_STATIC | PL_NO_DRAIN, PLIST_QUEUE);
|
||||
|
||||
static void renumber_playlists()
|
||||
{
|
||||
|
@ -110,17 +110,7 @@ namespace libsaria
|
|||
|
||||
if (playlist_deck.size() == MAX_PLAYLISTS)
|
||||
return NULL;
|
||||
|
||||
switch (type) {
|
||||
case PLIST_SET:
|
||||
plist = new Set(PL_NONE);
|
||||
break;
|
||||
case PLIST_QUEUE:
|
||||
plist = new Queue(PL_NONE);
|
||||
break;
|
||||
default:
|
||||
plist = new Stack(PL_NONE);
|
||||
};
|
||||
plist = new Playlist("Playlist", PL_NONE, type);
|
||||
|
||||
if (front)
|
||||
deck::push_front(plist);
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright (c) 2012 Bryan Schumaker.
|
||||
#include <playlist.h>
|
||||
|
||||
namespace libsaria
|
||||
{
|
||||
|
||||
Queue::Queue(unsigned int flags) : Playlist("Queue", flags, PLIST_QUEUE)
|
||||
{
|
||||
}
|
||||
|
||||
Queue::Queue(string name, unsigned int flags) : Playlist(name, flags, PLIST_QUEUE)
|
||||
{
|
||||
}
|
||||
|
||||
Queue::~Queue()
|
||||
{
|
||||
}
|
||||
|
||||
}; /* Namespace: libsaria */
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright (c) 2012 Bryan Schumaker.
|
||||
#include <playlist.h>
|
||||
|
||||
namespace libsaria
|
||||
{
|
||||
|
||||
Set::Set(unsigned int flags) : Playlist("Set", flags, PLIST_SET)
|
||||
{
|
||||
}
|
||||
|
||||
Set::Set(string name, unsigned int flags) : Playlist(name, flags, PLIST_SET)
|
||||
{
|
||||
}
|
||||
|
||||
Set::~Set()
|
||||
{
|
||||
}
|
||||
|
||||
}; /* Namespace: libsaria */
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright (c) 2012 Bryan Schumaker.
|
||||
#include <playlist.h>
|
||||
|
||||
namespace libsaria
|
||||
{
|
||||
|
||||
Stack::Stack(unsigned int flags) : Playlist("List", flags, PLIST_LIST)
|
||||
{
|
||||
}
|
||||
|
||||
Stack::Stack(string name, unsigned int flags) : Playlist(name, flags, PLIST_LIST)
|
||||
{
|
||||
}
|
||||
|
||||
Stack::~Stack()
|
||||
{
|
||||
}
|
||||
|
||||
}; /* Namespace: libsaria */
|
Loading…
Reference in New Issue