mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
implement saving mixes
+ add: get mixes + handle mixes on recently played + move modules around to fix circular deps
This commit is contained in:
@@ -25,14 +25,11 @@ class ArtistMixes(HomepageRoutine):
|
||||
|
||||
custom_mixes = []
|
||||
for _mix in mixes:
|
||||
custom_mix = mix.get_custom_mix_items(_mix)
|
||||
custom_mix = mix.get_track_mix(_mix)
|
||||
|
||||
if custom_mix:
|
||||
custom_mixes.append(custom_mix)
|
||||
|
||||
for index, custom_mix in enumerate(custom_mixes):
|
||||
custom_mix.title = f"Mix {index + 1}"
|
||||
|
||||
HomepageStore.set_mixes(
|
||||
custom_mixes, entrykey="custom_mixes", userid=user.id
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import pprint
|
||||
from app.db.userdata import ScrobbleTable, UserTable
|
||||
from app.lib.home.recentlyadded import get_recently_added_items
|
||||
from app.lib.home.recentlyplayed import get_recently_played
|
||||
from app.lib.home.get_recently_played import get_recently_played
|
||||
from app.lib.recipes import HomepageRoutine
|
||||
from app.store.homepage import HomepageStore
|
||||
|
||||
|
||||
Reference in New Issue
Block a user