WIP, Remote Client/Server, Reworking cover art retreival. To be tested
This commit is contained in:
@@ -15,6 +15,8 @@ class Track;
|
||||
class Release;
|
||||
class Artist;
|
||||
|
||||
|
||||
|
||||
class Artist
|
||||
{
|
||||
public:
|
||||
@@ -66,6 +68,7 @@ class Release
|
||||
|
||||
// Accessors
|
||||
static pointer getByName(Wt::Dbo::Session& session, const std::string& name);
|
||||
static pointer getById(Wt::Dbo::Session& session, id_type id);
|
||||
static pointer getNone(Wt::Dbo::Session& session);
|
||||
|
||||
static Wt::Dbo::collection<pointer> getAll(Wt::Dbo::Session& session, std::vector<Artist::id_type> artistIds, int offset = -1, int size = -1);
|
||||
@@ -78,6 +81,7 @@ class Release
|
||||
Wt::Dbo::collection<Wt::Dbo::ptr<Track> > getTracks(void) const { return _tracks;}
|
||||
boost::posix_time::time_duration getDuration(void) const;
|
||||
|
||||
|
||||
template<class Action>
|
||||
void persist(Action& a)
|
||||
{
|
||||
@@ -87,7 +91,7 @@ class Release
|
||||
}
|
||||
|
||||
private:
|
||||
std::string _name;
|
||||
std::string _name;
|
||||
|
||||
Wt::Dbo::collection< Wt::Dbo::ptr<Track> > _tracks; // Tracks in the release
|
||||
};
|
||||
|
||||
@@ -60,7 +60,6 @@ class Database
|
||||
|
||||
DatabaseHandler _db;
|
||||
|
||||
|
||||
std::list<WatchedDirectory> _directories;
|
||||
MetaData::Parser& _metadataParser;
|
||||
};
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "AudioTypes.hpp"
|
||||
|
||||
|
||||
Release::Release(const std::string& name)
|
||||
: _name(name)
|
||||
{
|
||||
@@ -16,6 +15,12 @@ Release::getByName(Wt::Dbo::Session& session, const std::string& name)
|
||||
return session.find<Release>().where("name = ?").bind( name );
|
||||
}
|
||||
|
||||
Release::pointer
|
||||
Release::getById(Wt::Dbo::Session& session, id_type id)
|
||||
{
|
||||
return session.find<Release>().where("id = ?").bind(id);
|
||||
}
|
||||
|
||||
Release::pointer
|
||||
Release::getNone(Wt::Dbo::Session& session)
|
||||
{
|
||||
@@ -66,3 +71,4 @@ Release::getDuration(void) const
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user