Browse Source

Merge branch 'hotfix/0.25.3'

tags/release_0.25.3^0 release_0.25.3
JackDandy 4 years ago
parent
commit
d12943bdd3
  1. 9
      CHANGES.md
  2. 3
      sickbeard/providers/generic.py
  3. 1
      sickbeard/search.py
  4. 11
      sickbeard/webapi.py

9
CHANGES.md

@ -1,4 +1,11 @@
### 0.25.2 (2021-09-20 20:00:00 UTC)
### 0.25.3 (2021-09-21 22:00:00 UTC)
* Fix filter in history API endpoint
* Fix multiep magnets are not downloadable
* Change remove dead magnet cache services
### 0.25.2 (2021-09-20 20:00:00 UTC)
* Fix history API endpoint for all snatch and download statuses (including archived, failed)

3
sickbeard/providers/generic.py

@ -750,8 +750,7 @@ class GenericProvider(object):
return False
urls = ['http%s://%s/torrent/%s.torrent' % (u + (btih.upper(),))
for u in (('s', 'itorrents.org'), ('s', 'torrage.info'), ('', 'reflektor.karmorra.info'),
('', 'thetorrent.org'))]
for u in (('s', 'itorrents.org'), ('s', 'torrage.info'))]
except (BaseException, Exception):
link_type = 'torrent'
urls = [result.url]

1
sickbeard/search.py

@ -970,6 +970,7 @@ def search_providers(
ep_obj_list.append(show_obj.get_episode(ep_num[0], ep_num[1]))
best_season_result.ep_obj_list = ep_obj_list
if not best_season_result.url.startswith('magnet'):
best_season_result = cache_torrent_file(
best_season_result, show_obj=show_obj, filter_rls=orig_thread_name)

11
sickbeard/webapi.py

@ -46,8 +46,8 @@ from lib import subliminal
import sickbeard
from . import classes, db, helpers, history, image_cache, logger, network_timezones, processTV, search_queue, ui
from .common import ARCHIVED, DOWNLOADED, IGNORED, SKIPPED, SNATCHED, SNATCHED_ANY, SNATCHED_BEST, SNATCHED_PROPER, \
UNAIRED, UNKNOWN, WANTED, Quality, qualityPresetStrings, statusStrings
from .common import ARCHIVED, DOWNLOADED, FAILED, IGNORED, SKIPPED, SNATCHED, SNATCHED_ANY, SNATCHED_BEST, \
SNATCHED_PROPER, UNAIRED, UNKNOWN, WANTED, Quality, qualityPresetStrings, statusStrings
from .helpers import remove_article
from .indexers import indexer_api, indexer_config
from .indexers.indexer_config import *
@ -1618,10 +1618,13 @@ class CMD_SickGearHistory(ApiCall):
""" get the sickgear downloaded/snatched history """
# typeCodes = []
type_filter = []
if "downloaded" == self.type:
type_filter = [DOWNLOADED, ARCHIVED, FAILED]
self.type = "Downloaded"
typeCodes = Quality.DOWNLOADED + Quality.ARCHIVED + Quality.FAILED
elif "snatched" == self.type:
type_filter = SNATCHED_ANY
self.type = "Snatched"
typeCodes = Quality.SNATCHED_ANY
else:
@ -1649,9 +1652,9 @@ class CMD_SickGearHistory(ApiCall):
results = []
for cur_result in sql_result:
status, quality = Quality.splitCompositeStatus(int(cur_result["action"]))
status = _get_status_Strings(status)
if self.type and not status == self.type:
if type_filter and status not in type_filter:
continue
status = _get_status_Strings(status)
cur_result["status"] = status
cur_result["quality"] = _get_quality_string(quality)
cur_result["date"] = _historyDate_to_dateTimeForm(str(cur_result["date"]))

Loading…
Cancel
Save