mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
add app version output to version.txt
+ refactor main entry point + add debug logging in image extraction
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
from dataclasses import asdict
|
||||
import os
|
||||
from concurrent.futures import ProcessPoolExecutor
|
||||
import platform
|
||||
import multiprocessing
|
||||
from dataclasses import asdict
|
||||
from concurrent.futures import ProcessPoolExecutor
|
||||
|
||||
from requests import ConnectionError as RequestConnectionError
|
||||
from requests import ReadTimeout
|
||||
@@ -63,11 +64,18 @@ def get_image(album: Album):
|
||||
:type album: Album
|
||||
:return: None
|
||||
"""
|
||||
log.info("[MP] process was started using: %s", multiprocessing.get_start_method())
|
||||
log.info("[get_image] extract image for album: %s", album.title)
|
||||
matching_tracks = AlbumStore.get_album_tracks(album.albumhash)
|
||||
|
||||
log.info("[get_image] Found matching tracks: %s", len(matching_tracks))
|
||||
|
||||
for track in matching_tracks:
|
||||
log.info("[get_image] extract image for track: %s", track.title)
|
||||
extracted = extract_thumb(track.filepath, track.albumhash + ".webp")
|
||||
|
||||
log.info("[get_image] extracted: %s", extracted)
|
||||
|
||||
if extracted:
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user