API Subsonic: better support, added genre

This commit is contained in:
emeric
2019-04-03 23:53:41 +02:00
parent ab2ed24f75
commit 3ee937a409
10 changed files with 332 additions and 98 deletions
+6 -4
View File
@@ -22,6 +22,8 @@
#include <string>
#include <vector>
#include <boost/optional.hpp>
#include <Wt/WDateTime.h>
#include <Wt/Dbo/Dbo.h>
@@ -51,13 +53,13 @@ class Artist : public Wt::Dbo::Dbo<Artist>
static std::vector<pointer> getByFilter(Wt::Dbo::Session& session,
const std::set<IdType>& clusters, // at least one track that belongs to these clusters
const std::vector<std::string> keywords, // name must match all of these keywords
int offset,
int size,
boost::optional<std::size_t> offset,
boost::optional<std::size_t> size,
bool& moreExpected);
static std::vector<pointer> getAll(Wt::Dbo::Session& session, int offset = -1, int size = -1);
static std::vector<pointer> getAll(Wt::Dbo::Session& session, boost::optional<std::size_t> offset = {}, boost::optional<std::size_t> size = {});
static std::vector<pointer> getAllOrphans(Wt::Dbo::Session& session); // No track related
static std::vector<pointer> getLastAdded(Wt::Dbo::Session& session, Wt::WDateTime after, int size = 1);
static std::vector<pointer> getLastAdded(Wt::Dbo::Session& session, Wt::WDateTime after, boost::optional<std::size_t> size = {});
// Accessors
const std::string& getName(void) const { return _name; }