Browse Source

Change improve log clarity of anime group validation and fix its validation.

tags/release_0.25.1
JackDandy 5 years ago
parent
commit
32dabc7922
  1. 1
      CHANGES.md
  2. 8
      sickbeard/anime.py

1
CHANGES.md

@ -92,6 +92,7 @@
* Add Telegram notifier option "Send quietly" to mute client notification sound * Add Telegram notifier option "Send quietly" to mute client notification sound
* Fix AddIndexerToTables function used for tests * Fix AddIndexerToTables function used for tests
* Change db migration patterns to always increase db version regardless of function logic outcome * Change db migration patterns to always increase db version regardless of function logic outcome
* Change improve log clarity of anime group validation and fix its validation
### 0.21.39 (2020-07-14 01:15:00 UTC) ### 0.21.39 (2020-07-14 01:15:00 UTC)

8
sickbeard/anime.py

@ -130,7 +130,7 @@ class AniGroupList(object):
def is_valid(self, result): def is_valid(self, result):
# type: (NZBSearchResult or NZBDataSearchResult or TorrentSearchResult) -> bool # type: (NZBSearchResult or NZBDataSearchResult or TorrentSearchResult) -> bool
""" """
Test if release group parsed from result is in white list and not in black list Test if release group parsed from result is in allow list and not in block list
:param result: Search result :param result: Search result
:return: True or False :return: True or False
@ -142,9 +142,11 @@ class AniGroupList(object):
allowed = result.release_group.lower() in [x.lower() for x in self.allowlist] or not self.allowlist allowed = result.release_group.lower() in [x.lower() for x in self.allowlist] or not self.allowlist
blocked = result.release_group.lower() in [x.lower() for x in self.blocklist] blocked = result.release_group.lower() in [x.lower() for x in self.blocklist]
logger.log('Allow list valid: %s. Block list valid: %s' % (allowed, blocked), logger.DEBUG) logger.log('Result %sallowed%s in block list. Parsed group name: "%s" from result "%s"' %
(('not ', '')[allowed], (' and not', ', but')[not blocked], result.release_group, result.name),
logger.DEBUG)
return allowed and blocked return allowed and not blocked
def short_group_names(groups): def short_group_names(groups):

Loading…
Cancel
Save