mirror of https://github.com/morpheus65535/bazarr
Fix for #360
This commit is contained in:
parent
a1a1ee68f1
commit
9d81ea0740
|
@ -1601,14 +1601,20 @@ def system():
|
|||
|
||||
def get_time_from_cron(cron):
|
||||
text = "at "
|
||||
sun = str(cron[4])
|
||||
hour = str(cron[5])
|
||||
minute = str(cron[6])
|
||||
second = str(cron[7])
|
||||
|
||||
if sun != "*":
|
||||
text = "Sunday " + text
|
||||
|
||||
if hour != "0" and hour != "*":
|
||||
text = text + hour
|
||||
if hour == "0" or hour == "1":
|
||||
text = text + " hour"
|
||||
elif sun != "*" or hour == "4" or hour == "5":
|
||||
text = text + "am"
|
||||
else:
|
||||
text = text + " hours"
|
||||
|
||||
|
|
|
@ -29,12 +29,12 @@ def sonarr_full_update():
|
|||
misfire_grace_time=15, id='update_all_episodes',
|
||||
name='Update all episodes subtitles from disk', replace_existing=True)
|
||||
elif full_update == "Weekly":
|
||||
scheduler.add_job(update_all_episodes, CronTrigger(day_of_week='sun'), hour=4, max_instances=1,
|
||||
scheduler.add_job(update_all_episodes, CronTrigger(day_of_week='sun', hour=4), max_instances=1,
|
||||
coalesce=True,
|
||||
misfire_grace_time=15, id='update_all_episodes',
|
||||
name='Update all episodes subtitles from disk', replace_existing=True)
|
||||
elif full_update == "Manually":
|
||||
scheduler.add_job(update_all_episodes, CronTrigger(year='2100'), hour=4, max_instances=1, coalesce=True,
|
||||
scheduler.add_job(update_all_episodes, CronTrigger(year='2100'), max_instances=1, coalesce=True,
|
||||
misfire_grace_time=15, id='update_all_episodes',
|
||||
name='Update all episodes subtitles from disk', replace_existing=True)
|
||||
|
||||
|
@ -48,7 +48,7 @@ def radarr_full_update():
|
|||
id='update_all_movies', name='Update all movies subtitles from disk',
|
||||
replace_existing=True)
|
||||
elif full_update == "Weekly":
|
||||
scheduler.add_job(update_all_movies, CronTrigger(day_of_week='sun'), hour=5, max_instances=1, coalesce=True,
|
||||
scheduler.add_job(update_all_movies, CronTrigger(day_of_week='sun', hour=5), max_instances=1, coalesce=True,
|
||||
misfire_grace_time=15, id='update_all_movies',
|
||||
name='Update all movies subtitles from disk',
|
||||
replace_existing=True)
|
||||
|
|
Loading…
Reference in New Issue