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

[Bug]: Casting from Web app causes file name to be displayed instead of chapter name #3821

Open
ZLoth opened this issue Jan 11, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@ZLoth
Copy link

ZLoth commented Jan 11, 2025

What happened?

I was testing casting from the Web application to my television, and noticed that the file name was being displayed instead of the chapter name.

PXL_20250111_174704011 (Small)

The full file name is 18 - The Walls Have Ears - Chapter 14 British Intelligence, POWs and War Crimes Trials.m4b

What did you expect to happen?

I was expected the actual chapter name as configured in ABS to be displayed (e.g. British Intelligence, POWs and War Crimes Trials)

Steps to reproduce the issue

Start the Cast from the web browser.

Audiobookshelf version

2.17.7

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Chrome

Logs

No logs

Additional Notes

Issue is replicated on Android app as well per advplyr/audiobookshelf-app#1432

@advplyr
Copy link
Owner

advplyr commented Jan 12, 2025

This is going to be tricky since we send chromecast a list of audio files, not chapters.

We can do what we do when opening audiobook RSS feeds though. If the audio files and chapters match up then use the chapter title instead of the audio filename.
The down side is that when the chapters don't match the audio files then the filename will be used. For single file audiobooks we can use the book title.

For reference, this is the check that determines whether the RSS feed will use chapter titles:

/**
* If chapters for an audiobook match the audio tracks then use chapter titles instead of audio file names
*
* @param {import('./Book').AudioTrack[]} trackList
* @param {import('./Book')} book
* @returns {boolean}
*/
static checkUseChapterTitlesForEpisodes(trackList, book) {
const chapters = book.chapters || []
if (trackList.length !== chapters.length) return false
for (let i = 0; i < trackList.length; i++) {
if (Math.abs(chapters[i].start - trackList[i].startOffset) >= 1) {
return false
}
}
return true
}

This is the same issue that we have for the Android app notification player and android auto. advplyr/audiobookshelf-app#489 advplyr/audiobookshelf-app#239 advplyr/audiobookshelf-app#729 (comment)

It is common that when passing audio tracks to another "service" they expect a list of audio tracks and give you the option to set the title for that audio track. They are taking care of navigating between tracks.

@ZLoth
Copy link
Author

ZLoth commented Jan 12, 2025

Understood. It's not a showstopper issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants