WIP, Remote Client/Server, fist working transcode
This commit is contained in:
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user