mirror of
https://github.com/alexta69/metube.git
synced 2026-09-21 13:35:01 +00:00
82e966caaf
The server picks the download directory on download_type alone (ytdl.py:1530: AUDIO_DOWNLOAD_DIR if download_type == 'audio'). The UI picked the URL base on download_type *or* a .mp3 extension, so the two disagreed for any mp3 produced under a video-type download -- a postprocessor, a preset, or a record predating download_type. Those files are written to DOWNLOAD_DIR but were linked under audio_download/, giving a 404 on every instance where the two directories differ. The .mp3 clause was not an incomplete audio check to be extended with more extensions; it was a second, conflicting rule. Removing it makes the UI agree with where the file actually is. Same fix in buildChapterDownloadLink, which carried a copy. Test verified by reintroducing the bug: the video-type mp3 case fails with 'audio_download/song.mp3' as expected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>