feat: exit the Populate function when another one is started

+ add test for the extract_fetured_artists_from_title function
This commit is contained in:
geoffrey45
2023-01-24 22:40:19 +03:00
parent 2ba1b0386e
commit af4221e0c7
10 changed files with 528 additions and 385 deletions
+5 -2
View File
@@ -8,7 +8,7 @@ from requests import ReadTimeout
from app import utils
from app.lib.artistlib import CheckArtistImages
from app.lib.colorlib import ProcessAlbumColors, ProcessArtistColors
from app.lib.populate import Populate, ProcessTrackThumbnails
from app.lib.populate import Populate, ProcessTrackThumbnails, PopulateCancelledError
from app.lib.trackslib import validate_tracks
from app.logger import log
@@ -23,8 +23,11 @@ def run_periodic_checks():
validate_tracks()
while True:
try:
Populate(key=utils.get_random_str())
except PopulateCancelledError:
pass
Populate()
ProcessTrackThumbnails()
ProcessAlbumColors()
ProcessArtistColors()