[BUG] M4B quality is decided by codec at search time but by extension at import, so AAC .m4a releases grab as M4B and import as MP3

Aperta
#320 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
66/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
backend

Direzione di ricerca

Start by reading QualityParser.cs and MediaFileExtensions, then trace how ReleaseInfo.FileType is populated and used during search and import. Reproduce the mismatch with an AAC .m4a release such as the example in the report. Done means search and import assign a consistent quality to that release and the resulting quality matches the profile cutoff.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug
The M4B quality means two different things depending on where Chaptarr evaluates it. At search time QualityParser maps codec AAC to Quality.M4B (the Codec.AAC cases in QualityParser.cs), so a MyAnonamouse release whose media info says AAC is shown and ranked as M4B whatever its extension. At import time MediaFileExtensions decides by extension, and there .m4a maps to Quality.MP3; only .m4b is M4B. An m4a release is therefore grabbed as M4B, then imported as MP3, and the book ends up below the profile cutoff it was grabbed for.

With upgrades enabled this is not just a label: the book sits at MP3, the profile wants M4B, and the next search ranks the same kind of AAC m4a release as a valid M4B upgrade again.

To Reproduce

  1. Quality profile with cutoff M4B, indexer MyAnonamouse.
  2. Search a book where the best-ranked AAC release is a folder of .m4a chapter files (The Martian, MAM 986064: 28 x .m4a, media info codec AAC).
  3. The release list and the queue show the release as M4B.
  4. After import, the book files are quality MP3 and the queue row flips to MP3 once ApplyActualFileQuality runs.

Expected behavior
One definition of M4B on both sides. Either key the search-time quality on the file type MAM already supplies (filetype is "m4a" for this release and is parsed into ReleaseInfo.FileType), or treat .m4a as M4B on import if M4B is meant to mean "AAC audiobook". Keying on codec at search time but on extension at import time cannot agree.

System Information:

  • OS: Ubuntu 24.04.4 LTS
  • Chaptarr Version: 0.9.965.0 (develop)
  • Installation Method: Docker
  • Browser: Firefox

Additional context
History for the book, same download: grabbed with quality M4B at 14:53:50, 28 bookFileImported events with quality MP3 at 15:03:45. The grab record carried "fileType": "m4a", so the information needed to get this right was already on the release.

Lingua principale
C#
Stelle
664
Fork
48
Merge medio
5h 24m
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Chaptarr/chaptarr

Tutte le issue di Chaptarr/chaptarr

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.