mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
Restyle Move populate to new file (#48)
This commit is contained in:
@@ -10,12 +10,11 @@ from app import api
|
||||
from app import functions
|
||||
from app import instances
|
||||
from app import models
|
||||
from app import settings
|
||||
from app.lib import taglib
|
||||
from app.lib import trackslib
|
||||
from progress.bar import Bar
|
||||
|
||||
from app.lib import taglib
|
||||
from app import settings
|
||||
|
||||
|
||||
def get_all_albums() -> List[models.Album]:
|
||||
"""
|
||||
@@ -66,7 +65,8 @@ def find_album(albumtitle: str, artist: str) -> int or None:
|
||||
iter += 1
|
||||
mid = (left + right) // 2
|
||||
|
||||
if api.ALBUMS[mid].title == albumtitle and api.ALBUMS[mid].artist == artist:
|
||||
if api.ALBUMS[mid].title == albumtitle and api.ALBUMS[
|
||||
mid].artist == artist:
|
||||
return mid
|
||||
|
||||
if api.ALBUMS[mid].title < albumtitle:
|
||||
@@ -155,8 +155,7 @@ def create_album(track) -> models.Album:
|
||||
album["date"] = album_tracks[0]["date"]
|
||||
|
||||
album["artistimage"] = urllib.parse.quote_plus(
|
||||
album_tracks[0]["albumartist"] + ".webp"
|
||||
)
|
||||
album_tracks[0]["albumartist"] + ".webp")
|
||||
|
||||
album["image"] = get_album_image(album_tracks)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user