From 4c5ea1a5ebc181c198b323f92a5a381bf6d3ff34 Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Mon, 5 May 2014 18:20:49 -0400 Subject: [PATCH 1/2] Fixes notification about XBMC host not being passed. Fixes echel0n/SickRage#389 --- sickbeard/notifiers/plex.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sickbeard/notifiers/plex.py b/sickbeard/notifiers/plex.py index 2b4dd9eb..32b37080 100644 --- a/sickbeard/notifiers/plex.py +++ b/sickbeard/notifiers/plex.py @@ -37,7 +37,11 @@ class PLEXNotifier(XBMCNotifier): def _notify_pmc(self, message, title="Sick Beard", host=None, username=None, password=None, force=False): # fill in omitted parameters if not host: - host = sickbeard.PLEX_HOST + if sickbeard.PLEX_HOST: + host = sickbeard.PLEX_HOST # Use the default Plex host + else: + logger.log(u"No Plex host specified, check your settings", logger.DEBUG) + return False if not username: username = sickbeard.PLEX_USERNAME if not password: From 1398c38275f25f168c9961edb439f808bdabd44c Mon Sep 17 00:00:00 2001 From: echel0n Date: Sun, 11 May 2014 05:49:07 -0700 Subject: [PATCH 2/2] Fix for manual and backlog download/search issues. Removed multi-threading as it was more problems then usefull for now. Added in match & snatch, any quality from initial quality settings gets downloaded first and does not continue searching, if archive qualities exist it'll stop once it hits max quality from said list. --- gui/slick/interfaces/default/inc_bottom.tmpl | 4 +- lib/concurrent/futures/thread.py | 16 +- sickbeard/__init__.py | 38 +-- sickbeard/config.py | 1 - sickbeard/db.py | 2 + sickbeard/generic_queue.py | 15 +- sickbeard/name_parser/parser.py | 1 - sickbeard/providers/btn.py | 5 +- sickbeard/providers/generic.py | 4 +- sickbeard/providers/hdtorrents.py | 7 +- sickbeard/providers/iptorrents.py | 7 +- sickbeard/providers/kat.py | 8 +- sickbeard/providers/newznab.py | 56 ++++ sickbeard/providers/nextgen.py | 7 +- sickbeard/providers/publichd.py | 2 +- sickbeard/providers/scc.py | 7 +- sickbeard/providers/speedcd.py | 2 +- sickbeard/providers/thepiratebay.py | 7 +- sickbeard/providers/torrentday.py | 7 +- sickbeard/providers/torrentleech.py | 7 +- sickbeard/search.py | 7 +- sickbeard/search_queue.py | 275 +++++-------------- sickbeard/show_queue.py | 15 +- sickbeard/snatch_queue.py | 83 ++++++ sickbeard/tvcache.py | 141 ++++++---- sickbeard/webapi.py | 26 +- sickbeard/webserve.py | 13 - 27 files changed, 362 insertions(+), 401 deletions(-) create mode 100644 sickbeard/snatch_queue.py diff --git a/gui/slick/interfaces/default/inc_bottom.tmpl b/gui/slick/interfaces/default/inc_bottom.tmpl index 2ef35410..fd44b668 100644 --- a/gui/slick/interfaces/default/inc_bottom.tmpl +++ b/gui/slick/interfaces/default/inc_bottom.tmpl @@ -13,9 +13,7 @@ #set $numGoodShows = len([x for x in $sickbeard.showList if x.paused == 0 and x.status != "Ended"]) #set $numDLEpisodes = $myDB.select("SELECT COUNT(*) FROM tv_episodes WHERE status IN ("+",".join([str(x) for x in $Quality.DOWNLOADED + [$ARCHIVED]])+") AND season != 0 and episode != 0 AND airdate <= "+$today+"")[0][0] #set $numEpisodes = $myDB.select("SELECT COUNT(*) FROM tv_episodes WHERE season != 0 and episode != 0 AND (airdate != 1 OR status IN ("+",".join([str(x) for x in ($Quality.DOWNLOADED + $Quality.SNATCHED + $Quality.SNATCHED_PROPER) + [$ARCHIVED]])+")) AND airdate <= "+$today+" AND status != "+str($IGNORED)+"")[0][0] -$numShows shows ($numGoodShows active) | $numDLEpisodes/$numEpisodes episodes downloaded | -Search: <%=str(sickbeard.currentSearchScheduler.timeLeft()).split('.')[0]%> | - +$numShows shows ($numGoodShows active) | $numDLEpisodes/$numEpisodes episodes downloaded | Backlog: $sbdatetime.sbdatetime.sbfdate($sickbeard.backlogSearchScheduler.nextRun())