-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
In workers/init.py, in the download_and_combine function, there is a severe problem.
Observe this code:
for i, url in enumerate(urls):
part_number = i + 1
file_part, err = download_file_part(path, url, part_number)
if file_part:
file_parts.append(file_part)
else:
# Skip to the next URL if there's an error downloading a part
continue
result = combine_file_parts(path, *file_parts)
You can see here that if there is any issue downloading a part, it... just continues onto the next part!
Here's the hilarious part. Observe combine_file_parts:
for file in file_parts:
if not os.path.isfile(file):
print('File part not found', file)
return False
The only pieces in the file_parts array? The ones that worked.
There is also no clear way to detect this occurred besides a resulting failure to convert the mashed together m4a bits into flac.
Like ok... if it messes with the track length you could detect that by checking the time length in the DB against the FLAC time length. If not? Well you're in trouble.
Edit: It appears flac -t [file.flac] is able to detect flac files created this way.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers