diff --git a/autoProcessTV/autoProcessTV.py b/autoProcessTV/autoProcessTV.py index c784f374..d9c0244a 100644 --- a/autoProcessTV/autoProcessTV.py +++ b/autoProcessTV/autoProcessTV.py @@ -49,7 +49,7 @@ else: HTTPBasicAuthHandler = urllib2.HTTPBasicAuthHandler -def processEpisode(dir_to_process, org_NZB_name=None): +def processEpisode(dir_to_process, org_NZB_name=None, status=None): # Default values host = "localhost" port = "8081" @@ -117,6 +117,9 @@ def processEpisode(dir_to_process, org_NZB_name=None): if org_NZB_name != None: params['nzbName'] = org_NZB_name + if status != None: + params['failed'] = status + if ssl: protocol = "https://" else: diff --git a/sickbeard/metadata/wdtv.py b/sickbeard/metadata/wdtv.py index 1ef8418e..00ad1a7f 100644 --- a/sickbeard/metadata/wdtv.py +++ b/sickbeard/metadata/wdtv.py @@ -265,9 +265,8 @@ class WDTVMetadata(generic.GenericMetadata): genre.text = " / ".join([x for x in myShow["genre"].split('|') if x]) director = etree.SubElement(episode, "director") - if getattr(myEp, 'director', None) is not None: - director_text = myEp['director'] - if director_text != None: + director_text = getattr(myEp, 'director', None) + if director_text is not None: director.text = director_text if getattr(myShow, '_actors', None) is not None: diff --git a/sickbeard/metadata/xbmc_12plus.py b/sickbeard/metadata/xbmc_12plus.py index 64106ccf..7623fd54 100644 --- a/sickbeard/metadata/xbmc_12plus.py +++ b/sickbeard/metadata/xbmc_12plus.py @@ -330,7 +330,7 @@ class XBMC_12PlusMetadata(generic.GenericMetadata): director = etree.SubElement(episode, "director") director_text = getattr(myEp, 'director', None) - if director_text != None: + if director_text is not None: director.text = director_text rating = etree.SubElement(episode, "rating") diff --git a/sickbeard/providers/rsstorrent.py b/sickbeard/providers/rsstorrent.py index 0b417fde..b1171589 100644 --- a/sickbeard/providers/rsstorrent.py +++ b/sickbeard/providers/rsstorrent.py @@ -127,7 +127,7 @@ class TorrentRssProvider(generic.TorrentProvider): except Exception, e: return (False, 'Error when trying to load RSS: ' + ex(e)) - def getURL(self, url, headers=None): + def getURL(self, url, post_data=None, headers=None): if not self.session: self.session = requests.Session()