mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-12 17:03:59 +08:00
Functionnal update
This commit is contained in:
parent
2e3d306e84
commit
d0ca6db2f7
4 changed files with 8 additions and 6 deletions
|
@ -19,7 +19,7 @@ from fdsend import send_file
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
from init_db import *
|
from init_db import *
|
||||||
#from check_update import *
|
from check_update import *
|
||||||
from get_languages import *
|
from get_languages import *
|
||||||
from get_providers import *
|
from get_providers import *
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,10 @@ from get_general_settings import *
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
result = subprocess.check_output(["git", "pull", '--dry-run', 'origin', branch], stderr=subprocess.STDOUT).split('\n')
|
|
||||||
|
|
||||||
if len(result) > 2:
|
def check_and_apply_update:
|
||||||
subprocess.check_output(["git", "pull", 'origin', branch])
|
result = subprocess.check_output(["git", "pull", '--dry-run', 'origin', branch], stderr=subprocess.STDOUT).split('\n')
|
||||||
os.execlp('python', os.path.join(os.path.dirname(__file__), 'bazarr.py'))
|
|
||||||
|
if result[2] is not '':
|
||||||
|
subprocess.check_output(["git", "pull", 'origin', branch])
|
||||||
|
os.execlp('python', 'python ' + os.path.join(os.path.dirname(__file__), 'bazarr.py'))
|
||||||
|
|
|
@ -4,7 +4,6 @@ bottle
|
||||||
bottle-fdsend
|
bottle-fdsend
|
||||||
dogpile.cache
|
dogpile.cache
|
||||||
enzyme
|
enzyme
|
||||||
gitpython
|
|
||||||
Pillow
|
Pillow
|
||||||
py-pretty
|
py-pretty
|
||||||
pycountry
|
pycountry
|
||||||
|
|
|
@ -5,6 +5,7 @@ from get_subtitle import *
|
||||||
from apscheduler.schedulers.background import BackgroundScheduler
|
from apscheduler.schedulers.background import BackgroundScheduler
|
||||||
|
|
||||||
scheduler = BackgroundScheduler()
|
scheduler = BackgroundScheduler()
|
||||||
|
scheduler.add_job(update_bazarr, 'interval', hours=6, max_instances=1, coalesce=True, id='update_bazarr', name='Update bazarr from source on Github')
|
||||||
scheduler.add_job(update_series, 'interval', minutes=1, max_instances=1, coalesce=True, id='update_series', name='Update series list from Sonarr')
|
scheduler.add_job(update_series, 'interval', minutes=1, max_instances=1, coalesce=True, id='update_series', name='Update series list from Sonarr')
|
||||||
scheduler.add_job(add_new_episodes, 'interval', minutes=1, max_instances=1, coalesce=True, id='add_new_episodes', name='Add new episodes from Sonarr')
|
scheduler.add_job(add_new_episodes, 'interval', minutes=1, max_instances=1, coalesce=True, id='add_new_episodes', name='Add new episodes from Sonarr')
|
||||||
scheduler.add_job(wanted_search_missing_subtitles, 'interval', minutes=15, max_instances=1, coalesce=True, id='wanted_search_missing_subtitles', name='Search for wanted subtitles')
|
scheduler.add_job(wanted_search_missing_subtitles, 'interval', minutes=15, max_instances=1, coalesce=True, id='wanted_search_missing_subtitles', name='Search for wanted subtitles')
|
||||||
|
|
Loading…
Reference in a new issue