mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-03 18:03:37 +00:00
Fixes for scene numbering in displayShows
This commit is contained in:
parent
33be93288a
commit
cae11c0f06
3 changed files with 9 additions and 5 deletions
|
@ -193,6 +193,7 @@
|
||||||
#end for
|
#end for
|
||||||
</select>
|
</select>
|
||||||
<input type="hidden" id="showID" value="$show.indexerid" />
|
<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" />
|
<input class="btn" type="button" id="changeStatus" value="Go" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -165,13 +165,15 @@ $(document).ready(function(){
|
||||||
function setEpisodeSceneNumbering(forSeason, forEpisode, sceneSeason, sceneEpisode) {
|
function setEpisodeSceneNumbering(forSeason, forEpisode, sceneSeason, sceneEpisode) {
|
||||||
var sbRoot = $('#sbRoot').val();
|
var sbRoot = $('#sbRoot').val();
|
||||||
var showId = $('#showID').val();
|
var showId = $('#showID').val();
|
||||||
|
var indexer = $('#indexer').val();
|
||||||
|
|
||||||
if (sceneSeason === '') sceneSeason = null;
|
if (sceneSeason === '') sceneSeason = null;
|
||||||
if (sceneEpisode === '') sceneEpisode = null;
|
if (sceneEpisode === '') sceneEpisode = null;
|
||||||
|
|
||||||
$.getJSON(sbRoot + '/home/setEpisodeSceneNumbering',
|
$.getJSON(sbRoot + '/home/setEpisodeSceneNumbering',
|
||||||
{
|
{
|
||||||
'show': showId,
|
'show': showId,
|
||||||
|
'indexer': indexer,
|
||||||
'forSeason': forSeason,
|
'forSeason': forSeason,
|
||||||
'forEpisode': forEpisode,
|
'forEpisode': forEpisode,
|
||||||
'sceneSeason': sceneSeason,
|
'sceneSeason': sceneSeason,
|
||||||
|
@ -205,7 +207,8 @@ $(document).ready(function(){
|
||||||
var forSeason = $(this).attr('data-for-season');
|
var forSeason = $(this).attr('data-for-season');
|
||||||
var forEpisode = $(this).attr('data-for-episode');
|
var forEpisode = $(this).attr('data-for-episode');
|
||||||
var showId = $('#showID').val();
|
var showId = $('#showID').val();
|
||||||
|
var indexer = $('#indexer').val();
|
||||||
|
|
||||||
//var sceneEpisode = $('#sceneEpisode_' + showId + '_' + forSeason +'_' + forEpisode).val();
|
//var sceneEpisode = $('#sceneEpisode_' + showId + '_' + forSeason +'_' + forEpisode).val();
|
||||||
var m = $(this).val().match(/^(\d+)x(\d+)$/i);
|
var m = $(this).val().match(/^(\d+)x(\d+)$/i);
|
||||||
var sceneSeason = null, sceneEpisode = null;
|
var sceneSeason = null, sceneEpisode = null;
|
||||||
|
|
|
@ -3376,7 +3376,7 @@ class Home:
|
||||||
return json.dumps({'result': status, 'subtitles': ','.join([x for x in ep_obj.subtitles])})
|
return json.dumps({'result': status, 'subtitles': ','.join([x for x in ep_obj.subtitles])})
|
||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def setEpisodeSceneNumbering(self, show, forSeason, forEpisode, sceneSeason=None, sceneEpisode=None):
|
def setEpisodeSceneNumbering(self, show, indexer, forSeason, forEpisode, sceneSeason=None, sceneEpisode=None):
|
||||||
|
|
||||||
# sanitize:
|
# sanitize:
|
||||||
if sceneSeason in ['null', '']: sceneSeason = None
|
if sceneSeason in ['null', '']: sceneSeason = None
|
||||||
|
@ -3398,14 +3398,14 @@ class Home:
|
||||||
(show, forSeason, forEpisode, sceneSeason, sceneEpisode), logger.DEBUG)
|
(show, forSeason, forEpisode, sceneSeason, sceneEpisode), logger.DEBUG)
|
||||||
|
|
||||||
show = int(show)
|
show = int(show)
|
||||||
indexer = int(ep_obj.indexer)
|
indexer = int(indexer)
|
||||||
forSeason = int(forSeason)
|
forSeason = int(forSeason)
|
||||||
forEpisode = int(forEpisode)
|
forEpisode = int(forEpisode)
|
||||||
if sceneSeason is not None: sceneSeason = int(sceneSeason)
|
if sceneSeason is not None: sceneSeason = int(sceneSeason)
|
||||||
if sceneEpisode is not None: sceneEpisode = int(sceneEpisode)
|
if sceneEpisode is not None: sceneEpisode = int(sceneEpisode)
|
||||||
|
|
||||||
set_scene_numbering(show, forSeason, forEpisode, sceneSeason, sceneEpisode)
|
set_scene_numbering(show, forSeason, forEpisode, sceneSeason, sceneEpisode)
|
||||||
|
|
||||||
sn = get_scene_numbering(show, indexer, forSeason, forEpisode)
|
sn = get_scene_numbering(show, indexer, forSeason, forEpisode)
|
||||||
if sn:
|
if sn:
|
||||||
(result['sceneSeason'], result['sceneEpisode']) = sn
|
(result['sceneSeason'], result['sceneEpisode']) = sn
|
||||||
|
|
Loading…
Reference in a new issue