Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement]: Report Chapter state #1505

Open
Frassensh opened this issue Mar 5, 2025 · 0 comments
Open

[Enhancement]: Report Chapter state #1505

Frassensh opened this issue Mar 5, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@Frassensh
Copy link

Describe the Feature/Enhancement

I am using Home Assistant companion app and its sensor Media Session.

Audiobookshelf app does not report chapters

Why would this be helpful?

It reports everything else fine and it is an easy fix

Future Implementation (Screenshot)

change this in PlayerNotificationService:

val extra = Bundle()
extra.putString(
MediaMetadataCompat.METADATA_KEY_ARTIST,
currentPlaybackSession!!.displayAuthor
)

val mediaDescriptionBuilder =
MediaDescriptionCompat.Builder()
.setExtras(extra)
.setTitle(currentPlaybackSession!!.displayTitle)

to this instead:

val extra = Bundle()
val albumValue = currentPlaybackSession!!.getChapterForTime(getCurrentTime())?.title
?: currentPlaybackSession!!.displayTitle

extra.putString(MediaMetadataCompat.METADATA_KEY_ARTIST, currentPlaybackSession!!.displayAuthor)
extra.putString(MediaMetadataCompat.METADATA_KEY_ALBUM, albumValue)

val mediaDescriptionBuilder =
MediaDescriptionCompat.Builder()
.setExtras(extra)
.setTitle(currentPlaybackSession!!.displayTitle)

Audiobookshelf App Version

Android App - 0.9.79

Current Implementation (Screenshot)

No response

@Frassensh Frassensh added the enhancement New feature or request label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant