Skip to content

Conversation

Copy link

Copilot AI commented Jan 20, 2026

Podcast downloads were failing when the server returned Content-Type: audio/mp4, which was rejected by the allowlist. The download logic now accepts audio/mp4 so valid audio is not discarded as “Wrong content type.”

Changes Made

  • Added audio/mp4 to the expected content types for AAX downloads in cmd_download.py.
  • Added audio/mp4 to the expected content types for AAXC downloads in cmd_download.py.

Testing

  • python -m pytest (no tests collected in this repository)
Original prompt

This section details on the original issue you should resolve

<issue_title>Missing audio/mp4 allowlist entry causes “Wrong content type” and deletes completed downloads</issue_title>
<issue_description>Describe the bug
When downloading some podcast episodes, audible download fails with “Wrong content type” even though the server returns valid audio. The response Content-Type is audio/mp4 (typical for M4A/AAC-in-MP4), but audible-cli only accepts audio/x-m4a (and a few others) and rejects audio/mp4, causing affected episodes to fail.

To Reproduce
Steps to reproduce the behaviour:

  1. Configure auth and run a podcast download (example ASIN for a single episode that fails):

audible download --asin B0BHX2T5K8 --aax-fallback

Observe the download output/errors.

Expected behavior
Downloads should succeed when the server returns Content-Type: audio/mp4 for audio-only MP4/M4A assets (AAC-in-MP4).
At minimum, audio/mp4 should be treated as an acceptable content type for audio downloads (and ideally saved with a .m4a extension when appropriate).

Screenshots

Fallback to aaxc for XXXXXX Voucher file saved to XXXXXX.voucher. XXXXXX.mp3: 100%|███████████████████████████████████████████████████████████████████████████| 12.3M/12.3M [00:01<00:00, 8.22MB/s] error: Error downloading XXXXXX.mp3. Wrong content type. Expected type(s): ['audio/aax', 'audio/vnd.audible.aax', 'audio/mpeg', 'audio/x-m4a', 'audio/audible']; Got: audio/mp4; Message: Unknown The download ended with the following result: New voucher files: 1 New aycl voucher files: 1

Desktop:

  • OS: MacOS 15.7.3
  • Browser N/A
  • Version N/A

Additional context
This occurs inconsistently across episodes in the same series: some download fine (e.g., audio/mpeg), others fail when served as audio/mp4.</issue_description>

Comments on the Issue (you are @copilot in this section)

@mkb79 Thanks for opening this issue.

I’m going to move it to mkb79/audible-cli, because this is an audible-cli–specific problem, not an issue with the core Audible library.

I will address and fix the problem there.
From an initial review, the solution requires adding the new content type handling in the following locations:
• cmd_download.py, around line 338
• cmd_download.py, around line 477

Once the new content type is properly handled in those sections, the issue should be resolved.

Thanks again for the report.</comment_new>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix missing audio/mp4 allowlist entry for downloads No code changes made yet Jan 20, 2026
Copilot AI requested a review from mkb79 January 20, 2026 14:56
@mkb79
Copy link
Owner

mkb79 commented Jan 20, 2026

@copilot Add audio/mp4 should be enough!

Co-authored-by: mkb79 <40368641+mkb79@users.noreply.github.com>
Copy link
Author

Copilot AI commented Jan 20, 2026

@copilot Add audio/mp4 should be enough!

Added audio/mp4 to the expected content types for AAX/AAXC downloads in commit 32aa850.

Copilot AI changed the title No code changes made yet Allow audio/mp4 downloads Jan 20, 2026
@mkb79 mkb79 added the enhancement New feature or request label Jan 21, 2026
@mkb79 mkb79 marked this pull request as ready for review January 21, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing audio/mp4 allowlist entry causes “Wrong content type” and deletes completed downloads

2 participants