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

2.15.0: Protocol sometimes missing from audio link, making it unplayable #41

Closed
Moonbase59 opened this issue Aug 16, 2021 · 3 comments
Closed

Comments

@Moonbase59
Copy link

Using 2.15.0, English (US), definition & synonym provider "Free Dictionary API", looking up, for instance "right hand", delivers an audio link that’s unplayable, both in pane and generated note, due to the protocol missing:

<source src="//ssl.gstatic.com/dictionary/static/sounds/20200429/right_hand--1_gb_1.4.mp3">

Manually adding the https: protocol makes it playable.

Since we might encounter APIs that don’t use https:, it might be clever to check if the returned audio link uses a protocol, if not, add the one used to make the request.

@phibr0
Copy link
Owner

phibr0 commented Aug 17, 2021

I added a check for if the audio url contains the protocol, if not i will just add https:// for now, since the localdictionarybuilder doesn't have access to the apis and the FreeDictionaryAPI is the only one which actually provides audio

@phibr0 phibr0 closed this as completed in 6b54094 Aug 17, 2021
@Moonbase59
Copy link
Author

Moonbase59 commented Aug 17, 2021

Overdid it ;-) The protocol is just the https: part, the // were already in the resource URI, so now you generate

<source src="https:////ssl.gstatic.com/dictionary/static/sounds/20200429/cheers--_gb_1.mp3">

(four ////)

For some reason, I can’t re-open this, hope you read it nevertheless.

@phibr0
Copy link
Owner

phibr0 commented Aug 17, 2021

Already fixed that again, but forgot to trigger the Release. Will do it when I'm back home.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: done
Development

No branches or pull requests

2 participants