From 35f70c79242c45ad8d77c21cb6e91887bc9c8f5d Mon Sep 17 00:00:00 2001 From: echel0n Date: Sun, 27 Apr 2014 07:48:19 -0700 Subject: [PATCH] Fix for air-by-date and sports shows --- gui/slick/interfaces/default/config_general.tmpl | 13 +------------ sickbeard/providers/hdtorrents.py | 7 ++++--- sickbeard/providers/iptorrents.py | 7 ++++--- sickbeard/providers/kat.py | 6 +++--- sickbeard/providers/nextgen.py | 7 ++++--- sickbeard/providers/publichd.py | 4 ++-- sickbeard/providers/scc.py | 7 ++++--- sickbeard/providers/speedcd.py | 6 +++++- sickbeard/providers/thepiratebay.py | 4 ++-- sickbeard/providers/torrentday.py | 7 ++++--- sickbeard/providers/torrentleech.py | 6 +++--- 11 files changed, 36 insertions(+), 38 deletions(-) diff --git a/gui/slick/interfaces/default/config_general.tmpl b/gui/slick/interfaces/default/config_general.tmpl index 45e28a59..d2bef02d 100644 --- a/gui/slick/interfaces/default/config_general.tmpl +++ b/gui/slick/interfaces/default/config_general.tmpl @@ -82,17 +82,6 @@ -
- - -
-
diff --git a/sickbeard/providers/hdtorrents.py b/sickbeard/providers/hdtorrents.py index 06c970c4..3936cae3 100644 --- a/sickbeard/providers/hdtorrents.py +++ b/sickbeard/providers/hdtorrents.py @@ -37,6 +37,7 @@ from lib import requests from lib.requests import exceptions from bs4 import BeautifulSoup from lib.unidecode import unidecode +from sickbeard.helpers import sanitizeSceneName class HDTorrentsProvider(generic.TorrentProvider): @@ -132,9 +133,9 @@ class HDTorrentsProvider(generic.TorrentProvider): if abd: for show_name in set(show_name_helpers.allPossibleShowNames(show)): - ep_string = show_name_helpers.sanitizeSceneName(show_name) + ' ' + \ - str(episode) + '|' + \ - helpers.custom_strftime('%Y %b {S}', episode) + ep_string = sanitizeSceneName(show_name) + ' ' + \ + str(episode).replace('-', '|') + '|' + \ + helpers.custom_strftime('%b', episode) search_string['Episode'].append(ep_string) else: for show_name in set(show_name_helpers.allPossibleShowNames(show)): diff --git a/sickbeard/providers/iptorrents.py b/sickbeard/providers/iptorrents.py index 9d45da62..b45b9dac 100644 --- a/sickbeard/providers/iptorrents.py +++ b/sickbeard/providers/iptorrents.py @@ -36,6 +36,7 @@ from lib import requests from lib.requests import exceptions from bs4 import BeautifulSoup from lib.unidecode import unidecode +from sickbeard.helpers import sanitizeSceneName class IPTorrentsProvider(generic.TorrentProvider): @@ -114,9 +115,9 @@ class IPTorrentsProvider(generic.TorrentProvider): if abd: for show_name in set(show_name_helpers.allPossibleShowNames(show)): - ep_string = show_name_helpers.sanitizeSceneName(show_name) + ' ' + \ - str(episode) + '|' + \ - helpers.custom_strftime('%Y %b {S}', episode) + ep_string = sanitizeSceneName(show_name) + ' ' + \ + str(episode).replace('-', '|') + '|' + \ + helpers.custom_strftime('%b', episode) search_string['Episode'].append(ep_string) else: for show_name in set(show_name_helpers.allPossibleShowNames(show)): diff --git a/sickbeard/providers/kat.py b/sickbeard/providers/kat.py index 74a643ea..5b86bc18 100644 --- a/sickbeard/providers/kat.py +++ b/sickbeard/providers/kat.py @@ -193,10 +193,10 @@ class KATProvider(generic.TorrentProvider): if abd: for show_name in set(allPossibleShowNames(show)): - ep_string = sanitizeSceneName(show_name) + ' ' + \ - str(episode) + '|' + \ - helpers.custom_strftime('%Y %b {S}', episode) + ep_string = sanitizeSceneName(show_name) + ' ' + \ + str(episode).replace('-','|') + '|' + \ + helpers.custom_strftime('%b', episode) search_string['Episode'].append(ep_string) else: for show_name in set(allPossibleShowNames(show)): diff --git a/sickbeard/providers/nextgen.py b/sickbeard/providers/nextgen.py index ea1655b6..6ba908dd 100644 --- a/sickbeard/providers/nextgen.py +++ b/sickbeard/providers/nextgen.py @@ -38,6 +38,7 @@ from sickbeard import clients from lib import requests from lib.requests import exceptions from bs4 import BeautifulSoup +from sickbeard.helpers import sanitizeSceneName class NextGenProvider(generic.TorrentProvider): @@ -152,9 +153,9 @@ class NextGenProvider(generic.TorrentProvider): if abd: for show_name in set(show_name_helpers.allPossibleShowNames(show)): - ep_string = show_name_helpers.sanitizeSceneName(show_name) + ' ' + \ - str(episode) + '|' + \ - helpers.custom_strftime('%Y %b {S}', episode) + ep_string = sanitizeSceneName(show_name) + ' ' + \ + str(episode).replace('-', '|') + '|' + \ + helpers.custom_strftime('%b', episode) search_string['Episode'].append(ep_string) else: for show_name in set(show_name_helpers.allPossibleShowNames(show)): diff --git a/sickbeard/providers/publichd.py b/sickbeard/providers/publichd.py index 34cb44e6..a91a2579 100644 --- a/sickbeard/providers/publichd.py +++ b/sickbeard/providers/publichd.py @@ -101,8 +101,8 @@ class PublicHDProvider(generic.TorrentProvider): if abd: for show_name in set(allPossibleShowNames(show)): ep_string = sanitizeSceneName(show_name) + ' ' + \ - str(episode) + '|' + \ - helpers.custom_strftime('%Y %b {S}', episode) + str(episode).replace('-', '|') + '|' + \ + helpers.custom_strftime('%b', episode) search_string['Episode'].append(ep_string) else: for show_name in set(allPossibleShowNames(show)): diff --git a/sickbeard/providers/scc.py b/sickbeard/providers/scc.py index 78259f50..59de59fa 100644 --- a/sickbeard/providers/scc.py +++ b/sickbeard/providers/scc.py @@ -37,6 +37,7 @@ from lib import requests from lib.requests import exceptions from bs4 import BeautifulSoup from lib.unidecode import unidecode +from sickbeard.helpers import sanitizeSceneName class SCCProvider(generic.TorrentProvider): @@ -123,9 +124,9 @@ class SCCProvider(generic.TorrentProvider): if abd: for show_name in set(show_name_helpers.allPossibleShowNames(show)): - ep_string = show_name_helpers.sanitizeSceneName(show_name) + ' ' + \ - str(episode) + '|' + \ - helpers.custom_strftime('%Y %b {S}', episode) + ep_string = sanitizeSceneName(show_name) + ' ' + \ + str(episode).replace('-', '|') + '|' + \ + helpers.custom_strftime('%b', episode) search_string['Episode'].append(ep_string) else: for show_name in set(show_name_helpers.allPossibleShowNames(show)): diff --git a/sickbeard/providers/speedcd.py b/sickbeard/providers/speedcd.py index 51befe82..f6297fc9 100644 --- a/sickbeard/providers/speedcd.py +++ b/sickbeard/providers/speedcd.py @@ -34,6 +34,8 @@ from sickbeard.exceptions import ex from sickbeard import clients from lib import requests from lib.requests import exceptions +from sickbeard.helpers import sanitizeSceneName + class SpeedCDProvider(generic.TorrentProvider): @@ -118,7 +120,9 @@ class SpeedCDProvider(generic.TorrentProvider): if abd: for show_name in set(show_name_helpers.allPossibleShowNames(show)): - ep_string = show_name_helpers.sanitizeSceneName(show_name) +' '+ str(episode) + ep_string = sanitizeSceneName(show_name) + ' ' + \ + str(episode).replace('-', '|') + '|' + \ + helpers.custom_strftime('%b', episode) search_string['Episode'].append(ep_string) else: for show_name in set(show_name_helpers.allPossibleShowNames(show)): diff --git a/sickbeard/providers/thepiratebay.py b/sickbeard/providers/thepiratebay.py index 5e5e7ba6..82ba9be5 100644 --- a/sickbeard/providers/thepiratebay.py +++ b/sickbeard/providers/thepiratebay.py @@ -203,8 +203,8 @@ class ThePirateBayProvider(generic.TorrentProvider): if abd: for show_name in set(allPossibleShowNames(show)): ep_string = sanitizeSceneName(show_name) + ' ' + \ - str(episode) + '|' + \ - helpers.custom_strftime('%Y %b {S}', episode) + str(episode).replace('-', '|') + '|' + \ + helpers.custom_strftime('%b', episode) search_string['Episode'].append(ep_string) else: for show_name in set(allPossibleShowNames(show)): diff --git a/sickbeard/providers/torrentday.py b/sickbeard/providers/torrentday.py index db9fe31c..b57f8bd4 100644 --- a/sickbeard/providers/torrentday.py +++ b/sickbeard/providers/torrentday.py @@ -36,6 +36,7 @@ from lib import requests from lib.requests import exceptions from bs4 import BeautifulSoup from lib.unidecode import unidecode +from sickbeard.helpers import sanitizeSceneName class TorrentDayProvider(generic.TorrentProvider): @@ -136,9 +137,9 @@ class TorrentDayProvider(generic.TorrentProvider): if abd: for show_name in set(show_name_helpers.allPossibleShowNames(show)): - ep_string = show_name_helpers.sanitizeSceneName(show_name) + ' ' + \ - str(episode) + '|' + \ - helpers.custom_strftime('%Y %b {S}', episode) + ep_string = sanitizeSceneName(show_name) + ' ' + \ + str(episode).replace('-', '|') + '|' + \ + helpers.custom_strftime('%b', episode) search_string['Episode'].append(ep_string) else: for show_name in set(show_name_helpers.allPossibleShowNames(show)): diff --git a/sickbeard/providers/torrentleech.py b/sickbeard/providers/torrentleech.py index 7fa648fd..ccee5562 100644 --- a/sickbeard/providers/torrentleech.py +++ b/sickbeard/providers/torrentleech.py @@ -118,9 +118,9 @@ class TorrentLeechProvider(generic.TorrentProvider): if abd: for show_name in set(show_name_helpers.allPossibleShowNames(show)): - ep_string = show_name_helpers.sanitizeSceneName(show_name) + ' ' + \ - str(episode) + '|' + \ - helpers.custom_strftime('%Y %b {S}', episode) + ep_string = sanitizeSceneName(show_name) + ' ' + \ + str(episode).replace('-', '|') + '|' + \ + helpers.custom_strftime('%b', episode) search_string['Episode'].append(ep_string) else: for show_name in set(show_name_helpers.allPossibleShowNames(show)):