mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
fix playlists
This commit is contained in:
@@ -13,6 +13,8 @@ from app import settings
|
||||
from app.db.libdata import TrackTable
|
||||
from app.models.track import Track
|
||||
from app.store.albums import AlbumStore
|
||||
from app.store.tracks import TrackStore
|
||||
|
||||
|
||||
def create_thumbnail(image: Any, img_path: str) -> str:
|
||||
"""
|
||||
@@ -103,9 +105,14 @@ def duplicate_images(images: list):
|
||||
def get_first_4_images(
|
||||
tracks: list[Track] = [], trackhashes: list[str] = []
|
||||
) -> list[dict["str", str]]:
|
||||
"""
|
||||
Returns images of the first 4 albums that appear in the track list.
|
||||
|
||||
When tracks are not passed, trackhashes need to be passed.
|
||||
Tracks are then resolved from the store.
|
||||
"""
|
||||
if len(trackhashes) > 0:
|
||||
# tracks = TrackStore.get_tracks_by_trackhashes(trackhashes)
|
||||
tracks = TrackTable.get_tracks_by_trackhashes(trackhashes)
|
||||
tracks = TrackStore.get_tracks_by_trackhashes(trackhashes)
|
||||
|
||||
albums = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user