From dce40c487f6a06a160b32a627cf3328c5f986e4d Mon Sep 17 00:00:00 2001 From: Fernando Date: Sun, 16 Nov 2014 12:32:46 -0200 Subject: [PATCH 1/4] Add provider name to notifiers when snatch an episode --- sickbeard/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sickbeard/search.py b/sickbeard/search.py index 9fd25039..decdf50a 100644 --- a/sickbeard/search.py +++ b/sickbeard/search.py @@ -167,7 +167,7 @@ def snatchEpisode(result, endStatus=SNATCHED): sql_l.append(curEpObj.get_sql()) if curEpObj.status not in Quality.DOWNLOADED: - notifiers.notify_snatch(curEpObj._format_pattern('%SN - %Sx%0E - %EN - %QN')) + notifiers.notify_snatch(curEpObj._format_pattern('%SN - %Sx%0E - %EN - %QN') + " from " + result.provider.name) if len(sql_l) > 0: myDB = db.DBConnection() From 37012dd331cdd0cf3f433cf3a9c1544bfc28c4be Mon Sep 17 00:00:00 2001 From: Fernando Date: Fri, 21 Nov 2014 14:47:06 -0200 Subject: [PATCH 2/4] [New GUI] Prevent Airdate column to wrap As I posted here: https://sickrage.tv/forums/forum/main-category/latest-news/8894-feedback-on-new-skin?p=11055#post11055 Next Ep Name must wrap. Some shows has a too long description: "Charlie and the Terrible, Horrible, No Good, Very Bad Thanksgiving" for example. Working on Chrome and IE --- gui/slick/interfaces/default/comingEpisodes.tmpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/slick/interfaces/default/comingEpisodes.tmpl b/gui/slick/interfaces/default/comingEpisodes.tmpl index e278593b..6d8ef27d 100644 --- a/gui/slick/interfaces/default/comingEpisodes.tmpl +++ b/gui/slick/interfaces/default/comingEpisodes.tmpl @@ -167,7 +167,7 @@ Airdate Show - Next Ep + Next Ep Next Ep Name Network Quality @@ -206,17 +206,17 @@ ## forced to use a div to wrap airdate, the column sort went crazy with a span - +
$sbdatetime.sbdatetime.sbfdatetime($cur_result['localtime']).decode($sickbeard.SYS_ENCODING)
$time.mktime($cur_result['localtime'].timetuple()) - $cur_result['show_name'] + $cur_result['show_name'] #if int($cur_result['paused']): [paused] #end if - + <%= 'S%02iE%02i' % (int(cur_result['season']), int(cur_result['episode'])) %> From 13ecfd027afd044e54364ab12b2cfaefe7363e50 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 21 Nov 2014 22:10:19 +0100 Subject: [PATCH 3/4] Add location, filesize, subtitles and releasename to Show.Seasons --- sickbeard/webapi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sickbeard/webapi.py b/sickbeard/webapi.py index 71f8683c..1240b59d 100644 --- a/sickbeard/webapi.py +++ b/sickbeard/webapi.py @@ -2313,7 +2313,7 @@ class CMD_ShowSeasons(ApiCall): myDB = db.DBConnection(row_type="dict") if self.season == None: - sqlResults = myDB.select("SELECT name, episode, airdate, status, season FROM tv_episodes WHERE showid = ?", + sqlResults = myDB.select("SELECT name, episode, airdate, status, release_name, season, location, file_size, subtitles FROM tv_episodes WHERE showid = ?", [self.indexerid]) seasons = {} for row in sqlResults: @@ -2332,7 +2332,7 @@ class CMD_ShowSeasons(ApiCall): else: sqlResults = myDB.select( - "SELECT name, episode, airdate, status FROM tv_episodes WHERE showid = ? AND season = ?", + "SELECT name, episode, airdate, status, location, file_size, release_name, subtitles FROM tv_episodes WHERE showid = ? AND season = ?", [self.indexerid, self.season]) if len(sqlResults) is 0: return _responds(RESULT_FAILURE, msg="Season not found") From 6002722c7ea2e43817eee4ef74f1b81ef2f97695 Mon Sep 17 00:00:00 2001 From: Fernando Date: Sat, 22 Nov 2014 11:49:19 -0200 Subject: [PATCH 4/4] Fix invalid continuation byte for webapi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I get this error when using API: {"result":"error", "message": "error while composing output: "utf8 : terça 9:00 : error 3 : error 4 : invalid continuation byte"} There's a special char "TERÇA" Don't know why this happens. I had a special date style and even after change it to "yyyy-mm-dd" this error still happens. Don't know why the api builder is still using the translated week day. Also timezone is set to "network" This error only happens when missing/future has "terça" - Tuesday and "sábado" - saturday weekdays. The other week days there's no special char. --- sickbeard/webapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sickbeard/webapi.py b/sickbeard/webapi.py index 71f8683c..bfd051fa 100644 --- a/sickbeard/webapi.py +++ b/sickbeard/webapi.py @@ -163,7 +163,7 @@ class Api(webserve.MainHandler): def _out_as_json(self, dict): self.set_header("Content-Type", "application/json") try: - out = json.dumps(dict, indent=self.intent, sort_keys=True) + out = json.dumps(dict, indent=self.intent,ensure_ascii=False,sort_keys=True) if 'jsonp' in self.request.query_arguments: out = self.request.arguments['jsonp'] + '(' + out + ');' # wrap with JSONP call if requested