nas: investigate enabling Dolby Atmos (spatial audio) downloads in Libation #363
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos#363
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #360 / !362. The Libation sync on
nasdownloads the standard AAC-LC version of every book, including titles Audible flags as Dolby Atmos. Investigate whether spatial-audio downloads can be enabled.Confirmed current behaviour
Verified against
libation13.3.6 as packaged in nixos-26.05 (decompiledLibationFileManager.dll/FileLiberator.dll, cross-checked against the tagged upstream source and a livelibationcli get-settingrun).ffprobeon a title that Libation badges with the Dolby Atmos logo onnbreportschannels=2— i.e. the standard stereo AAC download, not the spatial stream. This is not anas-specific regression; it is what Libation does everywhere today.Why it does not work
Two independent blockers, either one sufficient on its own:
1.
RequestSpatialis stubbed out upstream in 13.3.6.Source/LibationFileManager/Configuration.PersistentSettings.cs:311:Hardcoded
false, setter a no-op, real implementation commented out. Because it carries no[Description]attribute it is not even exposed as a setting —libationcli get-setting RequestSpatialreturnsUnknown Setting Name, and adding it to our generatedSettings.jsonwould be silently ignored. The matching checkbox and codec dropdown are likewise commented out inSource/LibationAvalonia/Controls/Settings/Audio.axaml:66-90.SpatialAudioCodec(EC_3|AC_4, defaultEC_3) is still readable, but it is dead config — it is only consumed inside theRequestSpatiallicense request.2. Spatial only exists on the Widevine codepath, which we do not enable.
Source/FileLiberator/DownloadOptions.Factory.cs:112:RequestSpatialandSpatialAudioCodecare read only below that early return.hosts/nas/modules/libation.nixleavesUseWidevineat its default offalse, so we always take the ADRM branch.The Atmos logo and the "Is Spatial" grid column (
ProductsDisplay.axaml:268,BookDetailsDialog.axaml:25) come fromBook.IsSpatial, imported from the Audible catalogue API inDtoImporterService/BookImporter.cs:196. They describe the title, not the downloaded file — which is why this is easy to misread as working.What triage needs to decide
defaultValue: true, so a version bump that re-enables it makes spatial opt-out; if we do not want it, we would need to pinRequestSpatial = falseexplicitly at that point.UseWidevine = trueadditionally requires the Audible account to be registered as an Android device — otherwise Libation logsAccount {account} is not registered as an android deviceand silently falls back to ADRM. Our account is currently seeded vialibation-cli login-external; whether that registers as an Android device is unverified. Re-adding the account is a manual, interactive step onnas.nas), and Audiobookshelf clients transcoding either codec is its own question. AC-4 in particular has thin player support. Possibly worth a spike on one book before committing.AllowLibationFixup/ chapter splitting / m4b muxing are all exercised against AAC today; the EC-3 path is untested here.FindBetterQualityBooksViewModel.cs:71explicitly skips spatial books ("when querying the /metadata endpoint, it will only show ac-4 data for spatial audiobooks"), which hints the spatial path is not fully wired through upstream either.If it is enabled
Changes would be confined to the
settingsFiletemplate inhosts/nas/modules/libation.nix: addUseWidevine = true;andRequestSpatial = true;(plusSpatialAudioCodecif we preferAC_4), followed by a one-off re-login onnasto register the account as an Android device.Worth noting while debugging: the module sets Serilog
MinimumLevel = "Warning", which suppresses the one line that reports what was actually requested —Temporarily dropping to
Informationis the quickest way to confirm the request Libation sends. Beware that atInformationLibation double-emits plain console lines.Acceptance
A book Audible flags as spatial, downloaded by
libation-synconnas, reportscodec_name=eac3(orac4) andchannels > 2underffprobe, plays in Audiobookshelf, and the size increase is judged acceptable — or the issue is closedwontfixwith the reason recorded.