mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Change Bulk Changes and Notifications save to be web_root setting aware.
Change subtitle addons no longer need to be saved before Search Subtitles is enabled as a forbidden action to reuse an exited FindSubtitles thread is no longer attempted. Fix tools menu not opening for some browsers.
This commit is contained in:
parent
c96f18a7e8
commit
42db53f114
9 changed files with 37 additions and 59 deletions
|
@ -126,6 +126,10 @@
|
|||
* Remove Pushalot notifier
|
||||
* Remove XBMC notifier
|
||||
* Change a link to include webroot for "plot overview for this ended show"
|
||||
* Change Bulk Changes and Notifications save to be web_root setting aware
|
||||
* Change subtitle addons no longer need to be saved before Search Subtitles is enabled as a
|
||||
forbidden action to reuse an exited FindSubtitles thread is no longer attempted
|
||||
* Fix tools menu not opening for some browsers
|
||||
|
||||
|
||||
[develop changelog]
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<img src="$sbRoot/images/loading16#echo ('', '-dark')['dark' == $sickbeard.THEME_NAME]#.gif" height="16" width="16" style="display:none">
|
||||
<div id="config">
|
||||
<div id="config-content">
|
||||
<form id="configForm" action="/config/notifications/save_notifications" method="post">
|
||||
<form id="configForm" action="$sbRoot/config/notifications/save_notifications" method="post">
|
||||
<div id="config-components">
|
||||
<ul>
|
||||
<li><a href="#tabs-1">Home Theater / NAS</a></li>
|
||||
|
|
|
@ -321,7 +321,7 @@
|
|||
#echo ('', '<br /><br />')[any($ep_tally)]
|
||||
#if $show_ended
|
||||
#if $varExists('force_update')
|
||||
A <a href="/$force_update" title="Trigger force full update">force full update</a> may return a plot overview for this ended show
|
||||
A <a href="$sbRoot/$force_update" title="Trigger force full update">force full update</a> may return a plot overview for this ended show
|
||||
#else
|
||||
Restart SickGear to get a new link here for this ended show
|
||||
#end if
|
||||
|
|
|
@ -58,8 +58,7 @@
|
|||
|
||||
});
|
||||
\$('#limit').change(function(){
|
||||
url = '$sbRoot/history/?limit=' + \$(this).val()
|
||||
window.location.href = url
|
||||
window.location.href = '$sbRoot/history/?limit=' + \$(this).val()
|
||||
});
|
||||
|
||||
#set $fuzzydate = 'airdate'
|
||||
|
|
|
@ -196,7 +196,7 @@
|
|||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<li id="NAVtools" class="dropdown">
|
||||
#set num_errors = $getVar('$log_num_errors', None)
|
||||
#set $err_class = ('', ' errors ' + (len('%s' % $num_errors ) * 'n')[0:4])[any([$num_errors])]
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" $hover_dropdown tabindex="$tab#set $tab += 1#"><img src="$sbRoot/images/menu/system18-2.png" class="navbaricon hidden-xs" /><b class="caret hidden-xs"></b><span class="visible-xs">System <b class="caret"></b></span><span class="logger bar$err_class"><i class="sgicon-warning"></i></span></a>
|
||||
|
|
|
@ -69,7 +69,7 @@ $(document).ready(function() {
|
|||
if (0 == updateArr.length + refreshArr.length + renameArr.length + subtitleArr.length + deleteArr.length + removeArr.length + metadataArr.length)
|
||||
return !1;
|
||||
|
||||
window.location.href = $.SickGear.Root + 'bulkChange?toUpdate=' + updateArr.join('|') + '&toRefresh=' + refreshArr.join('|') + '&toRename=' + renameArr.join('|') + '&toSubtitle=' + subtitleArr.join('|') + '&toDelete=' + deleteArr.join('|') + '&toRemove=' + removeArr.join('|') + '&toMetadata=' + metadataArr.join('|');
|
||||
window.location.href = $.SickGear.Root + '/manage/bulkChange?toUpdate=' + updateArr.join('|') + '&toRefresh=' + refreshArr.join('|') + '&toRename=' + renameArr.join('|') + '&toSubtitle=' + subtitleArr.join('|') + '&toDelete=' + deleteArr.join('|') + '&toRemove=' + removeArr.join('|') + '&toMetadata=' + metadataArr.join('|');
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -333,11 +333,6 @@ USE_PYTIVO = False
|
|||
PYTIVO_HOST = ''
|
||||
PYTIVO_SHARE_NAME = ''
|
||||
PYTIVO_TIVO_NAME = ''
|
||||
PYTIVO_UPDATE_LIBRARY = True
|
||||
# PYTIVO_NOTIFY_ONSNATCH = False
|
||||
# PYTIVO_NOTIFY_ONDOWNLOAD = False
|
||||
# PYTIVO_NOTIFY_ONSUBTITLEDOWNLOAD = False
|
||||
# PYTIVO_UPDATE_LIBRARY = False
|
||||
|
||||
USE_BOXCAR2 = False
|
||||
BOXCAR2_NOTIFY_ONSNATCH = False
|
||||
|
@ -637,8 +632,6 @@ def initialize(console_logging=True):
|
|||
USE_SYNOLOGYNOTIFIER, SYNOLOGYNOTIFIER_NOTIFY_ONSNATCH, \
|
||||
SYNOLOGYNOTIFIER_NOTIFY_ONDOWNLOAD, SYNOLOGYNOTIFIER_NOTIFY_ONSUBTITLEDOWNLOAD, \
|
||||
USE_PYTIVO, PYTIVO_HOST, PYTIVO_SHARE_NAME, PYTIVO_TIVO_NAME
|
||||
# , \
|
||||
# PYTIVO_NOTIFY_ONSNATCH, PYTIVO_NOTIFY_ONDOWNLOAD, PYTIVO_NOTIFY_ONSUBTITLEDOWNLOAD, PYTIVO_UPDATE_LIBRARY
|
||||
# Notification Settings/Devices
|
||||
global USE_GROWL, GROWL_NOTIFY_ONSNATCH, GROWL_NOTIFY_ONDOWNLOAD, GROWL_NOTIFY_ONSUBTITLEDOWNLOAD, \
|
||||
GROWL_HOST, GROWL_PASSWORD, \
|
||||
|
@ -1044,10 +1037,6 @@ def initialize(console_logging=True):
|
|||
PYTIVO_HOST = check_setting_str(CFG, 'pyTivo', 'pytivo_host', '')
|
||||
PYTIVO_SHARE_NAME = check_setting_str(CFG, 'pyTivo', 'pytivo_share_name', '')
|
||||
PYTIVO_TIVO_NAME = check_setting_str(CFG, 'pyTivo', 'pytivo_tivo_name', '')
|
||||
# PYTIVO_NOTIFY_ONSNATCH = bool(check_setting_int(CFG, 'pyTivo', 'pytivo_notify_onsnatch', 0))
|
||||
# PYTIVO_NOTIFY_ONDOWNLOAD = bool(check_setting_int(CFG, 'pyTivo', 'pytivo_notify_ondownload', 0))
|
||||
# PYTIVO_NOTIFY_ONSUBTITLEDOWNLOAD = bool(check_setting_int(CFG, 'pyTivo', 'pytivo_notify_onsubtitledownload', 0))
|
||||
# PYTIVO_UPDATE_LIBRARY = bool(check_setting_int(CFG, 'pyTivo', 'pyTivo_update_library', 0))
|
||||
|
||||
USE_NMA = bool(check_setting_int(CFG, 'NMA', 'use_nma', 0))
|
||||
NMA_NOTIFY_ONSNATCH = bool(check_setting_int(CFG, 'NMA', 'nma_notify_onsnatch', 0))
|
||||
|
@ -1481,17 +1470,7 @@ def halt():
|
|||
|
||||
if __INITIALIZED__:
|
||||
|
||||
logger.log(u'Aborting all threads')
|
||||
|
||||
for thread in enabled_schedulers():
|
||||
thread.stop.set()
|
||||
|
||||
for thread in enabled_schedulers():
|
||||
logger.log('Waiting for the %s thread to exit' % thread.name)
|
||||
try:
|
||||
thread.join(10)
|
||||
except RuntimeError:
|
||||
pass
|
||||
logger.log('Exiting threads')
|
||||
|
||||
for p in provider_ping_thread_pool:
|
||||
provider_ping_thread_pool[p].stop = True
|
||||
|
@ -1499,21 +1478,33 @@ def halt():
|
|||
for p in provider_ping_thread_pool:
|
||||
try:
|
||||
provider_ping_thread_pool[p].join(10)
|
||||
logger.log('Thread %s has exit' % provider_ping_thread_pool[p].name)
|
||||
except RuntimeError:
|
||||
logger.log('Fail, thread %s did not exit' % provider_ping_thread_pool[p].name)
|
||||
pass
|
||||
|
||||
if ADBA_CONNECTION:
|
||||
try:
|
||||
ADBA_CONNECTION.logout()
|
||||
except AniDBBannedError as e:
|
||||
logger.log(u'ANIDB Error %s' % ex(e), logger.DEBUG)
|
||||
logger.log('AniDB Error %s' % ex(e), logger.DEBUG)
|
||||
except AniDBError:
|
||||
pass
|
||||
logger.log(u'Waiting for the ANIDB CONNECTION thread to exit')
|
||||
try:
|
||||
ADBA_CONNECTION.join(10)
|
||||
logger.log('Thread %s has exit' % ADBA_CONNECTION.name)
|
||||
except (StandardError, Exception):
|
||||
pass
|
||||
logger.log('Fail, thread %s did not exit' % ADBA_CONNECTION.name)
|
||||
|
||||
for thread in enabled_schedulers():
|
||||
thread.stop.set()
|
||||
|
||||
for thread in enabled_schedulers():
|
||||
try:
|
||||
thread.join(10)
|
||||
logger.log('Thread %s has exit' % thread.name)
|
||||
except RuntimeError:
|
||||
logger.log('Thread %s did not exit' % thread.name)
|
||||
|
||||
__INITIALIZED__ = False
|
||||
started = False
|
||||
|
@ -1796,10 +1787,6 @@ def save_config():
|
|||
new_config['pyTivo']['pytivo_host'] = PYTIVO_HOST
|
||||
new_config['pyTivo']['pytivo_share_name'] = PYTIVO_SHARE_NAME
|
||||
new_config['pyTivo']['pytivo_tivo_name'] = PYTIVO_TIVO_NAME
|
||||
# new_config['pyTivo']['pytivo_notify_onsnatch'] = int(PYTIVO_NOTIFY_ONSNATCH)
|
||||
# new_config['pyTivo']['pytivo_notify_ondownload'] = int(PYTIVO_NOTIFY_ONDOWNLOAD)
|
||||
# new_config['pyTivo']['pytivo_notify_onsubtitledownload'] = int(PYTIVO_NOTIFY_ONSUBTITLEDOWNLOAD)
|
||||
# new_config['pyTivo']['pyTivo_update_library'] = int(PYTIVO_UPDATE_LIBRARY)
|
||||
|
||||
new_config['Boxcar2'] = {}
|
||||
new_config['Boxcar2']['use_boxcar2'] = int(USE_BOXCAR2)
|
||||
|
|
|
@ -229,15 +229,21 @@ def change_USE_SUBTITLES(use_subtitles):
|
|||
return
|
||||
|
||||
sickbeard.USE_SUBTITLES = use_subtitles
|
||||
if sickbeard.USE_SUBTITLES:
|
||||
if sickbeard.USE_SUBTITLES and not sickbeard.subtitlesFinderScheduler.isAlive():
|
||||
sickbeard.subtitlesFinderScheduler = sickbeard.scheduler.Scheduler(
|
||||
sickbeard.subtitles.SubtitlesFinder(),
|
||||
cycleTime=datetime.timedelta(hours=sickbeard.SUBTITLES_FINDER_FREQUENCY),
|
||||
threadName='FINDSUBTITLES', silent=False)
|
||||
sickbeard.subtitlesFinderScheduler.start()
|
||||
else:
|
||||
sickbeard.subtitlesFinderScheduler.stop.set()
|
||||
logger.log(u'Waiting for the SUBTITLESFINDER thread to exit')
|
||||
sickbeard.subtitlesFinderScheduler.silent = True
|
||||
threadname = sickbeard.subtitlesFinderScheduler.name
|
||||
try:
|
||||
sickbeard.subtitlesFinderScheduler.join(10)
|
||||
except:
|
||||
pass
|
||||
logger.log('Thread %s has exit' % threadname)
|
||||
except RuntimeError:
|
||||
logger.log('Fail, thread %s did not exit' % threadname)
|
||||
|
||||
|
||||
def CheckSection(CFG, sec):
|
||||
|
|
|
@ -1278,7 +1278,7 @@ class Home(MainHandler):
|
|||
+ '<a href="%s/home/editShow?show=%s&tvsrc=0&srcid=%s#core-component-group3">replace it here</a>' % (
|
||||
sickbeard.WEB_ROOT, show, show)
|
||||
+ ('', '<br>%s' % show_message)[0 < len(show_message)])
|
||||
t.force_update = '%s/home/updateShow?show=%d&force=1&web=1' % (sickbeard.WEB_ROOT, showObj.indexerid)
|
||||
t.force_update = 'home/updateShow?show=%d&force=1&web=1' % showObj.indexerid
|
||||
if not sickbeard.showQueueScheduler.action.isBeingAdded(showObj): # @UndefinedVariable
|
||||
if not sickbeard.showQueueScheduler.action.isBeingUpdated(showObj): # @UndefinedVariable
|
||||
t.submenu.append(
|
||||
|
@ -5670,8 +5670,6 @@ class ConfigNotifications(Config):
|
|||
use_synoindex=None, use_synologynotifier=None, synologynotifier_notify_onsnatch=None,
|
||||
synologynotifier_notify_ondownload=None, synologynotifier_notify_onsubtitledownload=None,
|
||||
use_pytivo=None, pytivo_host=None, pytivo_share_name=None, pytivo_tivo_name=None,
|
||||
# pytivo_notify_onsnatch=None, pytivo_notify_ondownload=None, pytivo_notify_onsubtitledownload=None,
|
||||
# pytivo_update_library=None,
|
||||
|
||||
use_boxcar2=None, boxcar2_notify_onsnatch=None, boxcar2_notify_ondownload=None,
|
||||
boxcar2_notify_onsubtitledownload=None, boxcar2_access_token=None, boxcar2_sound=None,
|
||||
|
@ -5893,10 +5891,6 @@ class ConfigNotifications(Config):
|
|||
sickbeard.PYTIVO_HOST = config.clean_host(pytivo_host)
|
||||
sickbeard.PYTIVO_SHARE_NAME = pytivo_share_name
|
||||
sickbeard.PYTIVO_TIVO_NAME = pytivo_tivo_name
|
||||
# sickbeard.PYTIVO_NOTIFY_ONSNATCH = config.checkbox_to_value(pytivo_notify_onsnatch)
|
||||
# sickbeard.PYTIVO_NOTIFY_ONDOWNLOAD = config.checkbox_to_value(pytivo_notify_ondownload)
|
||||
# sickbeard.PYTIVO_NOTIFY_ONSUBTITLEDOWNLOAD = config.checkbox_to_value(pytivo_notify_onsubtitledownload)
|
||||
# sickbeard.PYTIVO_UPDATE_LIBRARY = config.checkbox_to_value(pytivo_update_library)
|
||||
|
||||
sickbeard.USE_NMA = config.checkbox_to_value(use_nma)
|
||||
sickbeard.NMA_NOTIFY_ONSNATCH = config.checkbox_to_value(nma_notify_onsnatch)
|
||||
|
@ -5950,19 +5944,7 @@ class ConfigSubtitles(Config):
|
|||
if subtitles_finder_frequency == '' or subtitles_finder_frequency is None:
|
||||
subtitles_finder_frequency = 1
|
||||
|
||||
if use_subtitles == 'on' and not sickbeard.subtitlesFinderScheduler.isAlive():
|
||||
sickbeard.subtitlesFinderScheduler.silent = False
|
||||
sickbeard.subtitlesFinderScheduler.start()
|
||||
else:
|
||||
sickbeard.subtitlesFinderScheduler.stop.set()
|
||||
sickbeard.subtitlesFinderScheduler.silent = True
|
||||
logger.log(u'Waiting for the SUBTITLESFINDER thread to exit')
|
||||
try:
|
||||
sickbeard.subtitlesFinderScheduler.join(5)
|
||||
except:
|
||||
pass
|
||||
|
||||
sickbeard.USE_SUBTITLES = config.checkbox_to_value(use_subtitles)
|
||||
config.change_USE_SUBTITLES(config.checkbox_to_value(use_subtitles))
|
||||
sickbeard.SUBTITLES_LANGUAGES = [lang.alpha2 for lang in subtitles.isValidLanguage(
|
||||
subtitles_languages.replace(' ', '').split(','))] if subtitles_languages != '' else ''
|
||||
sickbeard.SUBTITLES_DIR = subtitles_dir
|
||||
|
|
Loading…
Reference in a new issue