mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
rewrite populate.py to minimize db and hdd reads
+ change process name in manage.py + update db query to save show albums as single, as an integer + enable periodic scans + misc
This commit is contained in:
@@ -5,6 +5,7 @@ import logging
|
||||
import mimetypes
|
||||
import os
|
||||
|
||||
import setproctitle
|
||||
from flask import request
|
||||
|
||||
from app.api import create_api
|
||||
@@ -18,6 +19,7 @@ from app.utils.filesystem import get_home_res_path
|
||||
from app.utils.threading import background
|
||||
|
||||
mimetypes.add_type("text/css", ".css")
|
||||
|
||||
mimetypes.add_type("text/javascript", ".js")
|
||||
mimetypes.add_type("text/plain", ".txt")
|
||||
mimetypes.add_type("text/html", ".html")
|
||||
@@ -76,6 +78,11 @@ def start_watchdog():
|
||||
WatchDog().run()
|
||||
|
||||
|
||||
setproctitle.setproctitle(
|
||||
f"swingmusic - {FLASKVARS.FLASK_HOST}:{FLASKVARS.FLASK_PORT}"
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
HandleArgs()
|
||||
log_startup_info()
|
||||
|
||||
Reference in New Issue
Block a user