mirror of
https://github.com/simon987/nyaa.git
synced 2025-12-16 08:19:05 +00:00
Support BitComet empty directories (ew)
This will allow most (if not all) torrents that have been rejected by 'Malformed torrent metadata (path part is empty)' Adjusts _validate_bytes to disable empty check Adds the empty check to file tree parsing
This commit is contained in:
@@ -100,7 +100,9 @@ def handle_torrent_upload(upload_form, uploading_user=None, fromAPI=False):
|
||||
for directory in path_parts:
|
||||
current_directory = current_directory.setdefault(directory, {})
|
||||
|
||||
current_directory[filename] = file_dict['length']
|
||||
# Don't add empty filenames (BitComet directory)
|
||||
if filename:
|
||||
current_directory[filename] = file_dict['length']
|
||||
|
||||
parsed_file_tree = utils.sorted_pathdict(parsed_file_tree)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user