API Subsonic: Adding playlist support

This commit is contained in:
emeric
2019-04-12 14:00:05 +02:00
parent 366420013f
commit fdbac7f444
10 changed files with 555 additions and 228 deletions
+3 -2
View File
@@ -145,14 +145,15 @@ PlayQueue::updateRadioBtn()
Database::TrackList::pointer
PlayQueue::getTrackList()
{
static const std::string currentPlayQueueName = "__current__playqueue__";
Database::TrackList::pointer res;
if (LmsApp->getUser()->isDemo())
{
static const std::string currentPlayQueueName = "__current__playqueue__";
if (!_tracklistId)
{
res = Database::TrackList::create(LmsApp->getDboSession(), currentPlayQueueName, false, LmsApp->getUser());
res = Database::TrackList::create(LmsApp->getDboSession(), currentPlayQueueName, Database::TrackList::Type::Internal, false, LmsApp->getUser());
LmsApp->getDboSession().flush();
_tracklistId = res.id();
return res;