Commit 427927ec authored by echel0n's avatar echel0n
Browse files

Merge branch 'release/9.3.98'

parents 1805fe68 e3b3be9f
# Changelog
- * d7e782f - 2018-10-21: Release v9.3.97
- * 4be64d5 - 2018-10-21: Release v9.3.98
- * d5ec001 - 2018-10-21: Fixed issues with matching shows with parsed results when containing accents
- * 84de9fe - 2018-10-21: Release v9.3.97
- * a5f7b6a - 2018-10-21: Fixed issues with network timezones
- * af471d1 - 2018-10-21: Added API denied handling
- * f37d3db - 2018-10-17: Fixed typo for API notification retrieval
......
......@@ -21,6 +21,7 @@ from __future__ import unicode_literals
import os
import re
import time
import unicodedata
from collections import OrderedDict
from threading import Lock
......@@ -63,45 +64,46 @@ class NameParser(object):
if not all([name, sickrage.app.showlist]):
return show, show_id
def cache_lookup(name):
return sickrage.app.name_cache.get(name)
def cache_lookup(show_name):
return sickrage.app.name_cache.get(show_name)
def scene_exception_lookup(name):
return get_scene_exception_by_name(name)[0]
def scene_exception_lookup(show_name):
return get_scene_exception_by_name(show_name)[0]
def indexer_lookup(name):
show_id1 = int(IndexerApi().searchForShowID(full_sanitizeSceneName(name))[2])
show_id2 = int(srTraktAPI()['search'].query(full_sanitizeSceneName(name), 'show')[0].ids['tvdb'])
def indexer_lookup(show_name):
show_id1 = int(IndexerApi().searchForShowID(full_sanitizeSceneName(show_name))[2])
show_id2 = int(srTraktAPI()['search'].query(full_sanitizeSceneName(show_name), 'show')[0].ids['tvdb'])
return (None, show_id1)[show_id1 == show_id2]
lookup_list = [
lambda: cache_lookup(name),
lambda: scene_exception_lookup(name),
lambda: indexer_lookup(name),
]
for x in [unicodedata.normalize('NFKD', name).encode('ASCII', 'ignore'), name]:
lookup_list = [
lambda: cache_lookup(x),
lambda: scene_exception_lookup(x),
lambda: indexer_lookup(x),
]
# lookup show id
for lookup in lookup_list:
if show or show_id is not None:
continue
try:
show_id = int(lookup())
if show_id == 0:
# lookup show id
for lookup in lookup_list:
if show or show_id is not None:
continue
sickrage.app.name_cache.put(name, show_id)
if self.validate_show:
show = findCertainShow(show_id)
else:
from sickrage.core.tv.show import TVShow
show = TVShow(1, show_id)
except Exception:
pass
if show_id is None:
# ignore show name by caching it with a indexerid of 0
sickrage.app.name_cache.put(name, 0)
try:
show_id = int(lookup())
if show_id == 0:
continue
sickrage.app.name_cache.put(x, show_id)
if self.validate_show:
show = findCertainShow(show_id)
else:
from sickrage.core.tv.show import TVShow
show = TVShow(1, show_id)
except Exception:
pass
if show_id is None:
# ignore show name by caching it with a indexerid of 0
sickrage.app.name_cache.put(x, 0)
return show, show_id or 0
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-10-21 01:13-0700\n"
"PO-Revision-Date: 2018-10-21 08:14\n"
"POT-Creation-Date: 2018-10-21 08:47-0700\n"
"PO-Revision-Date: 2018-10-21 15:48\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Arabic\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-10-21 01:13-0700\n"
"PO-Revision-Date: 2018-10-21 08:14\n"
"POT-Creation-Date: 2018-10-21 08:47-0700\n"
"PO-Revision-Date: 2018-10-21 15:48\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Catalan\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-10-21 01:13-0700\n"
"PO-Revision-Date: 2018-10-21 08:14\n"
"POT-Creation-Date: 2018-10-21 08:47-0700\n"
"PO-Revision-Date: 2018-10-21 15:48\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Czech\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-10-21 01:13-0700\n"
"PO-Revision-Date: 2018-10-21 08:14\n"
"POT-Creation-Date: 2018-10-21 08:47-0700\n"
"PO-Revision-Date: 2018-10-21 15:48\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Danish\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-10-21 01:13-0700\n"
"PO-Revision-Date: 2018-10-21 08:14\n"
"POT-Creation-Date: 2018-10-21 08:47-0700\n"
"PO-Revision-Date: 2018-10-21 15:48\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-10-21 01:13-0700\n"
"PO-Revision-Date: 2018-10-21 08:14\n"
"POT-Creation-Date: 2018-10-21 08:47-0700\n"
"PO-Revision-Date: 2018-10-21 15:48\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Greek\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-10-21 01:13-0700\n"
"PO-Revision-Date: 2018-10-21 08:15\n"
"POT-Creation-Date: 2018-10-21 08:47-0700\n"
"PO-Revision-Date: 2018-10-21 15:50\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: English\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-10-21 01:13-0700\n"
"PO-Revision-Date: 2018-10-21 08:14\n"
"POT-Creation-Date: 2018-10-21 08:47-0700\n"
"PO-Revision-Date: 2018-10-21 15:48\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Spanish\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-10-21 01:13-0700\n"
"PO-Revision-Date: 2018-10-21 08:14\n"
"POT-Creation-Date: 2018-10-21 08:47-0700\n"
"PO-Revision-Date: 2018-10-21 15:48\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Finnish\n"
"MIME-Version: 1.0\n"
......
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