Commit ac8abc60 authored by echel0n's avatar echel0n
Browse files

Merge branch 'release/10.0.44'

parents 03dbfb10 43cf92f6
...@@ -2,8 +2,12 @@ ...@@ -2,8 +2,12 @@
   
All notable changes to this project will be documented in this file. Dates are displayed in UTC. All notable changes to this project will be documented in this file. Dates are displayed in UTC.
   
#### [10.0.44](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.43...10.0.44)
#### [10.0.43](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.42...10.0.43) #### [10.0.43](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.42...10.0.43)
   
> 3 October 2021
#### [10.0.42](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.41...10.0.42) #### [10.0.42](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.41...10.0.42)
   
> 3 October 2021 > 3 October 2021
......
{ {
"name": "sickrage", "name": "sickrage",
"version": "10.0.43", "version": "10.0.44",
"private": true, "private": true,
"repository": { "repository": {
"type": "git", "type": "git",
......
[bumpversion] [bumpversion]
current_version = 10.0.43 current_version = 10.0.44
commit = False commit = False
tag = False tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<dev>\d+))? parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<dev>\d+))?
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
# along with SiCKRAGE. If not, see <http://www.gnu.org/licenses/>. # along with SiCKRAGE. If not, see <http://www.gnu.org/licenses/>.
# ############################################################################## # ##############################################################################
__version__ = "10.0.43" __version__ = "10.0.44"
__install_type__ = "" __install_type__ = ""
import argparse import argparse
......
This diff is collapsed.
...@@ -444,6 +444,10 @@ class API(object): ...@@ -444,6 +444,10 @@ class API(object):
endpoint = f'series-provider/{provider}/search/{query}/{language}' endpoint = f'series-provider/{provider}/search/{query}/{language}'
return self.api.request('GET', endpoint) return self.api.request('GET', endpoint)
def search_by_id(self, provider, remote_id, language='eng'):
endpoint = f'series-provider/{provider}/search-by-id/{remote_id}/{language}'
return self.api.request('GET', endpoint)
def get_series_info(self, provider, series_id, language='eng'): def get_series_info(self, provider, series_id, language='eng'):
endpoint = f'series-provider/{provider}/series/{series_id}/{language}' endpoint = f'series-provider/{provider}/series/{series_id}/{language}'
return self.api.request('GET', endpoint) return self.api.request('GET', endpoint)
......
...@@ -315,8 +315,10 @@ class AddShowByIDHandler(BaseHandler): ...@@ -315,8 +315,10 @@ class AddShowByIDHandler(BaseHandler):
show_name = self.get_argument('showName') show_name = self.get_argument('showName')
if re.search(r'tt\d+', series_id): if re.search(r'tt\d+', series_id):
result = sickrage.app.series_providers[SeriesProviderID.THETVDB].search(series_id) result = sickrage.app.series_providers[SeriesProviderID.THETVDB].search_by_id(series_id)
if result and 'id' in result: if not result:
return
series_id = int(result['id']) series_id = int(result['id'])
if find_show(int(series_id), SeriesProviderID.THETVDB): if find_show(int(series_id), SeriesProviderID.THETVDB):
......
...@@ -81729,7 +81729,7 @@ var debugs = {}; ...@@ -81729,7 +81729,7 @@ var debugs = {};
var debugEnviron; var debugEnviron;
exports.debuglog = function(set) { exports.debuglog = function(set) {
if (isUndefined(debugEnviron)) if (isUndefined(debugEnviron))
debugEnviron = Object({"SENTRY_DSN":'https://[email protected]/2',"PACKAGE_VERSION":"10.0.43"}).NODE_DEBUG || ''; debugEnviron = Object({"SENTRY_DSN":'https://[email protected]/2',"PACKAGE_VERSION":"10.0.44"}).NODE_DEBUG || '';
set = set.toUpperCase(); set = set.toUpperCase();
if (!debugs[set]) { if (!debugs[set]) {
if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
...@@ -82538,7 +82538,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de ...@@ -82538,7 +82538,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
   
Sentry.init({ Sentry.init({
dsn: 'https://[email protected]/2', dsn: 'https://[email protected]/2',
release: "10.0.43", release: "10.0.44",
beforeSend: function beforeSend(event, hint) { beforeSend: function beforeSend(event, hint) {
if (event.exception) { if (event.exception) {
event.exception.values[0].stacktrace.frames.forEach(function (frame) { event.exception.values[0].stacktrace.frames.forEach(function (frame) {
...@@ -61,20 +61,34 @@ class TheTVDB(SeriesProvider): ...@@ -61,20 +61,34 @@ class TheTVDB(SeriesProvider):
self.dvd_order = False self.dvd_order = False
def search(self, query, language='eng'): def search(self, query, language='eng'):
"""This searches TheTVDB.com for the series by name, seriesid, imdbid, or zap2itid """
and returns the result list This searches TheTVDB.com for the series by name and returns the result list
""" """
sickrage.app.log.debug(f"Searching for show using query term: {query}") sickrage.app.log.debug(f"Searching for show using query term: {query}")
search_result = sickrage.app.api.series_provider.search(provider=self.slug, query=quote(query), language=language) search_results = sickrage.app.api.series_provider.search(provider=self.slug, query=quote(query), language=language)
if not search_result: if not search_results:
sickrage.app.log.debug(f'Series search using query term {query} returned zero results, cannot find series on {self.name}') sickrage.app.log.debug(f'Series search using query term {query} returned zero results, cannot find series on {self.name}')
return search_results
def search_by_id(self, remote_id, language='eng'):
"""
This searches TheTVDB.com for the seriesid, imdbid, or zap2itid and returns the result list
"""
sickrage.app.log.debug(f"Searching for show using remote id: {remote_id}")
search_result = sickrage.app.api.series_provider.search_by_id(provider=self.slug, remote_id=quote(remote_id), language=language)
if not search_result:
sickrage.app.log.debug(f'Series search using remote id {remote_id} returned zero results, cannot find series on {self.name}')
return search_result return search_result
def get_series_info(self, sid, language='eng', dvd_order=False, enable_cache=True): def get_series_info(self, sid, language='eng', dvd_order=False, enable_cache=True):
"""Takes a series ID, gets the episodes URL and parses the TVDB """
Takes a series id, gets the episodes URL and parses the TVDB
""" """
# check if series is in cache # check if series is in cache
...@@ -169,11 +183,11 @@ class TheTVDB(SeriesProvider): ...@@ -169,11 +183,11 @@ class TheTVDB(SeriesProvider):
if season: if season:
image_url = series_info[season].imageUrl image_url = series_info[season].imageUrl
if image_url != '': if image_url != '':
images.append(image_url) images.append({'image': image_url})
else: else:
image_url = series_info.imageUrl image_url = series_info.imageUrl
if image_url != '': if image_url != '':
images.append(image_url) images.append({'image': image_url})
return images return images
......
10.0.43 10.0.44
\ No newline at end of file \ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment