mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-06-06 19:25:34 +00:00
add print on taglib.py, line 60
This commit is contained in:
parent
92841a8f76
commit
574ccf9fea
@ -8,8 +8,7 @@ from requests import ReadTimeout
|
|||||||
|
|
||||||
from app import settings
|
from app import settings
|
||||||
from app.db.sqlite.favorite import SQLiteFavoriteMethods as favdb
|
from app.db.sqlite.favorite import SQLiteFavoriteMethods as favdb
|
||||||
from app.db.sqlite.lastfm.similar_artists import \
|
from app.db.sqlite.lastfm.similar_artists import SQLiteLastFMSimilarArtists as lastfmdb
|
||||||
SQLiteLastFMSimilarArtists as lastfmdb
|
|
||||||
from app.db.sqlite.settings import SettingsSQLMethods as sdb
|
from app.db.sqlite.settings import SettingsSQLMethods as sdb
|
||||||
from app.db.sqlite.tracks import SQLiteTrackMethods
|
from app.db.sqlite.tracks import SQLiteTrackMethods
|
||||||
from app.lib.albumslib import validate_albums
|
from app.lib.albumslib import validate_albums
|
||||||
@ -264,16 +263,18 @@ class ProcessTrackThumbnails:
|
|||||||
# process the rest
|
# process the rest
|
||||||
key_album_map = ((instance_key, album) for album in albums)
|
key_album_map = ((instance_key, album) for album in albums)
|
||||||
|
|
||||||
with ThreadPoolExecutor(max_workers=CPU_COUNT) as executor:
|
# with ThreadPoolExecutor(max_workers=CPU_COUNT) as executor:
|
||||||
results = list(
|
# results = list(
|
||||||
tqdm(
|
# tqdm(
|
||||||
executor.map(get_image, key_album_map),
|
# executor.map(get_image, key_album_map),
|
||||||
total=len(albums),
|
# total=len(albums),
|
||||||
desc="Extracting track images",
|
# desc="Extracting track images",
|
||||||
)
|
# )
|
||||||
)
|
# )
|
||||||
|
|
||||||
list(results)
|
# list(results)
|
||||||
|
for album in key_album_map:
|
||||||
|
get_image(album)
|
||||||
|
|
||||||
|
|
||||||
def save_similar_artists(_map: tuple[str, Artist]):
|
def save_similar_artists(_map: tuple[str, Artist]):
|
||||||
|
@ -56,6 +56,7 @@ def extract_thumb(filepath: str, webp_path: str, overwrite=False) -> bool:
|
|||||||
album_art = parse_album_art(filepath)
|
album_art = parse_album_art(filepath)
|
||||||
|
|
||||||
if album_art is not None:
|
if album_art is not None:
|
||||||
|
print("Reading image: " + filepath)
|
||||||
try:
|
try:
|
||||||
img = Image.open(BytesIO(album_art))
|
img = Image.open(BytesIO(album_art))
|
||||||
except (UnidentifiedImageError, OSError):
|
except (UnidentifiedImageError, OSError):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user