libsaria: Add new tracks to library paths during update
Right now the Track added is empty, but I'll fill it in soon enough. Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
a944869093
commit
8f666fe10c
|
@ -2,6 +2,7 @@
|
|||
#define LIBSARIA_LIBRARY_H
|
||||
|
||||
#include <libsaria/fs.h>
|
||||
#include <libsaria/track.h>
|
||||
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
@ -15,6 +16,7 @@ namespace libsaria
|
|||
struct Path {
|
||||
bool visible;
|
||||
string path;
|
||||
list<Track> tracks;
|
||||
};
|
||||
|
||||
class Driver {
|
||||
|
|
|
@ -31,6 +31,8 @@ namespace libsaria
|
|||
void do_bookkeeping();*/
|
||||
|
||||
public:
|
||||
Track(string);
|
||||
~Track();
|
||||
/* Track();
|
||||
Track(string, sid_t);
|
||||
Track(InFile &);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <libsaria/audio.h>
|
||||
#include <libsaria/path.h>
|
||||
|
||||
static libsaria::Track tmp_track;
|
||||
//static libsaria::Track tmp_track;
|
||||
|
||||
namespace libsaria
|
||||
{
|
||||
|
@ -25,7 +25,8 @@ namespace libsaria
|
|||
|
||||
// tmp_track = libsaria::Track(file, songid);
|
||||
// tmp_track.do_cleanup();
|
||||
return &tmp_track;
|
||||
// return &tmp_track;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// Copyright (c) 2012 Bryan Schumaker.
|
||||
#include <libsaria/library.h>
|
||||
#include <libsaria/track.h>
|
||||
#include <libsaria/print.h>
|
||||
#include <libsaria/idle.h>
|
||||
|
||||
|
@ -50,6 +51,10 @@ ScanTask::~ScanTask()
|
|||
|
||||
void ScanTask::run_task()
|
||||
{
|
||||
list<string>::iterator it;
|
||||
for (it = file_list.begin(); it != file_list.end(); it++) {
|
||||
path->tracks.push_back(libsaria::Track(*it));
|
||||
}
|
||||
}
|
||||
|
||||
ReaddirTask::ReaddirTask(struct libsaria::library::Path *p)
|
||||
|
|
|
@ -1,16 +1,25 @@
|
|||
// Copyright (c) 2011 Bryan Schumaker.
|
||||
#include <libsaria/track.h>
|
||||
#include <libsaria/format.h>
|
||||
/*#include <libsaria/format.h>
|
||||
#include <libsaria/library.h>
|
||||
#include <libsaria/index.h>
|
||||
#include <libsaria/index.h>*/
|
||||
|
||||
#include <taglib/tag.h>
|
||||
#include <taglib/fileref.h>
|
||||
#include <sstream>
|
||||
/*#include <sstream>*/
|
||||
|
||||
namespace libsaria
|
||||
{
|
||||
|
||||
Track::Track(string file)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Track::~Track()
|
||||
{
|
||||
}
|
||||
|
||||
/* Track::Track()
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue