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

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,13 +165,15 @@ $(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;
$.getJSON(sbRoot + '/home/setEpisodeSceneNumbering',
{
'show': showId,
'indexer': indexer,
'forSeason': forSeason,
'forEpisode': forEpisode,
'sceneSeason': sceneSeason,
@ -205,7 +207,8 @@ $(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);
var sceneSeason = null, sceneEpisode = null;

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,14 +3398,14 @@ 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)
if sceneEpisode is not None: sceneEpisode = int(sceneEpisode)
set_scene_numbering(show, forSeason, forEpisode, sceneSeason, sceneEpisode)
sn = get_scene_numbering(show, indexer, forSeason, forEpisode)
if sn:
(result['sceneSeason'], result['sceneEpisode']) = sn