mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-02 22:46:55 -05:00
[Bug] Custom metadata provider including extra curly bracket in query string #1894
Labels
No labels
authentication
awaiting release
backlog
bug
chapter editor
config-issue
ebooks
encoding/embedding
enhancement
help wanted
listening sessions & progress
planned
possible plugin
progress sync
sorting/filtering/searching
unable to reproduce
upload
users & permissions
waiting
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/audiobookshelf-advplyr#1894
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?
Originally created by @ahobsonsayers on GitHub (Apr 17, 2024).
Describe the issue
I have recently built a custom metadata provider for audiobookshelf which gets metadata from Goodreads. You can see my repo here.
I have created my provider using the OpenAPI schema written for audiobookshelf custom metadata providers. The provider works well when invoked through curl.
However when I set up the provider in audiobookshelf and attempt to use it to get metadata for a book, audiobookshelf instantly crashes with the error below. No request is ever made to my metadata provider server.
I'm not particularly familiar with JavaScript or audiobookshelf so I am not able to debug why this is happening myself. Any help would be much appreciated - I'd love to get my metadata provider working!
Steps to reproduce the issue
Audiobookshelf version
v2.8.1
How are you running audiobookshelf?
Docker
@nichwall commented on GitHub (Apr 17, 2024):
Is this fixed by https://github.com/advplyr/audiobookshelf/pull/2784? That PR occurred after the last release (2.8.1).
You can try running from source or using the
edgedocker tag to test the new version.Thanks for linking to your custom metadata provider! We're planning to add a "community made providers" table to the website if you would like to add a link to the repo (once it's ready)
@ahobsonsayers commented on GitHub (Apr 18, 2024):
Thanks for your reply!
This does indeed fix the issue -
edgedoes not crash!I have noticed another problem though. It seems like audiobookshelf is always appending a
%7Dto the end of the query, in other words a}This breaks search on my server as it seems Goodreads does not accept the character. I should probably sanitise any input anyway, but I don't think audiobookshelf should be sending this. I assume it is a result of a string interpolation bug maybe?
Many thanks!
@nichwall commented on GitHub (Apr 18, 2024):
Oh yeah that should be fixed. Looks like there's one too many closing braces. (Not at a computer I can edit with for most of the day so leaving this here)
https://github.com/advplyr/audiobookshelf/blob/master/server%2Fproviders%2FCustomProviderAdapter.js#L46
@advplyr commented on GitHub (Apr 18, 2024):
Thanks just fixed that curly bracket issue
@advplyr commented on GitHub (Apr 22, 2024):
Fixed in v2.9.0