Fix api bug.

This commit is contained in:
EstrellaXD
2023-04-25 15:08:59 +08:00
parent 6f438be19a
commit 99cd86a228
4 changed files with 6 additions and 4 deletions

View File

@@ -49,6 +49,7 @@ async def start():
if main_process.is_alive():
return {"status": "failed", "reason": "Already started"}
logger.info("Starting...")
main_process = multiprocessing.Process(target=app.run)
main_process.start()
logger.info("Started")
return {"status": "success"}

View File

@@ -2,7 +2,7 @@ import os
import time
import logging
from module.conf import settings, setup_logger, LOG_PATH, DATA_PATH, RSS_LINK, VERSION
from module.conf import settings, setup_logger, LOG_PATH, DATA_PATH, RSSLink, VERSION
from module.utils import json_config
from module.core import DownloadClient
@@ -11,6 +11,7 @@ from module.rss import RSSAnalyser
logger = logging.getLogger(__name__)
RSS_LINK = RSSLink()
def reset_log():
@@ -81,7 +82,7 @@ def run():
download_client.init_downloader()
if settings.rss_parser.token in ["", "token", None]:
logger.error("Please set your RSS token in config file.")
quit()
exit(0)
download_client.rss_feed()
bangumi_data = load_data_file()
# 主程序循环

View File

@@ -49,7 +49,7 @@ class DownloadClient:
"affectedFeeds": [rss_link],
"ignoreDays": 0,
"lastMatch": "",
"addPaused": settings.debug.dev_debug,
"addPaused": False,
"assignedCategory": "Bangumi",
"savePath": str(
os.path.join(

View File

@@ -48,7 +48,7 @@ class QbDownloader:
def torrents_add(self, urls, save_path, category):
return self._client.torrents_add(
is_paused=settings.debug.dev_debug,
is_paused=False,
urls=urls,
save_path=save_path,
category=category,