diff --git a/sickbeard/config.py b/sickbeard/config.py index a6764c56..ad578f6a 100644 --- a/sickbeard/config.py +++ b/sickbeard/config.py @@ -29,9 +29,9 @@ from sickbeard import db import sickbeard naming_ep_type = ("%(seasonnumber)dx%(episodenumber)02d", - "s%(seasonnumber)02de%(episodenumber)02d", - "S%(seasonnumber)02dE%(episodenumber)02d", - "%(seasonnumber)02dx%(episodenumber)02d") + "s%(seasonnumber)02de%(episodenumber)02d", + "S%(seasonnumber)02dE%(episodenumber)02d", + "%(seasonnumber)02dx%(episodenumber)02d") naming_ep_type_text = ("1x02", "s01e02", "S01E02", "01x02") naming_multi_ep_type = {0: ["-%(episodenumber)02d"] * len(naming_ep_type), diff --git a/sickbeard/processTV.py b/sickbeard/processTV.py index 69840830..4506851f 100644 --- a/sickbeard/processTV.py +++ b/sickbeard/processTV.py @@ -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 - 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 force: True to postprocess already postprocessed files failed: Boolean for whether or not the download failed diff --git a/sickbeard/providers/kat.py b/sickbeard/providers/kat.py index 3365b34c..801855bc 100644 --- a/sickbeard/providers/kat.py +++ b/sickbeard/providers/kat.py @@ -201,7 +201,10 @@ class KATProvider(generic.TorrentProvider): search_string['Episode'].append(ep_string) else: 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)) diff --git a/sickbeard/scene_numbering.py b/sickbeard/scene_numbering.py index 69e6c7b2..d82e8a79 100644 --- a/sickbeard/scene_numbering.py +++ b/sickbeard/scene_numbering.py @@ -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]) if rows: 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): """ Returns a tuple, (season, episode) with the TVDB and TVRAGE numbering for (sceneSeason, sceneEpisode) diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 109a2b29..737e07b0 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -57,7 +57,7 @@ from sickbeard.common import indexerStrings from sickbeard.exceptions import ex from sickbeard.webapi import Api 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.indexers.indexer_api import indexerApi @@ -3326,7 +3326,7 @@ class Home: set_scene_numbering(show, forSeason, forEpisode, sceneSeason, sceneEpisode) - sn = find_scene_numbering(show, forSeason, forEpisode) + sn = get_scene_numbering(show, forSeason, forEpisode) if sn: (result['sceneSeason'], result['sceneEpisode']) = sn else: