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

Fix API including basepath in tracks contentUrl #3921

Merged
merged 1 commit into from
Feb 1, 2025

Conversation

advplyr
Copy link
Owner

@advplyr advplyr commented Feb 1, 2025

Brief summary

API endpoints that return expanded Books and PodcastEpisodes include AudioTrack objects that have a contentUrl. That contentUrl was incorrectly including the basepath (/audiobookshelf). This PR removes the basepath from the API responses and prepends the basepath in the web client.

Which issue is fixed?

No issue

In-depth Description

The mobile clients and 3rd party clients will be getting users server address and prepending it to the contentUrl returned from the API.
If the contentUrl includes the basepath and the user includes the basepath in the address then it will result in track urls with /audiobookshelf/audiobookshelf/.

The mobile apps are currently falling back to transcoding if the user includes the basepath. This PR fixes that issue with no additional changes on the mobile apps.

How have you tested this?

Tested streaming on web client and mobile apps w/ subdir.

@advplyr advplyr merged commit 40e11db into master Feb 1, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant