Commit cc74e2e9 authored by echel0n's avatar echel0n
Browse files

Merge branch 'release/9.3.65'

parents 9f0f478a ab769b0e
# Changelog
- * 1ad5bd8 - 2018-08-29: Release v9.3.64
- * 9098c26 - 2018-08-30: Release v9.3.65
- * 889fa19 - 2018-08-30: Fixed issues with failed snatch searcher attempting to re-download archived episodes
- * cd59c7f - 2018-08-30: Pre-Release v9.3.65.dev3
- * 61c0376 - 2018-08-30: Pre-Release v9.3.65.dev2
- * a534896 - 2018-08-30: Pre-Release v9.3.65.dev1
- * 9d880bd - 2018-08-30: Failed processing skips paused shows and archived episodes.
- * fbc8814 - 2018-08-30: Removed unrequired logging from AniDB module
- * dc90396 - 2018-08-29: Release v9.3.64
- * 0c2e95d - 2018-08-27: Release v9.3.63
- * 9e66cf5 - 2018-08-27: Fixed javascript issue when adding existing shows
- * 6b01822 - 2018-08-27: Release v9.3.62
......
......@@ -19,6 +19,7 @@
from __future__ import print_function, unicode_literals
import sickrage
from sickrage.core.common import Quality, WANTED, DOWNLOADED, SNATCHED, SNATCHED_PROPER, SNATCHED_BEST
from sickrage.core.exceptions import FailedPostProcessingFailedException
from sickrage.core.helpers import show_names
from sickrage.core.nameparser import InvalidNameException, InvalidShowException, \
......@@ -47,19 +48,23 @@ class FailedProcessor(object):
"""
self._log("Failed download detected: (" + str(self.nzb_name) + ", " + str(self.dir_name) + ")")
releaseName = show_names.determineReleaseName(self.dir_name, self.nzb_name)
if releaseName is None:
release_name = show_names.determineReleaseName(self.dir_name, self.nzb_name)
if release_name is None:
self._log("Warning: unable to find a valid release name.", sickrage.app.log.WARNING)
raise FailedPostProcessingFailedException()
try:
parser = NameParser(False)
parsed = parser.parse(releaseName)
parsed = NameParser(False).parse(release_name)
except InvalidNameException:
self._log("Error: release name is invalid: " + releaseName, sickrage.app.log.DEBUG)
self._log("Error: release name is invalid: " + release_name, sickrage.app.log.DEBUG)
raise FailedPostProcessingFailedException()
except InvalidShowException:
self._log("Error: unable to parse release name " + releaseName + " into a valid show",
self._log("Error: unable to parse release name " + release_name + " into a valid show",
sickrage.app.log.DEBUG)
raise FailedPostProcessingFailedException()
if parsed.show.paused:
self._log("Warning: skipping failed processing for {} because the show is paused".format(release_name),
sickrage.app.log.DEBUG)
raise FailedPostProcessingFailedException()
......@@ -72,8 +77,13 @@ class FailedProcessor(object):
sickrage.app.log.debug(" - " + str(parsed.air_date))
for episode in parsed.episode_numbers:
sickrage.app.search_queue.put(
FailedQueueItem(parsed.show, [parsed.show.getEpisode(parsed.season_number, episode)]))
segment = parsed.show.getEpisode(parsed.season_number, episode)
curStatus, curQuality = Quality.splitCompositeStatus(segment.status)
if curStatus not in {SNATCHED, SNATCHED_BEST, SNATCHED_PROPER}:
continue
sickrage.app.search_queue.put(FailedQueueItem(parsed.show, [segment]))
return True
......
......@@ -235,26 +235,25 @@ class BacklogQueueItem(srQueueItem):
def run(self):
self.started = True
if not self.show.paused:
try:
sickrage.app.log.info("Starting backlog search for: [" + self.show.name + "]")
search_result = searchProviders(self.show, self.segment, manualSearch=False, updateCache=False)
if search_result:
for result in search_result:
# just use the first result for now
sickrage.app.log.info("Downloading " + result.name + " from " + result.provider.name)
snatchEpisode(result)
# give the CPU a break
time.sleep(cpu_presets[sickrage.app.config.cpu_preset])
else:
sickrage.app.log.info(
"No needed episodes found during backlog search for: [" + self.show.name + "]")
except Exception:
sickrage.app.log.debug(traceback.format_exc())
finally:
sickrage.app.log.info("Finished backlog search for: [" + self.show.name + "]")
try:
sickrage.app.log.info("Starting backlog search for: [" + self.show.name + "]")
search_result = searchProviders(self.show, self.segment, manualSearch=False, updateCache=False)
if search_result:
for result in search_result:
# just use the first result for now
sickrage.app.log.info("Downloading " + result.name + " from " + result.provider.name)
snatchEpisode(result)
# give the CPU a break
time.sleep(cpu_presets[sickrage.app.config.cpu_preset])
else:
sickrage.app.log.info(
"No needed episodes found during backlog search for: [" + self.show.name + "]")
except Exception:
sickrage.app.log.debug(traceback.format_exc())
finally:
sickrage.app.log.info("Finished backlog search for: [" + self.show.name + "]")
class FailedQueueItem(srQueueItem):
......@@ -278,6 +277,7 @@ class FailedQueueItem(srQueueItem):
sickrage.app.log.info("Marking episode as bad: [" + epObj.pretty_name() + "]")
FailedHistory.markFailed(epObj)
(release, provider) = FailedHistory.findFailedRelease(epObj)
if release:
FailedHistory.logFailed(release)
......
......@@ -24,7 +24,7 @@ import threading
import sickrage
from sickrage.core import findCertainShow
from sickrage.core.common import Quality
from sickrage.core.common import Quality, SNATCHED, SNATCHED_BEST, SNATCHED_PROPER
from sickrage.core.queues.search import FailedQueueItem
from sickrage.core.tv.episode import TVEpisode
from sickrage.core.tv.show.history import FailedHistory, History
......@@ -79,6 +79,10 @@ class FailedSnatchSearcher(object):
ep_obj = show.getEpisode(int(episode['season']), int(episode['episode']))
if isinstance(ep_obj, TVEpisode):
curStatus, curQuality = Quality.splitCompositeStatus(ep_obj.status)
if curStatus not in {SNATCHED, SNATCHED_BEST, SNATCHED_PROPER}:
continue
# put it on the queue
sickrage.app.search_queue.put(FailedQueueItem(show, [ep_obj], True))
......
......@@ -52,12 +52,14 @@
% endif
</td>
<td class="table-fit">
% if hItem["provider"].lower() in sickrage.app.search_providers.all():
<% provider = sickrage.app.search_providers.all()[hItem["provider"].lower()] %>
% if provider is not None:
<i class="sickrage-providers sickrage-providers-${provider.id}"
title="${provider.name}"></i>
title="${provider.name}"
style="vertical-align:middle;cursor: help;"></i>
% else:
<i class="sickrage-providers sickrage-providers-missing"
style="vertical-align:middle;"
title="${_('missing provider')}"></i>
% endif
</td>
......@@ -69,7 +71,7 @@
</tbody>
</table>
</div>
<input type="button" class="btn" value="${_('Submit')}"
<input type="button" class="btn" value="${_('Clear')}"
id="submitMassRemove">
</div>
</div>
......
......@@ -147,7 +147,6 @@ class Connection(threading.Thread):
def _reAuthenticate(self):
if self._username and self._password:
self.log("auto re authenticating !")
resp = self.auth(self._username, self._password)
if resp.rescode not in ('500'):
return True
......@@ -156,11 +155,9 @@ class Connection(threading.Thread):
def _keep_alive(self):
self.lastKeepAliveCheck = time()
self.log("auto check !")
# check every 30 minutes if the session is still valid
# if not reauthenticate
if self.lastAuth and time() - self.lastAuth > 1800:
self.log("auto uptime !")
self.uptime() # this will update the self.link.session and will refresh the session if it is still alive
if self.authed(): # if we are authed we set the time
......@@ -171,7 +168,6 @@ class Connection(threading.Thread):
# issue a ping every 20 minutes after the last package
# this ensures the connection will be kept alive
if self.link.lastpacket and time() - self.link.lastpacket > 1200:
self.log("auto ping !")
self.ping()
......@@ -192,20 +188,13 @@ class Connection(threading.Thread):
mtu - maximum transmission unit (max packet size) (default: 1400)
"""
self.log("ok1")
if self.keepAlive:
self.log("ok2")
self._username = username
self._password = password
if self.is_alive() == False:
self.log("You wanted to keep this thing alive!")
if self._iamALIVE == False:
self.log("Starting thread now...")
self.start()
self._iamALIVE = True
else:
self.log("not starting thread seams like it is already running. this must be a _reAuthenticate")
self.lastAuth = time()
return self.handle(AuthCommand(username, password, 3, self.clientname, self.clientver, nat, 1, 'utf8', mtu), callback)
......
......@@ -119,8 +119,7 @@ class AniDBLink(threading.Thread):
if resp.rescode in ('200', '201'):
self.session = resp.attrs['sesskey']
if resp.rescode in ('209',):
print "sorry encryption is not supported"
raise
raise Exception, "sorry encryption is not supported"
#self.crypt=aes(md5(resp.req.apipassword+resp.attrs['salt']).digest())
if resp.rescode in ('203', '403', '500', '501', '503', '506'):
self.session = None
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-08-29 22:35-0700\n"
"PO-Revision-Date: 2018-08-30 05:35\n"
"POT-Creation-Date: 2018-08-30 20:34-0700\n"
"PO-Revision-Date: 2018-08-31 03:34\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Arabic\n"
"MIME-Version: 1.0\n"
......@@ -414,6 +414,7 @@ msgid "Response:"
msgstr "الرد:"
#: sickrage/core/webserver/views/api_builder.mako:137
#: sickrage/core/webserver/views/manage/failed_downloads.mako:74
msgid "Clear"
msgstr "واضحة"
......@@ -514,7 +515,7 @@ msgid "Subtitled"
msgstr "مترجمة"
#: sickrage/core/webserver/views/history.mako:158
#: sickrage/core/webserver/views/manage/failed_downloads.mako:61
#: sickrage/core/webserver/views/manage/failed_downloads.mako:63
msgid "missing provider"
msgstr "موفر مفقود"
......@@ -4487,7 +4488,6 @@ msgid "Prompt me to set settings for each show"
msgstr "مطالبتي بتعيين إعدادات لكل عرض"
#: sickrage/core/webserver/views/home/add_existing_shows.mako:77
#: sickrage/core/webserver/views/manage/failed_downloads.mako:72
msgid "Submit"
msgstr "إرسال"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-08-29 22:35-0700\n"
"PO-Revision-Date: 2018-08-30 05:36\n"
"POT-Creation-Date: 2018-08-30 20:34-0700\n"
"PO-Revision-Date: 2018-08-31 03:34\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Catalan\n"
"MIME-Version: 1.0\n"
......@@ -414,6 +414,7 @@ msgid "Response:"
msgstr "Resposta:"
#: sickrage/core/webserver/views/api_builder.mako:137
#: sickrage/core/webserver/views/manage/failed_downloads.mako:74
msgid "Clear"
msgstr "Clar"
......@@ -514,7 +515,7 @@ msgid "Subtitled"
msgstr "Subtitulats"
#: sickrage/core/webserver/views/history.mako:158
#: sickrage/core/webserver/views/manage/failed_downloads.mako:61
#: sickrage/core/webserver/views/manage/failed_downloads.mako:63
msgid "missing provider"
msgstr "proveïdor que falten"
......@@ -4487,7 +4488,6 @@ msgid "Prompt me to set settings for each show"
msgstr "Pregunta'm per definir la configuració de cada espectacle"
#: sickrage/core/webserver/views/home/add_existing_shows.mako:77
#: sickrage/core/webserver/views/manage/failed_downloads.mako:72
msgid "Submit"
msgstr "Presentar"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-08-29 22:35-0700\n"
"PO-Revision-Date: 2018-08-30 05:36\n"
"POT-Creation-Date: 2018-08-30 20:34-0700\n"
"PO-Revision-Date: 2018-08-31 03:35\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Czech\n"
"MIME-Version: 1.0\n"
......@@ -414,6 +414,7 @@ msgid "Response:"
msgstr "Odpověď:"
#: sickrage/core/webserver/views/api_builder.mako:137
#: sickrage/core/webserver/views/manage/failed_downloads.mako:74
msgid "Clear"
msgstr "Vymazat"
......@@ -514,7 +515,7 @@ msgid "Subtitled"
msgstr "S podtitulem"
#: sickrage/core/webserver/views/history.mako:158
#: sickrage/core/webserver/views/manage/failed_downloads.mako:61
#: sickrage/core/webserver/views/manage/failed_downloads.mako:63
msgid "missing provider"
msgstr "chybějící poskytovatel"
......@@ -4487,7 +4488,6 @@ msgid "Prompt me to set settings for each show"
msgstr "Zobrazit výzvu k nastavení pro každou show"
#: sickrage/core/webserver/views/home/add_existing_shows.mako:77
#: sickrage/core/webserver/views/manage/failed_downloads.mako:72
msgid "Submit"
msgstr "Odeslat"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-08-29 22:35-0700\n"
"PO-Revision-Date: 2018-08-30 05:36\n"
"POT-Creation-Date: 2018-08-30 20:34-0700\n"
"PO-Revision-Date: 2018-08-31 03:35\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Danish\n"
"MIME-Version: 1.0\n"
......@@ -414,6 +414,7 @@ msgid "Response:"
msgstr "Svar:"
#: sickrage/core/webserver/views/api_builder.mako:137
#: sickrage/core/webserver/views/manage/failed_downloads.mako:74
msgid "Clear"
msgstr "Klart"
......@@ -514,7 +515,7 @@ msgid "Subtitled"
msgstr "Undertitlen"
#: sickrage/core/webserver/views/history.mako:158
#: sickrage/core/webserver/views/manage/failed_downloads.mako:61
#: sickrage/core/webserver/views/manage/failed_downloads.mako:63
msgid "missing provider"
msgstr "mangler udbyder"
......@@ -4487,7 +4488,6 @@ msgid "Prompt me to set settings for each show"
msgstr "Bedt om at angive indstillinger for hvert show"
#: sickrage/core/webserver/views/home/add_existing_shows.mako:77
#: sickrage/core/webserver/views/manage/failed_downloads.mako:72
msgid "Submit"
msgstr "Indsende"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-08-29 22:35-0700\n"
"PO-Revision-Date: 2018-08-30 05:36\n"
"POT-Creation-Date: 2018-08-30 20:34-0700\n"
"PO-Revision-Date: 2018-08-31 03:35\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
......@@ -414,6 +414,7 @@ msgid "Response:"
msgstr "Antwort:"
#: sickrage/core/webserver/views/api_builder.mako:137
#: sickrage/core/webserver/views/manage/failed_downloads.mako:74
msgid "Clear"
msgstr "Klar"
......@@ -514,7 +515,7 @@ msgid "Subtitled"
msgstr "Mit dem Untertitel"
#: sickrage/core/webserver/views/history.mako:158
#: sickrage/core/webserver/views/manage/failed_downloads.mako:61
#: sickrage/core/webserver/views/manage/failed_downloads.mako:63
msgid "missing provider"
msgstr "fehlende Anbieter"
......@@ -4487,7 +4488,6 @@ msgid "Prompt me to set settings for each show"
msgstr "Mich prompt, um die Einstellungen für jede show"
#: sickrage/core/webserver/views/home/add_existing_shows.mako:77
#: sickrage/core/webserver/views/manage/failed_downloads.mako:72
msgid "Submit"
msgstr "Senden"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-08-29 22:35-0700\n"
"PO-Revision-Date: 2018-08-30 05:36\n"
"POT-Creation-Date: 2018-08-30 20:34-0700\n"
"PO-Revision-Date: 2018-08-31 03:35\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Greek\n"
"MIME-Version: 1.0\n"
......@@ -414,6 +414,7 @@ msgid "Response:"
msgstr "Απάντηση:"
#: sickrage/core/webserver/views/api_builder.mako:137
#: sickrage/core/webserver/views/manage/failed_downloads.mako:74
msgid "Clear"
msgstr "Σαφής"
......@@ -514,7 +515,7 @@ msgid "Subtitled"
msgstr "Με υπότιτλους"
#: sickrage/core/webserver/views/history.mako:158
#: sickrage/core/webserver/views/manage/failed_downloads.mako:61
#: sickrage/core/webserver/views/manage/failed_downloads.mako:63
msgid "missing provider"
msgstr "λείπει παροχής"
......@@ -4487,7 +4488,6 @@ msgid "Prompt me to set settings for each show"
msgstr "Προτροπή μου να ορίσετε ρυθμίσεις για κάθε εμφάνιση"
#: sickrage/core/webserver/views/home/add_existing_shows.mako:77
#: sickrage/core/webserver/views/manage/failed_downloads.mako:72
msgid "Submit"
msgstr "Υποβάλουν"
......
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