handle watchdog's file created event using the on_modified

handler

+ move processing thumbnails and album colors to the populate class
+ move processing artist colors behind the populate call in run_periodic_checks
This commit is contained in:
geoffrey45
2023-01-25 13:43:09 +03:00
parent 5b71b95d66
commit 6818f9b0e8
3 changed files with 37 additions and 5 deletions
+4
View File
@@ -7,6 +7,7 @@ from app.db.sqlite.tracks import SQLiteTrackMethods
from app.db.sqlite.settings import SettingsSQLMethods as sdb
from app.db.sqlite.favorite import SQLiteFavoriteMethods as favdb
from app.db.store import Store
from app.lib.colorlib import ProcessAlbumColors
from app.lib.taglib import extract_thumb, get_tags
from app.logger import log
@@ -65,6 +66,9 @@ class Populate:
self.tag_untagged(untagged, key)
ProcessTrackThumbnails()
ProcessAlbumColors()
@staticmethod
def filter_untagged(tracks: list[Track], files: list[str]):
tagged_files = [t.filepath for t in tracks]