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

Opensubtitles.com issue with pt-br #2498

Closed
LeoKesler opened this issue Jan 26, 2024 · 8 comments
Closed

Opensubtitles.com issue with pt-br #2498

LeoKesler opened this issue Jan 26, 2024 · 8 comments

Comments

@LeoKesler
Copy link

Hi.

I am unable to download subtitles for language pt-BR.

Until december, I was able to download the subtitles from opensubtitles.org correctly. The language configured was pob pb en .

But after I upgraded to lastest available version, 2.1.4, the new opensubtitle.com do not find any subtitle for pt-br language. Same settings, same language order. I tried to use each one separately, only pob, only pb, without success.

@clsid2
Copy link
Owner

clsid2 commented Jan 26, 2024

You will have to ask on OpenSubtitles forum why it does not give results for pb.

@opensubtitlesdev
Copy link

opensubtitlesdev commented Feb 1, 2024

because the code for portuguese brazilian is pt-BR
the languages codes can be found here
https://opensubtitles.stoplight.io/docs/opensubtitles-api/1de776d20e873-languages

using the api request to keep the list updated (the list in the docs is not up to date)

@LeoKesler
Copy link
Author

@opensubtitlesdev Sorry, but it is not working. Using pt-BR or pt-br, the result is the same, the api returns results for different languages.
Look at screenshot. In the image, I use pt-br, but using pt-BR had the same result.

mpc-hc-subtitles-issue

@opensubtitlesdev
Copy link

Sorry I don't know your application, or what these screenshots represent.

please go back to the basic and test the endpoints with insomnia, postman or a similar, then if you find something that isn't working you can copy it as CURL and send it to us, for example like this.

curl --request GET
--url 'https://api.opensubtitles.com/api/v1/subtitles?query=matrix&=&languages=pt-BR'
--header 'Api-Key: MY_API_KEY'
--header 'User-Agent: test' \

@LeoKesler
Copy link
Author

@opensubtitlesdev I am not a developer. I do not have an API Key.

About the screenshot, I will explain. It is easy to understand.

The white arrow shows the language I selected, pt-br.

The yellow arrow shows the subtitles and languages returned by API, when I use pt-br.

If you take a look, you will see the API returned many languages except pt-br. French, English, Italian etc... except pt-br.

mpc-hc-subtitles-issue

@clsid2
Copy link
Owner

clsid2 commented Feb 1, 2024

@opensubtitlesdev
.org uses pb instead of pt-br.
Can you give a list of all supported language codes for .com?
I need to add special handling to send pt-br as parameter. Currently all code uses ISO 639 format (2 or 3 letters).

@opensubtitlesdev
Copy link

opensubtitlesdev commented Feb 1, 2024

@opensubtitlesdev .org uses pb instead of pt-br. Can you give a list of all supported language codes for .com? I need to add special handling to send pt-br as parameter. Currently all code uses ISO 639 format (2 or 3 letters).

sure. it was in my first post
https://opensubtitles.stoplight.io/docs/opensubtitles-api/1de776d20e873-languages

take the list from the API, I recently added more languages and the list in the docs is not up to date

as our app is rails based, we simply followed the rails way, having ISO 639-1 and ISO 3166-1 alpha-2, to handle either simple languages, or languages with a regional specific, with iso 639 in 3 chars you can't handle things like portuguese from mozambique or brasil, we had to use an alternative table with things like that pb that doesn't exist anywhere else...

@clsid2
Copy link
Owner

clsid2 commented Feb 1, 2024

Fixed

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

No branches or pull requests

3 participants