✅ **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
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 theauthorsarray format.Solution: Created a robust
extract_author_name()helper function that:metadata.authorName(string field)metadata.authorsarrayChanges Made:
extract_author_name()helper function inapp/main.pyNext 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