Browse Source

Merge branch 'hotfix/0.21.31'

tags/release_0.21.31^0 release_0.21.31
JackDandy 5 years ago
parent
commit
7216bbbf86
  1. 9
      CHANGES.md
  2. 7
      gui/slick/js/loadingStartup.js
  3. 3
      sickbeard/providers/generic.py
  4. 2
      sickbeard/webserve.py

9
CHANGES.md

@ -1,4 +1,11 @@
### 0.21.30 (2020-04-30 10:20:00 UTC) ### 0.21.31 (2020-05-13 19:10:00 UTC)
* Fix correct type for hashlib call under py3
* Change improve loading logic, stop loop when reloading and only call location.reload(); once
* Fix RarBG under py3
### 0.21.30 (2020-04-30 10:20:00 UTC)
* Fix Milkie torrent provider breaking changes * Fix Milkie torrent provider breaking changes

7
gui/slick/js/loadingStartup.js

@ -12,6 +12,8 @@ var baseUrl = function () {
return $.SickGear.Root; return $.SickGear.Root;
}; };
var reloading = false
var ajaxConsumer = function () { var ajaxConsumer = function () {
var that = this; var that = this;
that.timeoutId = 0; that.timeoutId = 0;
@ -29,7 +31,8 @@ var ajaxConsumer = function () {
uiUpdateComplete(data.message); uiUpdateComplete(data.message);
}) })
.fail(function (jqXHR, textStatus, errorThrown) { .fail(function (jqXHR, textStatus, errorThrown) {
if (404 === jqXHR.status) { if (404 === jqXHR.status && !reloading) {
reloading = true;
putMsg('Finished loading. Reloading page'); putMsg('Finished loading. Reloading page');
location.reload(); location.reload();
} }
@ -37,10 +40,12 @@ var ajaxConsumer = function () {
}) })
.always(function (jqXHR, textStatus) { .always(function (jqXHR, textStatus) {
clearTimeout(that.timeoutId); clearTimeout(that.timeoutId);
if (!reloading){
if (that.pollInterval) if (that.pollInterval)
that.timeoutId = setTimeout(ajaxConsumer.checkLoadNotifications, that.pollInterval); that.timeoutId = setTimeout(ajaxConsumer.checkLoadNotifications, that.pollInterval);
logInfo(that.pollInterval ? '^-- ' + that.pollInterval/1000 + 's to next work' : '^-- no more work'); logInfo(that.pollInterval ? '^-- ' + that.pollInterval/1000 + 's to next work' : '^-- no more work');
logInfo('===='); logInfo('====');
}
}); });
} }
}; };

3
sickbeard/providers/generic.py

@ -1768,7 +1768,8 @@ class TorrentProvider(GenericProvider):
@staticmethod @staticmethod
def _decode(data, c): def _decode(data, c):
try: try:
result = ''.join([chr(int(str(bytearray([(8 * c)[i] ^ x for i, x in enumerate(data)])[i:i + 2]), 16)) fx = (lambda x: x, lambda x: str(x))[PY2]
result = ''.join([chr(int(fx(bytearray([(8 * c)[i] ^ x for i, x in enumerate(data)])[i:i + 2]), 16))
for i in range(0, len(data), 2)]) for i in range(0, len(data), 2)])
except (BaseException, Exception): except (BaseException, Exception):
result = '|' result = '|'

2
sickbeard/webserve.py

@ -6203,7 +6203,7 @@ class ConfigGeneral(Config):
# Create some values to seed md5 # Create some values to seed md5
seed = str(time.time()) + str(random.random()) seed = str(time.time()) + str(random.random())
result = hashlib.new('md5', seed).hexdigest() result = hashlib.new('md5', decode_bytes(seed)).hexdigest()
# Return a hex digest of the md5, eg 49f68a5c8493ec2c0bf489821c21fc3b # Return a hex digest of the md5, eg 49f68a5c8493ec2c0bf489821c21fc3b
logger.log(u'New API generated') logger.log(u'New API generated')

Loading…
Cancel
Save