mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 03:22:22 -05:00
Bugfix for scene numbering and kickass searches
This commit is contained in:
parent
a0d3a790dc
commit
e3a843a823
@ -29,9 +29,9 @@ from sickbeard import db
|
|||||||
import sickbeard
|
import sickbeard
|
||||||
|
|
||||||
naming_ep_type = ("%(seasonnumber)dx%(episodenumber)02d",
|
naming_ep_type = ("%(seasonnumber)dx%(episodenumber)02d",
|
||||||
"s%(seasonnumber)02de%(episodenumber)02d",
|
"s%(seasonnumber)02de%(episodenumber)02d",
|
||||||
"S%(seasonnumber)02dE%(episodenumber)02d",
|
"S%(seasonnumber)02dE%(episodenumber)02d",
|
||||||
"%(seasonnumber)02dx%(episodenumber)02d")
|
"%(seasonnumber)02dx%(episodenumber)02d")
|
||||||
naming_ep_type_text = ("1x02", "s01e02", "S01E02", "01x02")
|
naming_ep_type_text = ("1x02", "s01e02", "S01E02", "01x02")
|
||||||
|
|
||||||
naming_multi_ep_type = {0: ["-%(episodenumber)02d"] * len(naming_ep_type),
|
naming_multi_ep_type = {0: ["-%(episodenumber)02d"] * len(naming_ep_type),
|
||||||
|
@ -44,7 +44,7 @@ def processDir(dirName, nzbName=None, process_method=None, force=False, is_prior
|
|||||||
"""
|
"""
|
||||||
Scans through the files in dirName and processes whatever media files it finds
|
Scans through the files in dirName and processes whatever media files it finds
|
||||||
|
|
||||||
dirName or dir: The folder name to look in
|
dirName: The folder name to look in
|
||||||
nzbName: The NZB name which resulted in this folder being downloaded
|
nzbName: The NZB name which resulted in this folder being downloaded
|
||||||
force: True to postprocess already postprocessed files
|
force: True to postprocess already postprocessed files
|
||||||
failed: Boolean for whether or not the download failed
|
failed: Boolean for whether or not the download failed
|
||||||
|
@ -201,7 +201,10 @@ class KATProvider(generic.TorrentProvider):
|
|||||||
search_string['Episode'].append(ep_string)
|
search_string['Episode'].append(ep_string)
|
||||||
else:
|
else:
|
||||||
for show_name in set(allPossibleShowNames(ep_obj.show)):
|
for show_name in set(allPossibleShowNames(ep_obj.show)):
|
||||||
ep_string = sanitizeSceneName(show_name) +' '+'season:'+str(ep_obj.season)+' episode:'+str(ep_obj.episode)
|
ep_string = sanitizeSceneName(show_name) +' '+\
|
||||||
|
sickbeard.config.naming_ep_type[2] % {'seasonnumber': ep_obj.season, 'episodenumber': ep_obj.episode} +'|'+\
|
||||||
|
sickbeard.config.naming_ep_type[0] % {'seasonnumber': ep_obj.season, 'episodenumber': ep_obj.episode} +'|'+\
|
||||||
|
sickbeard.config.naming_ep_type[3] % {'seasonnumber': ep_obj.season, 'episodenumber': ep_obj.episode} + ' %s category:tv' %add_string \
|
||||||
|
|
||||||
search_string['Episode'].append(re.sub('\s+', ' ', ep_string))
|
search_string['Episode'].append(re.sub('\s+', ' ', ep_string))
|
||||||
|
|
||||||
|
@ -79,9 +79,7 @@ def find_scene_numbering(indexer_id, season, episode):
|
|||||||
rows = myDB.select("SELECT scene_season, scene_episode FROM scene_numbering WHERE indexer = ? and indexer_id = ? and season = ? and episode = ?", [indexer, indexer_id, season, episode])
|
rows = myDB.select("SELECT scene_season, scene_episode FROM scene_numbering WHERE indexer = ? and indexer_id = ? and season = ? and episode = ?", [indexer, indexer_id, season, episode])
|
||||||
if rows:
|
if rows:
|
||||||
return (int(rows[0]["scene_season"]), int(rows[0]["scene_episode"]))
|
return (int(rows[0]["scene_season"]), int(rows[0]["scene_episode"]))
|
||||||
else:
|
|
||||||
return (season, episode)
|
|
||||||
|
|
||||||
def get_indexer_numbering(indexer_id, sceneSeason, sceneEpisode, fallback_to_xem=True):
|
def get_indexer_numbering(indexer_id, sceneSeason, sceneEpisode, fallback_to_xem=True):
|
||||||
"""
|
"""
|
||||||
Returns a tuple, (season, episode) with the TVDB and TVRAGE numbering for (sceneSeason, sceneEpisode)
|
Returns a tuple, (season, episode) with the TVDB and TVRAGE numbering for (sceneSeason, sceneEpisode)
|
||||||
|
@ -57,7 +57,7 @@ from sickbeard.common import indexerStrings
|
|||||||
from sickbeard.exceptions import ex
|
from sickbeard.exceptions import ex
|
||||||
from sickbeard.webapi import Api
|
from sickbeard.webapi import Api
|
||||||
from sickbeard.scene_exceptions import get_scene_exceptions
|
from sickbeard.scene_exceptions import get_scene_exceptions
|
||||||
from sickbeard.scene_numbering import find_scene_numbering, set_scene_numbering, get_scene_numbering_for_show, get_xem_numbering_for_show
|
from sickbeard.scene_numbering import get_scene_numbering, set_scene_numbering, get_scene_numbering_for_show, get_xem_numbering_for_show
|
||||||
from sickbeard.providers.generic import TorrentProvider
|
from sickbeard.providers.generic import TorrentProvider
|
||||||
|
|
||||||
from sickbeard.indexers.indexer_api import indexerApi
|
from sickbeard.indexers.indexer_api import indexerApi
|
||||||
@ -3326,7 +3326,7 @@ class Home:
|
|||||||
|
|
||||||
set_scene_numbering(show, forSeason, forEpisode, sceneSeason, sceneEpisode)
|
set_scene_numbering(show, forSeason, forEpisode, sceneSeason, sceneEpisode)
|
||||||
|
|
||||||
sn = find_scene_numbering(show, forSeason, forEpisode)
|
sn = get_scene_numbering(show, forSeason, forEpisode)
|
||||||
if sn:
|
if sn:
|
||||||
(result['sceneSeason'], result['sceneEpisode']) = sn
|
(result['sceneSeason'], result['sceneEpisode']) = sn
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user