mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
Restyle New album page design (#76)
This commit is contained in:
committed by
Mungai Geoffrey
parent
7d59993203
commit
714775a67e
@@ -1,11 +1,9 @@
|
||||
import colorgram
|
||||
from app import instances
|
||||
|
||||
|
||||
from app.helpers import Get
|
||||
from app import settings
|
||||
from app.models import Album
|
||||
from app.helpers import Get
|
||||
from app.logger import get_logger
|
||||
from app.models import Album
|
||||
|
||||
log = get_logger()
|
||||
|
||||
@@ -27,6 +25,7 @@ def get_image_colors(image: str) -> list:
|
||||
|
||||
|
||||
class ProcessAlbumColors:
|
||||
|
||||
def __init__(self) -> None:
|
||||
log.info("Processing album colors")
|
||||
all_albums = Get.get_all_albums()
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
from dataclasses import dataclass
|
||||
import time
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from dataclasses import dataclass
|
||||
from typing import List
|
||||
|
||||
from app import instances
|
||||
from app import settings
|
||||
from app.logger import logg
|
||||
from app.helpers import Get, UseBisection, create_album_hash
|
||||
from app.helpers import create_album_hash
|
||||
from app.helpers import Get
|
||||
from app.helpers import run_fast_scandir
|
||||
from app.helpers import UseBisection
|
||||
from app.instances import tracks_instance
|
||||
from app.lib.albumslib import create_album
|
||||
from app.lib.taglib import get_tags
|
||||
from app.models import Album, Track
|
||||
from app.logger import logg
|
||||
from app.models import Album
|
||||
from app.models import Track
|
||||
from tqdm import tqdm
|
||||
|
||||
from app import instances
|
||||
|
||||
|
||||
class Populate:
|
||||
"""
|
||||
@@ -76,6 +78,7 @@ class PreAlbum:
|
||||
|
||||
|
||||
class CreateAlbums:
|
||||
|
||||
def __init__(self) -> None:
|
||||
self.db_tracks = Get.get_all_tracks()
|
||||
self.db_albums = Get.get_all_albums()
|
||||
@@ -119,7 +122,8 @@ class CreateAlbums:
|
||||
return prealbums
|
||||
|
||||
@staticmethod
|
||||
def filter_processed(albums: List[Album], prealbums: List[PreAlbum]) -> List[dict]:
|
||||
def filter_processed(albums: List[Album],
|
||||
prealbums: List[PreAlbum]) -> List[dict]:
|
||||
to_process = []
|
||||
|
||||
for p in tqdm(prealbums, desc="Filtering processed albums"):
|
||||
|
||||
@@ -37,6 +37,7 @@ class Limit:
|
||||
|
||||
|
||||
class SearchTracks:
|
||||
|
||||
def __init__(self, tracks: List[models.Track], query: str) -> None:
|
||||
self.query = query
|
||||
self.tracks = tracks
|
||||
@@ -59,6 +60,7 @@ class SearchTracks:
|
||||
|
||||
|
||||
class SearchArtists:
|
||||
|
||||
def __init__(self, artists: set[str], query: str) -> None:
|
||||
self.query = query
|
||||
self.artists = artists
|
||||
@@ -88,6 +90,7 @@ class SearchArtists:
|
||||
|
||||
|
||||
class SearchAlbums:
|
||||
|
||||
def __init__(self, albums: List[models.Album], query: str) -> None:
|
||||
self.query = query
|
||||
self.albums = albums
|
||||
@@ -118,6 +121,7 @@ class SearchAlbums:
|
||||
|
||||
|
||||
class SearchPlaylists:
|
||||
|
||||
def __init__(self, playlists: List[models.Playlist], query: str) -> None:
|
||||
self.playlists = playlists
|
||||
self.query = query
|
||||
|
||||
Reference in New Issue
Block a user