1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 02:52:20 -05:00

Fixed adding of trending shows.

Fixed adding root directory issues.
This commit is contained in:
echel0n 2014-11-14 16:35:10 -08:00
parent 5eaa84f429
commit 1c46813e89
3 changed files with 21 additions and 4 deletions

View File

@ -14,12 +14,18 @@
#import os.path
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl')
<script type="text/javascript" src="$sbRoot/js/rootDirs.js?$sbPID"></script>
<script type="text/javascript" src="$sbRoot/js/plotTooltip.js?$sbPID"></script>
<script type="text/javascript" charset="utf-8">
<!--
\$(document).ready(function(){
\$( "#tabs" ).tabs({
collapsible: true,
selected: #if $sickbeard.ROOT_DIRS then '-1' else '0'#
});
// initialise combos for dirty page refreshes
\$('#showsort').val('original');
\$('#showsortdirection').val('asc');
@ -85,7 +91,19 @@
#end if
#if $trending_shows
<div class="pull-right" style="margin-top: -40px;">
<div id="tabs">
<ul>
<li><a href="#tabs-1">Manage Directories</a></li>
<li><a href="#tabs-2">Customize Options</a></li>
</ul>
<div id="tabs-1" class="existingtabs">
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_rootDirs.tmpl")
</div>
<div id="tabs-2" class="existingtabs">
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_addShowOptions.tmpl")
</div>
<br>
<span>Sort By:</span>
<select id="showsort" class="form-control form-control-inline input-sm">
<option value="name">Name</option>

View File

@ -40,8 +40,8 @@ $(document).ready(function() {
if (is_default)
setDefault($('#rootDirs option').attr('id'));
$.get(sbRoot+'/config/general/saveRootDirs', { rootDirString: $('#rootDirText').val() });
refreshRootDirs();
$.get(sbRoot+'/config/general/saveRootDirs', { rootDirString: $('#rootDirText').val() });
}
function editRootDir(path) {

View File

@ -1462,7 +1462,6 @@ class ConfigGeneral(MainHandler):
def saveRootDirs(self, rootDirString=None):
sickbeard.ROOT_DIRS = rootDirString
def saveAddShowDefaults(self, defaultStatus, anyQualities, bestQualities, defaultFlattenFolders, subtitles=False,
anime=False, scene=False):
@ -3036,7 +3035,7 @@ class NewHomeAddShows(MainHandler):
ui.notifications.message('Show added', 'Adding the specified show into ' + show_dir)
else:
logger.log(u"There was an error creating the show, no root directory setting found", logger.ERROR)
return
return "No root directories setup, please go back and add one."
# done adding show
redirect('/home/')