Fixes for scene numbering in displayShows

This commit is contained in:
echel0n 2014-05-03 03:09:46 -07:00
parent 33be93288a
commit cae11c0f06
3 changed files with 9 additions and 5 deletions

View file

@ -193,6 +193,7 @@
#end for
</select>
<input type="hidden" id="showID" value="$show.indexerid" />
<input type="hidden" id="indexer" value="$show.indexer" />
<input class="btn" type="button" id="changeStatus" value="Go" />
</div>

View file

@ -165,6 +165,7 @@ $(document).ready(function(){
function setEpisodeSceneNumbering(forSeason, forEpisode, sceneSeason, sceneEpisode) {
var sbRoot = $('#sbRoot').val();
var showId = $('#showID').val();
var indexer = $('#indexer').val();
if (sceneSeason === '') sceneSeason = null;
if (sceneEpisode === '') sceneEpisode = null;
@ -172,6 +173,7 @@ $(document).ready(function(){
$.getJSON(sbRoot + '/home/setEpisodeSceneNumbering',
{
'show': showId,
'indexer': indexer,
'forSeason': forSeason,
'forEpisode': forEpisode,
'sceneSeason': sceneSeason,
@ -205,6 +207,7 @@ $(document).ready(function(){
var forSeason = $(this).attr('data-for-season');
var forEpisode = $(this).attr('data-for-episode');
var showId = $('#showID').val();
var indexer = $('#indexer').val();
//var sceneEpisode = $('#sceneEpisode_' + showId + '_' + forSeason +'_' + forEpisode).val();
var m = $(this).val().match(/^(\d+)x(\d+)$/i);

View file

@ -3376,7 +3376,7 @@ class Home:
return json.dumps({'result': status, 'subtitles': ','.join([x for x in ep_obj.subtitles])})
@cherrypy.expose
def setEpisodeSceneNumbering(self, show, forSeason, forEpisode, sceneSeason=None, sceneEpisode=None):
def setEpisodeSceneNumbering(self, show, indexer, forSeason, forEpisode, sceneSeason=None, sceneEpisode=None):
# sanitize:
if sceneSeason in ['null', '']: sceneSeason = None
@ -3398,7 +3398,7 @@ class Home:
(show, forSeason, forEpisode, sceneSeason, sceneEpisode), logger.DEBUG)
show = int(show)
indexer = int(ep_obj.indexer)
indexer = int(indexer)
forSeason = int(forSeason)
forEpisode = int(forEpisode)
if sceneSeason is not None: sceneSeason = int(sceneSeason)