mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
write LASTFM_API_KEY to config file
+ remove alive bar
This commit is contained in:
@@ -5,7 +5,6 @@ Contains methods relating to albums.
|
||||
from dataclasses import asdict
|
||||
from typing import Any
|
||||
|
||||
from alive_progress import alive_bar
|
||||
|
||||
from app.logger import log
|
||||
from app.models.track import Track
|
||||
@@ -23,20 +22,19 @@ def validate_albums():
|
||||
album_hashes = {t.albumhash for t in TrackStore.tracks}
|
||||
albums = AlbumStore.albums
|
||||
|
||||
with alive_bar(len(albums)) as bar:
|
||||
log.info("Validating albums")
|
||||
for album in albums:
|
||||
if album.albumhash not in album_hashes:
|
||||
AlbumStore.remove_album(album)
|
||||
bar()
|
||||
for album in albums:
|
||||
if album.albumhash not in album_hashes:
|
||||
AlbumStore.remove_album(album)
|
||||
|
||||
|
||||
def remove_duplicate_on_merge_versions(tracks: list[Track]) -> list[Track]:
|
||||
"""
|
||||
Removes duplicate tracks when merging versions of the same album.
|
||||
"""
|
||||
|
||||
|
||||
pass
|
||||
|
||||
|
||||
def sort_by_track_no(tracks: list[Track]) -> list[dict[str, Any]]:
|
||||
tracks = [asdict(t) for t in tracks]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user