Repository navigation
Read Audiobookshelf's metadata.json as a metadata layer - #135
Merged
Merged
Conversation
A folder book whose folder holds the metadata.json Audiobookshelf keeps
("Store metadata with item") now takes its title, authors, narrators,
series, published year, description, ASIN and ISBN from it, over the
tags and path (ABS's own default priority); edits and community matches
still go over it. Values are normalized as an edit would be, so an ASIN
from the file makes the book matched.
- metadata.ParseABSFile: lenient, size-capped, regular files only.
- books.abs_sig / abs_indexed_at / abs_file (0046): the file's
signature, the index it was read for, what it says.
- Discovery records each folder's file signature from the walk; an
unchanged book whose file is new, changed or gone is re-read without
a re-index (SetABSFiles). A read failure keeps the last reading.
- New provenance source "abs" (console marker, legend, six locales).
- An ignore rule "metadata.json" turns it off for a library.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When AudioSilo is pointed at a library Audiobookshelf manages, each book folder may hold the
metadata.jsonABS keeps ("Store metadata with item"). It often carries the ASIN/ISBN the tags lack, plus the corrections and matches made in ABS. This reads it.Precedence: path → tags → ABS file → community match → admin edit, as ABS itself ranks the file above the tags. Path-first libraries included.
Fields read:
"Name #seq": the first is the main series; the rest go tomore_seriespublishedDate, elsepublishedYearGenres, tags, publisher, language and chapters are not read. An empty value never clears a tag's. Each value goes through the field's edit rules, so an ASIN from the file makes the book matched: Health,
/meta, the community chapter check and refresh runs all work.Scope: folder books only. A loose file at the root never takes a
metadata.jsonbeside it. An ignore rulemetadata.jsonturns the feature off for a library.Storage and scans:
0046addsbooks.abs_sig,abs_indexed_atandabs_file: derived from the file, so rebuildable.SetABSFiles, batched beside the path backfill).Console: a new
absprovenance source, shown as an amber "Audiobookshelf" marker, in the legend, in 6 locales, and in STYLEGUIDE tokens.Tests: parser, layer and precedence, the series position rule, file books, the backfill (including the stale-stamp case), and a scanner lifecycle test (read, edit picked up without re-index, upgrade backfill, ignore rule, removal, IndexPath, unreadable-file retry).
Checked on a real server with the user-posted sample file: the book page shows every value marked Audiobookshelf, in both themes.
Docs: KodeStar/audiosilo-docs#134. Not a wire change.
Known gaps (not fixed here):
tag.