diff --git a/CHANGES.md b/CHANGES.md index e1d4f09..7b9c1dc 100644 --- a/CHANGES.md +++ b/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) diff --git a/sickbeard/providers/generic.py b/sickbeard/providers/generic.py index fab21fa..a29e3a4 100644 --- a/sickbeard/providers/generic.py +++ b/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] diff --git a/sickbeard/search.py b/sickbeard/search.py index 4398458..7952c7b 100644 --- a/sickbeard/search.py +++ b/sickbeard/search.py @@ -970,8 +970,9 @@ 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 - best_season_result = cache_torrent_file( - best_season_result, show_obj=show_obj, filter_rls=orig_thread_name) + 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) if best_season_result: ep_num = MULTI_EP_RESULT diff --git a/sickbeard/webapi.py b/sickbeard/webapi.py index a809b83..9211bb7 100644 --- a/sickbeard/webapi.py +++ b/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"]))