WIP, Remote Client/Server, fist working transcode

This commit is contained in:
emeric
2014-05-28 14:49:45 +02:00
parent 61341a090a
commit d6ad178bdb
19 changed files with 2690 additions and 858 deletions
+1
View File
@@ -140,6 +140,7 @@ class Track
// Find utilities
static pointer getByPath(Wt::Dbo::Session& session, const boost::filesystem::path& p);
static pointer getById(Wt::Dbo::Session& session, id_type id);
static Wt::Dbo::collection< pointer > getAll(Wt::Dbo::Session& session);
static Wt::Dbo::collection< pointer > getAll(Wt::Dbo::Session& session,
const std::vector<Artist::id_type>& artistIds,
+6 -2
View File
@@ -30,11 +30,15 @@ Track::setGenres(std::vector<Genre::pointer> genres)
Track::pointer
Track::getByPath(Wt::Dbo::Session& session, const boost::filesystem::path& p)
{
Wt::Dbo::Transaction transaction(session);
return session.find<Track>().where("path = ?").bind(p.string());
}
Track::pointer
Track::getById(Wt::Dbo::Session& session, id_type id)
{
return session.find<Track>().where("id = ?").bind(id);
}
Track::pointer
Track::create(Wt::Dbo::Session& session, const boost::filesystem::path& p, Artist::pointer artist, Release::pointer release)