mirror of
https://github.com/simon987/nyaa.git
synced 2025-12-16 00:09:05 +00:00
Handle qButtorrent empty url-list/webseeds
url-list is supposed to be omitted in case of no webseeds, but qB will instead use an empty bytestring '' as the value. This commit makes the validation more lenient regarding url-list.
This commit is contained in:
@@ -346,7 +346,8 @@ def _validate_trackers(torrent_dict, tracker_to_check_for=None):
|
||||
# http://www.bittorrent.org/beps/bep_0019.html
|
||||
def _validate_webseeds(torrent_dict):
|
||||
webseed_list = torrent_dict.get('url-list')
|
||||
if webseed_list is not None:
|
||||
# qBittorrent has an empty field instead of omitting the key, so just check for truthiness
|
||||
if webseed_list:
|
||||
_validate_list(webseed_list, 'url-list')
|
||||
|
||||
for webseed_url in webseed_list:
|
||||
|
||||
Reference in New Issue
Block a user