mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
combine userdata and swing db into one
+ port populate to new db interface
+ add genrehashes and hash info to tracks
+ properly structure new db table files
+ move helpers to dedicated utils file
+ move settings from db to config file
+ move artists, albums, auth and favorites endpoint to new db interface
+ use folder store to index filepaths
+ paginate favorite pages
+ 56 moretiny changes 😅
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
"""
|
||||
This module contains functions for the server
|
||||
"""
|
||||
|
||||
import time
|
||||
|
||||
from app.config import UserConfig
|
||||
from app.lib.populate import Populate, PopulateCancelledError
|
||||
from app.settings import SessionVarKeys, get_flag, get_scan_sleep_time
|
||||
from app.utils.generators import get_random_str
|
||||
from app.utils.threading import background
|
||||
from app.logger import log
|
||||
|
||||
|
||||
@background
|
||||
def run_periodic_scans():
|
||||
"""
|
||||
@@ -23,10 +25,7 @@ def run_periodic_scans():
|
||||
# ValidateAlbumThumbs()
|
||||
# ValidatePlaylistThumbs()
|
||||
|
||||
run_periodic_scan = True
|
||||
|
||||
while run_periodic_scan:
|
||||
run_periodic_scan = get_flag(SessionVarKeys.DO_PERIODIC_SCANS)
|
||||
while UserConfig().enablePeriodicScans:
|
||||
|
||||
try:
|
||||
Populate(instance_key=get_random_str())
|
||||
@@ -34,5 +33,4 @@ def run_periodic_scans():
|
||||
log.error("'run_periodic_scans': Periodic scan cancelled.")
|
||||
pass
|
||||
|
||||
sleep_time = get_scan_sleep_time()
|
||||
time.sleep(sleep_time)
|
||||
time.sleep(UserConfig().scanInterval)
|
||||
|
||||
Reference in New Issue
Block a user