mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
fix: errors raised by Pycharm
This commit is contained in:
@@ -82,7 +82,7 @@ class CheckArtistImages:
|
||||
"""
|
||||
Checks if an artist image exists and downloads it if not.
|
||||
|
||||
:param artistname: The artist name
|
||||
:param artist: The artist name
|
||||
"""
|
||||
img_path = Path(settings.ARTIST_IMG_SM_PATH) / f"{artist.artisthash}.webp"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class GetFilesAndDirs:
|
||||
try:
|
||||
entries = os.scandir(self.path)
|
||||
except FileNotFoundError:
|
||||
return ([], [])
|
||||
return [], []
|
||||
|
||||
dirs, files = [], []
|
||||
|
||||
@@ -56,4 +56,4 @@ class GetFilesAndDirs:
|
||||
|
||||
folders = filter(lambda f: f.has_tracks, folders)
|
||||
|
||||
return (tracks, folders) # type: ignore
|
||||
return tracks, folders # type: ignore
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
import os
|
||||
from tqdm import tqdm
|
||||
|
||||
from app import settings
|
||||
@@ -139,4 +138,4 @@ class ProcessTrackThumbnails:
|
||||
)
|
||||
)
|
||||
|
||||
results = [r for r in results]
|
||||
list(results)
|
||||
|
||||
+1
-6
@@ -111,7 +111,7 @@ def get_tags(filepath: str):
|
||||
if p == "" or p is None:
|
||||
maybe = parse_artist_from_filename(filename)
|
||||
|
||||
if maybe != []:
|
||||
if maybe:
|
||||
setattr(tags, tag, ", ".join(maybe))
|
||||
else:
|
||||
setattr(tags, tag, "Unknown")
|
||||
@@ -174,8 +174,3 @@ def get_tags(filepath: str):
|
||||
del tags[tag]
|
||||
|
||||
return tags
|
||||
|
||||
for tag in to_delete:
|
||||
del tags[tag]
|
||||
|
||||
return tags
|
||||
|
||||
Reference in New Issue
Block a user