diff --git a/data/interfaces/default/config_notifications.tmpl b/data/interfaces/default/config_notifications.tmpl index b34a8be3a72faa9a211a34e7b3d7c8d0f596ea6b..75f00a7aa0aa73f29ffc1fcbed6b1bfe1369864f 100755 --- a/data/interfaces/default/config_notifications.tmpl +++ b/data/interfaces/default/config_notifications.tmpl @@ -737,6 +737,16 @@ <span class="component-desc">User key of your Pushover account</span> </label> </div> + <div class="field-pair"> + <label class="nocheck clearfix"> + <span class="component-title">Pushover Prio</span> + <input type="text" name="pushover_prio" id="pushover_prio" value="$sickbeard.PUSHOVER_PRIO" size="35" /> + </label> + <label class="nocheck clearfix"> + <span class="component-title"> </span> + <span class="component-desc">Priority for pushover notification (-2,-1,0,1,2)</span> + </label> + </div> <div class="testNotification" id="testPushover-result">Click below to test.</div> <input class="btn" type="button" value="Test Pushover" id="testPushover" /> <input type="submit" class="config_submitter btn" value="Save Changes" /> diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py index 2111be01600bfa6cbee6f0c77d5334d5c9aefe73..ca77bffdbfc6fb1dc8bcde24d0db9b3091bf6d6e 100644 --- a/sickbeard/__init__.py +++ b/sickbeard/__init__.py @@ -345,6 +345,7 @@ PUSHOVER_NOTIFY_ONSNATCH = False PUSHOVER_NOTIFY_ONDOWNLOAD = False PUSHOVER_NOTIFY_ONSUBTITLEDOWNLOAD = False PUSHOVER_USERKEY = None +PUSHOVER_PRIO = None USE_LIBNOTIFY = False LIBNOTIFY_NOTIFY_ONSNATCH = False @@ -509,7 +510,7 @@ def initialize(consoleLogging=True): EXTRA_SCRIPTS, USE_TWITTER, TWITTER_USERNAME, TWITTER_PASSWORD, TWITTER_PREFIX, \ USE_BOXCAR, BOXCAR_USERNAME, BOXCAR_PASSWORD, BOXCAR_NOTIFY_ONDOWNLOAD, BOXCAR_NOTIFY_ONSUBTITLEDOWNLOAD, BOXCAR_NOTIFY_ONSNATCH, \ USE_BOXCAR2, BOXCAR2_ACCESS_TOKEN, BOXCAR2_NOTIFY_ONDOWNLOAD, BOXCAR2_NOTIFY_ONSUBTITLEDOWNLOAD, BOXCAR2_NOTIFY_ONSNATCH, BOXCAR2_SOUND, \ - USE_PUSHOVER, PUSHOVER_USERKEY, PUSHOVER_NOTIFY_ONDOWNLOAD, PUSHOVER_NOTIFY_ONSUBTITLEDOWNLOAD, PUSHOVER_NOTIFY_ONSNATCH, \ + USE_PUSHOVER, PUSHOVER_USERKEY,PUSHOVER_PRIO, PUSHOVER_NOTIFY_ONDOWNLOAD, PUSHOVER_NOTIFY_ONSUBTITLEDOWNLOAD, PUSHOVER_NOTIFY_ONSNATCH, \ USE_LIBNOTIFY, LIBNOTIFY_NOTIFY_ONSNATCH, LIBNOTIFY_NOTIFY_ONDOWNLOAD, LIBNOTIFY_NOTIFY_ONSUBTITLEDOWNLOAD, USE_NMJ, NMJ_HOST, NMJ_DATABASE, NMJ_MOUNT, USE_NMJv2, NMJv2_HOST, NMJv2_DATABASE, NMJv2_DBLOC, USE_SYNOINDEX, \ USE_BANNER, USE_LISTVIEW, METADATA_XBMC, METADATA_XBMCFRODO, METADATA_MEDIABROWSER, METADATA_PS3, METADATA_SYNOLOGY, metadata_provider_dict, \ NEWZBIN, NEWZBIN_USERNAME, NEWZBIN_PASSWORD, GIT_PATH, MOVE_ASSOCIATED_FILES, \ @@ -930,6 +931,7 @@ def initialize(consoleLogging=True): PUSHOVER_NOTIFY_ONDOWNLOAD = bool(check_setting_int(CFG, 'Pushover', 'pushover_notify_ondownload', 0)) PUSHOVER_NOTIFY_ONSUBTITLEDOWNLOAD = bool(check_setting_int(CFG, 'Pushover', 'pushover_notify_onsubtitledownload', 0)) PUSHOVER_USERKEY = check_setting_str(CFG, 'Pushover', 'pushover_userkey', '') + PUSHOVER_PRIO = check_setting_str(CFG, 'Pushover', 'pushover_prio', '') CheckSection(CFG, 'Pushbullet') USE_PUSHBULLET = bool(check_setting_int(CFG, 'Pushbullet', 'use_pushbullet', 0)) @@ -1685,6 +1687,7 @@ def save_config(): new_config['Pushover']['pushover_notify_ondownload'] = int(PUSHOVER_NOTIFY_ONDOWNLOAD) new_config['Pushover']['pushover_notify_onsubtitledownload'] = int(PUSHOVER_NOTIFY_ONSUBTITLEDOWNLOAD) new_config['Pushover']['pushover_userkey'] = PUSHOVER_USERKEY + new_config['Pushover']['pushover_prio'] = PUSHOVER_PRIO new_config['Pushbullet'] = {} new_config['Pushbullet']['use_pushbullet'] = int(USE_PUSHBULLET) diff --git a/sickbeard/common.py b/sickbeard/common.py index 83facaddd5264b7c69b65a8b30369659b950bc2b..4a3dc2cbead63c098ad646b73dd008d1165201e2 100644 --- a/sickbeard/common.py +++ b/sickbeard/common.py @@ -1,3 +1,4 @@ +# -*- coding: latin-1 -*- # Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # @@ -43,9 +44,9 @@ NOTIFY_DOWNLOAD = 2 NOTIFY_SUBTITLE_DOWNLOAD = 3 notifyStrings = {} -notifyStrings[NOTIFY_SNATCH] = "Started Download" -notifyStrings[NOTIFY_DOWNLOAD] = "Download Finished" -notifyStrings[NOTIFY_SUBTITLE_DOWNLOAD] = "Subtitle Download Finished" +notifyStrings[NOTIFY_SNATCH] = "Episode r�cup�r�" +notifyStrings[NOTIFY_DOWNLOAD] = "Episode t�l�charg�" +notifyStrings[NOTIFY_SUBTITLE_DOWNLOAD] = "Sous-titre t�l�charg�" ### Episode statuses UNKNOWN = -1 # should never happen diff --git a/sickbeard/notifiers/pushover.py b/sickbeard/notifiers/pushover.py index 74b07c44930dfa1b86d228d211d973fd8849b380..d5669551af133fc3e1eb596e80d5f48000e668a1 100644 --- a/sickbeard/notifiers/pushover.py +++ b/sickbeard/notifiers/pushover.py @@ -1,3 +1,4 @@ +# -*- coding: latin-1 -*- # Author: Marvin Pinto <me@marvinp.ca> # Author: Dennis Lutter <lad1337@gmail.com> # Author: Aaron Bieber <deftly@gmail.com> @@ -33,9 +34,9 @@ API_KEY = "OKCXmkvHN1syU2e8xvpefTnyvVWGv5" class PushoverNotifier: def test_notify(self, userKey=None): - return self._sendPushover("This is a test notification from SickBeard", 'Test', userKey ) + return self._sendPushover("Ceci est une notification de test venant de Sickbeard VO/VF (��)", 'Test', userKey ) - def _sendPushover(self, msg, title, userKey=None ): + def _sendPushover(self, msg, title, userKey=None): """ Sends a pushover notification to the address provided @@ -58,7 +59,8 @@ class PushoverNotifier: 'title': title, 'user': userKey, 'message': msg.encode('utf-8'), - 'timestamp': int(time.time()) + 'timestamp': int(time.time()), + 'priority': sickbeard.PUSHOVER_PRIO }) diff --git a/sickbeard/providers/libertalia.py b/sickbeard/providers/libertalia.py index ba2a252ef3a7fd75d30a4d7837221c7648975e7c..173c9eb6f68c7af806e9196c33f8f7ba2a670327 100644 --- a/sickbeard/providers/libertalia.py +++ b/sickbeard/providers/libertalia.py @@ -49,15 +49,23 @@ class LIBERTALIAProvider(generic.TorrentProvider): return sickbeard.LIBERTALIA def getSearchParams(self, searchString, audio_lang, french=None, fullSeason=False): - results = [] + results = [] + if fullSeason: + cat='9.2' + else: + cat='9' if audio_lang == "en" and french==None: results.append( urllib.urlencode( { 'name': searchString - } ) + "*VO*&cat%5B%5D=9&[PARAMSTR]=" + searchString +" VO" ) + } ) + "*VO*&cat%5B%5D="+cat+"&[PARAMSTR]=" + searchString +" VO" ) + elif audio_lang == "en" and french==None: + results.append( urllib.urlencode( { + 'name': searchString + } ) + "*VO*&cat%5B%5D="+cat+"&[PARAMSTR]=" + searchString +" VO" ) elif audio_lang == "fr" or french: results.append( urllib.urlencode( { 'name': searchString - } ) + "*FRENCH*&cat%5B%5D=9&[PARAMSTR]=" + searchString +" FRENCH") + } ) + "*FRENCH*&cat%5B%5D="+cat+"&[PARAMSTR]=" + searchString +" FRENCH") else: results.append( urllib.urlencode( { 'name': searchString @@ -70,14 +78,6 @@ class LIBERTALIAProvider(generic.TorrentProvider): showNames = list(set(showNam)) results = [] for showName in showNames: - results.extend( self.getSearchParams(showName + " saison%d" % season, show.audio_lang, fullSeason=True)) - results.extend( self.getSearchParams(showName + " season%d" % season, show.audio_lang, fullSeason=True)) - results.extend( self.getSearchParams(showName + " saison %d" % season, show.audio_lang, fullSeason=True)) - results.extend( self.getSearchParams(showName + " season %d" % season, show.audio_lang, fullSeason=True)) - results.extend( self.getSearchParams(showName + " saison%02d" % season, show.audio_lang, fullSeason=True)) - results.extend( self.getSearchParams(showName + " season%02d" % season, show.audio_lang, fullSeason=True)) - results.extend( self.getSearchParams(showName + " saison %02d" % season, show.audio_lang, fullSeason=True)) - results.extend( self.getSearchParams(showName + " season %02d" % season, show.audio_lang, fullSeason=True)) results.extend( self.getSearchParams(showName + ".S%02d." % season, show.audio_lang, fullSeason=True)) return results @@ -143,7 +143,7 @@ class LIBERTALIAProvider(generic.TorrentProvider): resultsTable = soup.find("table", { "class" : "torrent_table" }) if resultsTable: logger.log(u"LIBERTALIA found resulttable ! " , logger.DEBUG) - rows = resultsTable.findAll("tr" , {"class" : "torrent_row new"} ) # torrent_row new + rows = resultsTable.findAll("tr" , {"class" : "torrent_row new "} ) # torrent_row new for row in rows: diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 37da2e229d615aa1523024b8e3b9b9bd389cda12..2a6a9e2982163a3cb70ee145fe3d6b4fd9ced908 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -1530,7 +1530,7 @@ class ConfigNotifications: use_twitter=None, twitter_notify_onsnatch=None, twitter_notify_ondownload=None, twitter_notify_onsubtitledownload=None, use_boxcar=None, boxcar_notify_onsnatch=None, boxcar_notify_ondownload=None, boxcar_notify_onsubtitledownload=None, boxcar_username=None, use_boxcar2=None, boxcar2_notify_onsnatch=None, boxcar2_notify_ondownload=None, boxcar2_notify_onsubtitledownload=None, boxcar2_access_token=None, boxcar2_sound=None, - use_pushover=None, pushover_notify_onsnatch=None, pushover_notify_ondownload=None, pushover_notify_onsubtitledownload=None, pushover_userkey=None, + use_pushover=None, pushover_notify_onsnatch=None, pushover_notify_ondownload=None, pushover_notify_onsubtitledownload=None, pushover_userkey=None, pushover_prio=None, use_libnotify=None, libnotify_notify_onsnatch=None, libnotify_notify_ondownload=None, libnotify_notify_onsubtitledownload=None, use_nmj=None, nmj_host=None, nmj_database=None, nmj_mount=None, use_synoindex=None, use_nmjv2=None, nmjv2_host=None, nmjv2_dbloc=None, nmjv2_database=None, @@ -1938,6 +1938,7 @@ class ConfigNotifications: sickbeard.PUSHOVER_NOTIFY_ONDOWNLOAD = pushover_notify_ondownload sickbeard.PUSHOVER_NOTIFY_ONSUBTITLEDOWNLOAD = pushover_notify_onsubtitledownload sickbeard.PUSHOVER_USERKEY = pushover_userkey + sickbeard.PUSHOVER_PRIO = pushover_prio sickbeard.USE_LIBNOTIFY = use_libnotify == "on" sickbeard.LIBNOTIFY_NOTIFY_ONSNATCH = libnotify_notify_onsnatch == "on"