add track mixes

This commit is contained in:
cwilvx
2024-11-27 12:35:48 +03:00
parent 809415ddb4
commit ee0f6c7646
5 changed files with 116 additions and 20 deletions
+4 -3
View File
@@ -1,6 +1,4 @@
from abc import ABC
from dataclasses import dataclass
import pprint
from typing import Any
from app.lib.home.recentlyplayed import recover_items
from app.models.mix import Mix
@@ -111,7 +109,6 @@ class BecauseYouListenedToArtistHomepageEntry(RecentlyPlayedHomepageEntry):
items: dict[int, dict[str, Any]]
def get_items(self, userid: int, limit: int | None = None):
pprint.pprint(self.items)
title = self.items.get(userid, {}).get("title")
items = self.items.get(userid, {}).get("items", [])[:limit]
@@ -134,6 +131,10 @@ class HomepageStore:
title="Artist mixes for you",
description="Based on artists you have been listening to",
),
"custom_mixes": MixHomepageEntry(
title="Mixes for you",
description="Because artist mixes alone aren't enough",
),
"top_streamed_weekly_artists": GenericRecoverableEntry(
title="Top artists this week",
description="Your most played artists since Monday",