#6 author name not showing

Хаасан
нээсэн 3 сар өмнө by Blance · 1 саналууд
Brad Lance санал үлдээсэн 3 сар өмнө

Author is showing Unknown

Author is showing Unknown
Brad Lance энэ асуудлыг 3 сар өмнө коммитоос иш татсан болно
Alexander Pennwick санал үлдээсэн 3 сар өмнө

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
Энэ хэлэлцүүлгэнд нэгдэхийн тулт та нэвтэрнэ үү.
Шошгогүй
Үе шат заахгүй
Хариуцагч байхгүй
2 Оролцогчид
Ачааллаж байна ...
Цуцлах
Хадгалах
Харуулах агуулга байхгүй байна.