mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-23 22:35:33 +08:00
Continue developing
This commit is contained in:
parent
5b1414f81f
commit
fa1ea0eea7
3 changed files with 3 additions and 27 deletions
|
@ -73,6 +73,7 @@ def run_git(args):
|
|||
def check_updates():
|
||||
commits_behind = 0
|
||||
current_version, source = get_version()
|
||||
check_releases()
|
||||
|
||||
if source == 'git':
|
||||
# Get the latest version available from github
|
||||
|
|
|
@ -57,8 +57,6 @@ from get_providers import get_providers, get_providers_auth, list_throttled_prov
|
|||
from get_series import *
|
||||
from get_episodes import *
|
||||
|
||||
# if not args.no_update:
|
||||
# from check_update import check_updates
|
||||
from list_subtitles import store_subtitles, store_subtitles_movie, series_scan_subtitles, movies_scan_subtitles, \
|
||||
list_missing_subtitles, list_missing_subtitles_movies
|
||||
from get_subtitle import download_subtitle, series_download_subtitles, movies_download_subtitles, \
|
||||
|
@ -2009,27 +2007,6 @@ def notifications():
|
|||
def running_tasks_list():
|
||||
return dict(tasks=running_tasks)
|
||||
|
||||
|
||||
@route(base_url + 'websocket_updater')
|
||||
@custom_auth_basic(check_credentials)
|
||||
def handle_websocket():
|
||||
wsock = request.environ.get('wsgi.websocket')
|
||||
if not wsock:
|
||||
abort(400, 'Expected WebSocket request.')
|
||||
|
||||
queueconfig.q4ws_updater.clear()
|
||||
|
||||
while True:
|
||||
try:
|
||||
if queueconfig.q4ws_updater:
|
||||
wsock.send(queueconfig.q4ws_updater.popleft())
|
||||
gevent.sleep(0.1)
|
||||
else:
|
||||
gevent.sleep(0.5)
|
||||
except WebSocketError:
|
||||
break
|
||||
|
||||
|
||||
# Mute DeprecationWarning
|
||||
warnings.simplefilter("ignore", DeprecationWarning)
|
||||
server = WSGIServer((str(settings.general.ip), (int(args.port) if args.port else int(settings.general.port))), app, handler_class=WebSocketHandler)
|
||||
|
|
|
@ -7,10 +7,8 @@ from config import settings
|
|||
from get_subtitle import wanted_search_missing_subtitles, upgrade_subtitles
|
||||
from get_args import args
|
||||
|
||||
if not args.no_update:
|
||||
from check_update import check_updates, check_releases
|
||||
else:
|
||||
from check_update import check_releases
|
||||
|
||||
from check_update import check_updates, check_releases
|
||||
from apscheduler.schedulers.background import BackgroundScheduler
|
||||
from apscheduler.triggers.interval import IntervalTrigger
|
||||
from apscheduler.triggers.cron import CronTrigger
|
||||
|
|
Loading…
Reference in a new issue