Subsonic API: added playCount
This commit is contained in:
@@ -19,8 +19,9 @@
|
||||
|
||||
#include "responses/Album.hpp"
|
||||
|
||||
#include "services/database/Cluster.hpp"
|
||||
#include "services/database/Artist.hpp"
|
||||
#include "services/database/Cluster.hpp"
|
||||
#include "services/database/Listen.hpp"
|
||||
#include "services/database/Release.hpp"
|
||||
#include "services/database/User.hpp"
|
||||
#include "services/feedback/IFeedbackService.hpp"
|
||||
@@ -124,6 +125,8 @@ namespace API::Subsonic
|
||||
}
|
||||
}
|
||||
|
||||
albumNode.setAttribute("playCount", Listen::getCount(context.dbSession, user->getId(), user->getScrobblingBackend(), release->getId()));
|
||||
|
||||
// Report the first GENRE for this track
|
||||
const ClusterType::pointer genreClusterType{ ClusterType::find(context.dbSession, "GENRE") };
|
||||
if (genreClusterType)
|
||||
|
||||
Reference in New Issue
Block a user