WIP. Handling multiple media directories

This commit is contained in:
emeric
2014-08-05 22:35:10 +02:00
parent 9fdc9f41dd
commit 5bdabec325
12 changed files with 426 additions and 34 deletions
+5
View File
@@ -44,5 +44,10 @@ MediaDirectory::getAll(Wt::Dbo::Session& session)
return std::vector<MediaDirectory::pointer>(res.begin(), res.end());
}
MediaDirectory::pointer
MediaDirectory::getByPath(Wt::Dbo::Session& session, boost::filesystem::path p)
{
return session.find<MediaDirectory>().where("path = ?").bind( p.string() );
}
} // namespace Database
+1
View File
@@ -76,6 +76,7 @@ class MediaDirectory
// Accessors
static pointer create(Wt::Dbo::Session& session, boost::filesystem::path p, Type type);
static std::vector<MediaDirectory::pointer> getAll(Wt::Dbo::Session& session);
static pointer getByPath(Wt::Dbo::Session& session, boost::filesystem::path p);
static void eraseAll(Wt::Dbo::Session& session);