From e5a59afbd467a6139ee62e9271db111262857e8e Mon Sep 17 00:00:00 2001 From: DisasteR Date: Mon, 12 May 2014 16:09:55 +0200 Subject: [PATCH] Fix Renaming issue for not PROPER release generating two dot in filename --- sickbeard/tv.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sickbeard/tv.py b/sickbeard/tv.py index faae6e43..54c1b0ed 100644 --- a/sickbeard/tv.py +++ b/sickbeard/tv.py @@ -1904,6 +1904,9 @@ class TVEpisode(object): result_name = result_name.replace('%rg', 'sickbeard') logger.log(u"Episode has no release name, replacing it with a generic one: " + result_name, logger.DEBUG) + if not replace_map['%RT']: + result_name = re.sub('([ _.-]*)%RT([ _.-]*)', r'\2', result_name) + # split off ep name part only name_groups = re.split(r'[\\/]', result_name) @@ -2138,4 +2141,4 @@ class TVEpisode(object): (self.season, self.episode) = sickbeard.scene_numbering.get_indexer_numbering(self.show.indexerid, self.show.indexer, self.scene_season, - self.scene_episode) \ No newline at end of file + self.scene_episode)