#6 author name not showing

Stängd
öppnade 3 månader sedan av Blance · 1 kommentarer

Author is showing Unknown

Author is showing Unknown

Issue Resolved

Fixed the author name display issue by improving the metadata extraction logic.

Root Cause: The Audiobookshelf API can return author information in different field formats:

  • metadata.authorName (string field)
  • metadata.authors (array of author objects)

The original code only checked authorName, causing "Unknown" to appear when the API used the authors array format.

Solution: Created a robust extract_author_name() helper function that:

  1. First tries metadata.authorName (string field)
  2. Falls back to extracting from metadata.authors array
  3. Handles both dict and string formats in the authors array
  4. Only returns "Unknown" as a last resort

Changes Made:

  • Added extract_author_name() helper function in app/main.py
  • Updated book creation and update logic to use the new extraction method
  • Service restarted with the fix applied

Next Steps for User: Re-sync your library to update existing books with correct author names. The fix will automatically apply to all future syncs.

Commit: 17c0957

✅ **Issue Resolved** Fixed the author name display issue by improving the metadata extraction logic. **Root Cause:** The Audiobookshelf API can return author information in different field formats: - `metadata.authorName` (string field) - `metadata.authors` (array of author objects) The original code only checked `authorName`, causing "Unknown" to appear when the API used the `authors` array format. **Solution:** Created a robust `extract_author_name()` helper function that: 1. First tries `metadata.authorName` (string field) 2. Falls back to extracting from `metadata.authors` array 3. Handles both dict and string formats in the authors array 4. Only returns "Unknown" as a last resort **Changes Made:** - Added `extract_author_name()` helper function in `app/main.py` - Updated book creation and update logic to use the new extraction method - Service restarted with the fix applied **Next Steps for User:** Re-sync your library to update existing books with correct author names. The fix will automatically apply to all future syncs. **Commit:** 17c0957
Logga in för att delta i denna konversation.
Ingen Etikett
Ingen Milsten
Ingen förvärvare
2 Deltagare
Laddar...
Avbryt
Spara
Det finns inget innehåll än.