Jump to content

OpenSubtitles - 406 Error Not Acceptable


Recommended Posts

Posted

Did some testing, it seems that you need an API-key to get subtitles from opensubtitles.com. But you can't enter it in the emby...

VERY IMPORTANT: In HTTP request must be both headers: Api-Key and Authorization stoplight.io doesn't allow to use in shown example both headers

Tested this with:

Login:
curl --request POST   --url https://vip-api.opensubtitles.com/api/v1/login   --header 'Accept: application/json'   --header 'Api-Key: xxxxxxxxxxxxxxxxxxxxxx'   --header 'Content-Type: application/json'   --header 'User-Agent:  <<emby v4.9.0.26>>'   --data '{
  "username": "xxxxx",
  "password": "xxxxx"
}'

result:

{"user":{"allowed_translations":10,"allowed_downloads":989,"level":"VIP Member","user_id":xxxxx,"ext_installed":false,"vip":true},"token":"xxxxxxxx the token xxxxxxxxxxxxxxxxx","status":200,"base_url":"vip-api.opensubtitles.com"}


Get subtitle:
curl --request POST \
  --url https://vip-api.opensubtitles.com/api/v1/download \
  --header 'Accept: application/json' \
  --header 'Api-Key: xxxxxxxxxxxxxxxxxxxxx' \
  --header 'Authorization: Bearer "xxxxxxxxxx got from login xxxxxxx' \
  --header 'Content-Type: application/json' \
  --header 'User-Agent: <<emby v4.9.0.26>>' \
  --data '{
  "file_id": 123
}'

result:

{"link":"https://www.opensubtitles.com/download/29B68F0E03D36CA9473DB442C17FB3495D5222245198FD188092A7D54C9436965C355301917FE2347416684F4FDCFE4555883D7FD1C55584F81C43836C2623F360A30F3792B8EEF60369162445DAEAD5634B39E13AD1022EEF44C719D5AD8D229D2053C419E304076104D38D6B15E697E3CCDBB6C97E13197159444559289210B2408/subfile/castle.rock.s01e03.webrip.x264-tbs.ettv.-eng.ro.srt","file_name":"castle.rock.s01e03.webrip.x264-tbs.ettv.-eng.ro.srt","requests":1,"remaining":988,"message":"Your quota will be renewed in 8 hours and 27 minutes (2024-07-14 23:59:59 UTC) ts=1720971127 ","reset_time":"8 hours and 27 minutes","reset_time_utc":"2024-07-14T23:59:59.999Z","uk":"count_uid_xxxxxx","uid":xxxxxx,"ts":1720123127}

Happy2Play
Posted
57 minutes ago, Wizb0y said:

Did some testing, it seems that you need an API-key to get subtitles from opensubtitles.com. But you can't enter it in the emby...

VERY IMPORTANT: In HTTP request must be both headers: Api-Key and Authorization stoplight.io doesn't allow to use in shown example both headers

Tested this with:

Login:
curl --request POST   --url https://vip-api.opensubtitles.com/api/v1/login   --header 'Accept: application/json'   --header 'Api-Key: xxxxxxxxxxxxxxxxxxxxxx'   --header 'Content-Type: application/json'   --header 'User-Agent:  <<emby v4.9.0.26>>'   --data '{
  "username": "xxxxx",
  "password": "xxxxx"
}'

result:

{"user":{"allowed_translations":10,"allowed_downloads":989,"level":"VIP Member","user_id":xxxxx,"ext_installed":false,"vip":true},"token":"xxxxxxxx the token xxxxxxxxxxxxxxxxx","status":200,"base_url":"vip-api.opensubtitles.com"}


Get subtitle:
curl --request POST \
  --url https://vip-api.opensubtitles.com/api/v1/download \
  --header 'Accept: application/json' \
  --header 'Api-Key: xxxxxxxxxxxxxxxxxxxxx' \
  --header 'Authorization: Bearer "xxxxxxxxxx got from login xxxxxxx' \
  --header 'Content-Type: application/json' \
  --header 'User-Agent: <<emby v4.9.0.26>>' \
  --data '{
  "file_id": 123
}'

result:

{"link":"https://www.opensubtitles.com/download/29B68F0E03D36CA9473DB442C17FB3495D5222245198FD188092A7D54C9436965C355301917FE2347416684F4FDCFE4555883D7FD1C55584F81C43836C2623F360A30F3792B8EEF60369162445DAEAD5634B39E13AD1022EEF44C719D5AD8D229D2053C419E304076104D38D6B15E697E3CCDBB6C97E13197159444559289210B2408/subfile/castle.rock.s01e03.webrip.x264-tbs.ettv.-eng.ro.srt","file_name":"castle.rock.s01e03.webrip.x264-tbs.ettv.-eng.ro.srt","requests":1,"remaining":988,"message":"Your quota will be renewed in 8 hours and 27 minutes (2024-07-14 23:59:59 UTC) ts=1720971127 ","reset_time":"8 hours and 27 minutes","reset_time_utc":"2024-07-14T23:59:59.999Z","uk":"count_uid_xxxxxx","uid":xxxxxx,"ts":1720123127}

I will assume since you are VIP you need to follow this topic as it is a different issue then the NotAcceptable error.

 

Posted

You'r right. i'm VIP and the error is unauthorized. I'll post it there.

Posted

HI, yes we are looking into it. Thanks.

Posted

Hi, please try again and let us know how things compare. Thanks.

chief2810
Posted

Working for me now! Thanks! 

  • Thanks 1
eddfish0409
Posted
17 hours ago, Luke said:

Hi, please try again and let us know how things compare. Thanks.

3u i wil try 

btw i wanna ask ,emby support dobly vision?

Posted
9 hours ago, eddfish0409 said:

3u i wil try 

btw i wanna ask ,emby support dobly vision?

HI, yes it depends on the device you're playing from.

eddfish0409
Posted
2024 年 7 月 15 日凌晨 12:44,Happy2Play 说:

我假设由于您是 VIP,因此您需要遵循此主题,因为它与 NotAcceptable 错误是不同的问题。

 

您好,您能告诉我们更多关于如何以及在何处输入此命令行的信息吗?

Happy2Play
Posted
17 minutes ago, eddfish0409 said:

Hello, can you tell us more about how and where to enter this command line?

Sorry I don't follow as the only think you need to do is enter your OpenSubtitles.com username and password into the plugin.  If you are still having issues you will need to ensure to post a new server log.

eddfish0409
Posted
2 hours ago, Happy2Play said:

Sorry I don't follow as the only think you need to do is enter your OpenSubtitles.com username and password into the plugin.  If you are still having issues you will need to ensure to post a new server log.

it's work thanks!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...