Metadata rescan reports success when Audible has no record for the ASIN in that region (the book is left unchanged, other regions are never tried)

Abierto
#1,124 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
74/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
csharp
Área
api, backend

Línea de trabajo

Start with LibraryMetadataRescanWorkflow.cs, especially TryMetadataLookupByAsinAsync and EnumerateMetadataRescanRegions; the issue identifies the empty-record check that stops the lookup. Trace how the rescan reports success and applies patches, then check the existing rescan tests. Done means empty Audible records let lookup continue through regions and identifiers, and a rescan with no usable metadata reports failure.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

What happens

POST /api/v1/library/{id}/rescan-metadata answers "Metadata rescanned successfully" and logs Metadata rescan updated audiobook … even when Audible has no record for the book's ASIN in the region it is stored with. Nothing is updated: the book keeps every field it had. The regions where the record does exist are never tried.

Audible answers an ASIN it doesn't sell in a region with an empty record (an ASIN, no title). The rescan takes any non-null answer as a hit (TryMetadataLookupByAsinAsync in LibraryMetadataRescanWorkflow.cs: if (metadataEnvelope == null) continue;, then return true), and ApplyMetadataRescanPatch only writes non-empty fields, so it writes nothing. The loop over EnumerateMetadataRescanRegions stops at that first empty answer.

Reproduce (v1.5.9-canary, API only)

  1. A book whose primary ASIN is a US-only record, e.g. Robinson Crusoe B002V5CW08 (sold in the US, not in France).
  2. Store that ASIN with the region fr (PUT /library/{id}/identifiers), and give the book a title it doesn't have (PUT /library/{id} { "title": "Wrong Title", "subtitle": "Wrong Subtitle" }).
  3. POST /library/{id}/rescan-metadata.

Observed:

rescan : {"message":"Metadata rescanned successfully","audiobookId":1,"source":"Audible","asin":"B002V5CW08","region":"fr"}
after  : Wrong Title | Wrong Subtitle
log    : Metadata rescan updated audiobook 1 (Wrong Title) using Audible ASIN B002V5CW08 region fr

GET /metadata/B002V5CW08?region=fr returns the empty record (no title); ?region=us returns Robinson Crusoe.

Expected

An answer without a title is not a record: the lookup goes on (the next region, then the next identifier), and when nothing has one the rescan fails as "no metadata found" instead of reporting success.

Why it matters

  • Rescan Metadata says it worked on a book whose ASIN region is wrong, and the user has no reason to look further.
  • Repair (#1080 / #1054) saves the picked record's ASIN and region, then rescans. If Audible returns an empty record at that moment, the book shows Repaired with its old metadata. #1054 lists this as a known limit pointing here; it already reports the other case, when the rescan read a different ASIN or region than the one picked.

Found while testing #1054 on a test instance with libraries generated by m4bard/listenarr-testdata.

Lenguaje dominante
C#
Estrellas
901
Forks
70
Merge medio
16 h 27 min
PR fusionados (30 d)
60

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Listenarrs/Listenarr

Todos los issues de Listenarrs/Listenarr

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.