mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-13 18:11:03 +08:00
Fix api bug.
This commit is contained in:
@@ -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"}
|
||||
|
||||
@@ -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()
|
||||
# 主程序循环
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user