Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
User avatar
SlackerNReckless
Posts: 6
Joined: Thu Feb 14, 2013 3:11 am
Contact: Website

"moviehash" search parameter in New REST API not woking (I'm getting 500: Internal Server Error)

Mon May 04, 2020 7:04 pm

Hi! :-)

I was talking last week by e-mail ([email protected]) about some problems I had with the new REST API (https://www.opensubtitles.com/docs/api/ ... entication) but it was my fault as I hadn't an account at opensubtitles.com (the .com and new Beta site). Well, you had replied me saying about, I registered there using the username "slackerneckless" and it's working now. But not totally.

I need to say I have an account with the same username "SlackerNReckless" at opensubtitles.org (the .org one) and it's the username I use here too. This since "Thu 28 Aug 02:03:44 2008" and I registered an User Agent in "Wed 13 Feb 09:26:09 2013" and I have a Developer rank at .org site.

Well, I built a simple Delphi application using the old XML-RPC Api and of course it's working perfectly using the Delphj implementation found here: (https://www.yanniel.info/2012/01/open-s ... elphi.html) linked in the page: (https://trac.opensubtitles.org/projects ... msUsingAPI) and the CalcGabestHash's Delphi function found here: (https://trac.opensubtitles.org/projects ... ourceCodes)

Note: I had to change the Delphi implementation later when the site moved to https (SSL) adding the IdSSLIOHandler Delphi component from Indy Projects http://ww2.indyproject.org/index.en.aspx) using external DLL libraries libeay32.dll and ssleay32.dll. Anyway it's working perfectly. ;-)

Okay, here goes:

Using the specifications found here: https://www.opensubtitles.com/docs/api/ ... -subtitles I did some tests and using the 'query' parameter and it worked but not using the 'moviehash' parameter. Everytime I used it I got a 500: Internal Server Error and a JSON returned saying the same.

I hashed some movies using the CalcGabestHash's Delphi function but nothing worked. I noticed there is no example for it there (in API documentation), only for 'query' and the 'type' optional parameter is just mentioned.

I even tried using cURL to see if I was doing something wrong. But I got the same error.

Note :

I had sent a new message to [email protected] in Apr, 30th of 2020, last Thursday regarding this new issue but after 24 hours I got a message saying it was not delivered because the mailbox didn't exist or didn't answer. So I sent a new one in May, 1st of 2020, last Friday to [email protected]. I waited 3 days for a reply and now I'm using the forum for help.

Well, I had sent a message to [email protected] replying the e-mail I had received about the new REST API with the subject: "OpenSubtitles API update, REST API testing" and I ended up getting replies from [email protected] with a support number/ticket attached to it like this: "Re: OpenSubtitles API update, REST API testing [#629970]". We even talked with each other last week.

Okay. That's all for now! Sorry for any inconvenience regarding this message and thanks in advance for reading it. See ya! ;-)
A RECKLESS SLACKER! ;-)

User avatar
SlackerNReckless
Posts: 6
Joined: Thu Feb 14, 2013 3:11 am
Contact: Website

Re: "moviehash" search parameter in New REST API not woking (I'm getting 500: Internal Server Error)

Fri May 08, 2020 7:23 am

Hi! :-)

I'm not complaining but after 72 hours and almost 500 views of this topic I'm still not getting a decent reply about this subject.

I just find interesting the fact someone comes here, talks about a problem and the admins/moderators simply don't care about.

Well, I sent the e-mail again to 'support' last monday, May, 4th of 2020 and this time it was sent, I didn't receive a message saying the mailbox didn't exist.

If you care here its subject: "moviehash" Search parameter in New REST API not woking (I'm getting 500: Internal Server Error) sent in "Mon, 4 May 2020 20:02:22 UTC (GMT)"

I even offered myself to help testing the API there, something I'd love to.

Anyway, I know the new RESP API is under testing and the new site is Beta but come on... This is not a problem I'm having. This is a problem with your API and probably other users are having it too.

Anyway... here are some screenshots using cURL:

https://imgur.com/3OLbiv2
https://imgur.com/0WmQB7o

I have an ImgUR account and probably I will delete those screenshots later, okay? :-)

I had to cover my password with that red rectangle and as you can see I'm getting the authorization token perfectly. The search with "query" parameter is working perfectly but nothing works with "moviehash" parameter. It should return a JSON data with 0 results and not a 500: Internal Server Error.

The movie is "Bloodshot (2020)". It's a YTS/YIFY release, their 720p and Blu-Ray one there. As I think it's forbidden to provide links leading to pirated content I won't provide them, so google for the site and get their release if you want to check the hash of the movie.

Okay... sorry again and probably this will be my last message here as I'm losing my time. Unless you reply it, of course. Well, the lack of support is getting "impressive"! And I won't annoy you anymore.

I'm a very old OpenSubtitles.org user, since 2008 and since 2013 I have an APP Developer rank at the .org site when I asked for an User Agent for the old XML-RPC API to use it in my tiny Delphi application I have like I told above. I never had any problems with it except when the site moved to https (SSL) and I quickly modified my app here.

My app gets subtitles basing on hash first, else it gets by IMDb ID.

Okay... see ya! I hope so! ;-)
A RECKLESS SLACKER! ;-)

User avatar
SmallBrother
Site Admin
Posts: 3724
Joined: Sun Mar 04, 2012 12:59 pm
Location: Somewhere on this globe

Re: "moviehash" search parameter in New REST API not woking (I'm getting 500: Internal Server Error)

Fri May 08, 2020 11:15 am

Please be advised that this is a free service. You are not entitled to an immediate response or to a response at all.

Speaking for myself, usually I only reply if I have something to say. Not replying does NOT mean I "simply don't care". This could be the case for other users/admins/mods as well.

Still, others MAY have an answer, but MAY have other things to do as well. I can imagine your jumping to conclusions, cynical tone and pushing doesn't really help to get you higher on their priority list.

That being said, your developer rank is being respected and your offered help is being appreciated.

Please be patient.
Nowadays a VPN is a must for everyone. A VPN allows you safe surfing and protects you against spying governments and companies.
I advise AirVPN - from € 2,75 per month. Click the below banner for more info.


Image

os_dev
Posts: 194
Joined: Wed Oct 17, 2018 3:42 pm

Re: "moviehash" search parameter in New REST API not woking (I'm getting 500: Internal Server Error)

Fri May 08, 2020 2:47 pm

Hi! :-)

I'm not complaining but after 72 hours and almost 500 views of this topic I'm still not getting a decent reply about this subject.
sorry, the main dev (me) was a little busy for the past few days and I couldn't answer faster. The API is not ready for production, only for experiment, so please understand we don't have a support process in place yet.

I got the messages for bloodshot, it was unfortunate all the tests were made with the same title, it just happens this movie had a sync problems with the old site and none of the subtitles were on the site, so it was normal they didn't show up in the API.

The 500 error is now fixed, thanks for trying it out, the movie bloodshot is also now correctly imported so your previous tests should pass.

Let me know if there's anything else, I'm gonna have more time now.

cheers

User avatar
SlackerNReckless
Posts: 6
Joined: Thu Feb 14, 2013 3:11 am
Contact: Website

Re: "moviehash" search parameter in New REST API not woking (I'm getting 500: Internal Server Error)

Fri May 08, 2020 3:12 pm

For Mr. SmallBrother:

Hey! I'm cool, man! Or should I say, bro! 8) And relax... I'm very patient. Thanks for replying me. :)

And for Mr. os_dev:

Yeah... I noticed the API is still experimental, I even did read the last replies of Mr. oss in the topic: [NEW] REST search, JSON results

I'm aware it will delay 1..2 years to be fully implemented and I'm aware the fact both .org and .com sites are different, they use different databases, etc. I got this information from one of replies I received from 'support' by e-mail last week when they asked me to create an account in the .com one.

Anyway... thanks a lot for fixing the issue, I tested it right now, working like a charm and of course, replying me too! :)

My best regards! :wink:
A RECKLESS SLACKER! ;-)

os_dev
Posts: 194
Joined: Wed Oct 17, 2018 3:42 pm

Re: "moviehash" search parameter in New REST API not woking (I'm getting 500: Internal Server Error)

Fri May 08, 2020 5:51 pm

they use different databases, etc.
on this point I have to say they should normally be always in sync, with only a few hours delay, there's glitches in the system once in a while, but normally if a sub doesn't appear on .com, it means the original file is corrupted anyway
Hey! I'm cool, man! Or should I say, bro! 8) And relax... I'm very patient. Thanks for replying me. :)
All good then, I'm really happy to have someone to talk with regarding the API

User avatar
SlackerNReckless
Posts: 6
Joined: Thu Feb 14, 2013 3:11 am
Contact: Website

Re: "moviehash" search parameter in New REST API not woking (I'm getting 500: Internal Server Error)

Sat May 09, 2020 2:47 am

on this point I have to say they should normally be always in sync, with only a few hours delay, there's glitches in the system once in a while, but normally if a sub doesn't appear on .com, it means the original file is corrupted anyway

All good then, I'm really happy to have someone to talk with regarding the API
Oh, man... that's cool! 8)

About the Search endpoint:

"moviehash" parameter in /api/v1/search is totally working for both movie and tv episodes. Yeah... I checked some video files with TV episodes here. I didn't check for tvshow only as "type" is an optional parameter for this endpoint I think it will work pretty well. I didn't test "type" and "query" of course was already working.

And the other search endpoints /api/v1/search/tv and /api/v1/search/movie they don't really interest me as for precise (read this as "synchronized") subtitles I always get subtitles by hash first else their 'IMDb ID' like I already mentioned above.

About the Infos endpoint:

Language Tables, User Data and List Subtitle Formats, well, As I don't need them I didn't even bother testing them and actually I never will use them.

About the Find endpoint:

I found pretty odd the fact now you have to use two endpoints /api/v1/find/tv and /api/v1/find/movie for episodes of TV shows and movies considering the old XML-RPC API didn't have two "endpoints" for getting subtitles by IMDb ID.

Well, if you want to get subtitles by IMDb ID like my case, you will need them.

Not counting I will have to add a ComboBox with two options like Movie/TV Episode in my Delphi app. Not a real problem. Just telling you about, okay? :-)

At least I could get subtitles for TV episodes without passing their "parent_id" parameter as the only parameters I actually need (and used in my tests) are "imdbid" and "languages".

By the way, the "languages" parameter is not documented in the list of parameters (https://www.opensubtitles.com/docs/api/ ... x.htm#find) of both Find endpoints, but the examples feature it. Just warning you about the lack of it, okay?

And please keep this way, as it would be a bit annoying for me having to get the "parent_id" of a TV show first (actually, its ID) and then use this endpoint to get the subtitles later. Like I said, I only care for the IMDb ID one. Thanks!

About the Download endpoint:

Fine! The /api/v1/download is working perfectly, got the resulting JSON, the link of the file and I could download it without problems

About the Discover endpoint:

Nice! But finding about most downloaded movies and popular movies are let's say... entertaining! :D Well... you know. I don't intend to use them like the Info endpoints above.

And a final consideration

I'm making a fork of my "OpenSubtitles Downloader" Delphi app called "OpenSubtitles Downloader (REST)" I still will continue using the old XML-RPC one until you stop using the old API. Anyway... this is entirely my problem now.

Okay! That's all I wanted to say about. Thanks for everything! Hugs! :wink:

P.S. I won't say my nationality publicly here, but I'm not American neither English is my native language. I can read it, write it, speak it but sadly I can't hear English perfectly. I still understand about 80..90% of the spoken words. Strangely I get English subtitles to watch English-language movies as some subtitles in my native language are let's say hilarious. Some translations are laughable. :lol:
A RECKLESS SLACKER! ;-)

User avatar
oss
Site Admin
Posts: 5878
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: "moviehash" search parameter in New REST API not woking (I'm getting 500: Internal Server Error)

Tue May 12, 2020 10:14 am

ok perfect it is solved, if you will find out some issues with new REST api, send feedback. Also your posts are welcome, just try to keep them short (if something work, no need to write it works :)

thanks for patience, we are busy with developing

os_dev
Posts: 194
Joined: Wed Oct 17, 2018 3:42 pm

Re: "moviehash" search parameter in New REST API not woking (I'm getting 500: Internal Server Error)

Tue May 12, 2020 11:01 am

I still got a lot of answers for you SlackerNReckless, I'm improving the endpoints and documentation, will get back here with comments asap.

User avatar
SlackerNReckless
Posts: 6
Joined: Thu Feb 14, 2013 3:11 am
Contact: Website

Re: "moviehash" search parameter in New REST API not woking (I'm getting 500: Internal Server Error)

Tue May 12, 2020 9:35 pm

ok perfect it is solved, if you will find out some issues with new REST api, send feedback. Also your posts are welcome, just try to keep them short (if something work, no need to write it works :)

thanks for patience, we are busy with developing
Okay, ! I'll keep them short. Thanks a lot! :-)
I still got a lot of answers for you SlackerNReckless, I'm improving the endpoints and documentation, will get back here with comments asap.
Nice! I will love to read the comments later asap too. :P See ya! ;-)
A RECKLESS SLACKER! ;-)

os_dev
Posts: 194
Joined: Wed Oct 17, 2018 3:42 pm

Re: "moviehash" search parameter in New REST API not woking (I'm getting 500: Internal Server Error)

Mon Jun 08, 2020 9:46 am


About the Search endpoint:

"moviehash" parameter in /api/v1/search is totally working for both movie and tv episodes. Yeah... I checked some video files with TV episodes here. I didn't check for tvshow only as "type" is an optional parameter for this endpoint I think it will work pretty well. I didn't test "type" and "query" of course was already working.

And the other search endpoints /api/v1/search/tv and /api/v1/search/movie they don't really interest me as for precise (read this as "synchronized") subtitles I always get subtitles by hash first else their 'IMDb ID' like I already mentioned above.
I added an extra endoint where you can query by movie ID, or by IMDBID

GET /api/v1/find


so to be short - there are some specific tv/movie endpoints because of "themoviedb.com" who don't use unique ID's like IMDB, so a tv serie and a movie can have the same TMDB ID

also, themoviedb is the best API I ever. worked with, I just try to follow their logic



About the Find endpoint:

I found pretty odd the fact now you have to use two endpoints /api/v1/find/tv and /api/v1/find/movie for episodes of TV shows and movies considering the old XML-RPC API didn't have two "endpoints" for getting subtitles by IMDb ID.
Works fine to have a unique set of endpoints if work with IMDB ID's, not with themoviedb


Well, if you want to get subtitles by IMDb ID like my case, you will need them.
so now you can, without specifying the type, in this endpoint :)

GET /api/v1/find

Not counting I will have to add a ComboBox with two options like Movie/TV Episode in my Delphi app. Not a real problem. Just telling you about, okay? :-)

At least I could get subtitles for TV episodes without passing their "parent_id" parameter as the only parameters I actually need (and used in my tests) are "imdbid" and "languages".

By the way, the "languages" parameter is not documented in the list of parameters (https://www.opensubtitles.com/docs/api/ ... x.htm#find) of both Find endpoints, but the examples feature it. Just warning you about the lack of it, okay?
thanks for pointing it out !

And please keep this way, as it would be a bit annoying for me having to get the "parent_id" of a TV show first (actually, its ID) and then use this endpoint to get the subtitles later. Like I said, I only care for the IMDb ID one. Thanks!
the idea is that you can either get subtitles for a specific movie or episode, directly by its id or the IMDB id, or sending the parent id or imdbid, then specify season/episode
Nice! But finding about most downloaded movies and popular movies are let's say... entertaining! :D Well... you know. I don't intend to use them like the Info endpoints above.
Yeah, well it's there, makes the documentation look a bit bigger doesn't it ?


And a final consideration

I'm making a fork of my "OpenSubtitles Downloader" Delphi app called "OpenSubtitles Downloader (REST)" I still will continue using the old XML-RPC one until you stop using the old API. Anyway... this is entirely my problem now.
will still take some time until we take down the old api, should be all good !
Okay! That's all I wanted to say about. Thanks for everything! Hugs! :wink:

P.S. I won't say my nationality publicly here, but I'm not American neither English is my native language. I can read it, write it, speak it but sadly I can't hear English perfectly. I still understand about 80..90% of the spoken words. Strangely I get English subtitles to watch English-language movies as some subtitles in my native language are let's say hilarious. Some translations are laughable. :lol:
haha don't worry, no native english speakers at opensubtitles - we have very various and flowery accents, and we also watch english language films with english subtitles

User avatar
SlackerNReckless
Posts: 6
Joined: Thu Feb 14, 2013 3:11 am
Contact: Website

Re: "moviehash" search parameter in New REST API not woking (I'm getting 500: Internal Server Error)

Tue Jun 09, 2020 6:47 am


I added an extra endoint where you can query by movie ID, or by IMDBID

GET /api/v1/find


so to be short - there are some specific tv/movie endpoints because of "themoviedb.com" who don't use unique ID's like IMDB, so a tv serie and a movie can have the same TMDB ID

also, themoviedb is the best API I ever. worked with, I just try to follow their logic

so now you can, without specifying the type, in this endpoint :)

GET /api/v1/find
That's amazing, man! I loved this! :-)

Sadly IMDb never had a public API, even OMDBAPI or the MyApiFilms are just wrappers for IMDb's search, but it's the best site ever for movies. The others will take some time and probably they never will reach it. Even Hollywood cites it a lot, even at Oscars! I know its history.

I know IMDb since 1996. Well, I was born in 1981 and I'll be 39 in August. I still dislike the fact they removed the boards in February of 2017. But they had problems dealing with them. A lot of trolls. Including myself! :lol:

Yeah... I used to troll a lot there. And actually this username SlackerNReckless was born there. Check my Wordpress site (it's linked my profile here), okay? ;-)

Actually they developed an API recently (https://developer.imdb.com/) but you need to pay for its access. So it sucks! :P

And I used to download their offline datasets in the past but now they limit them for contributors or under permission: (https://help.imdb.com/search/all?term=C ... oftware%3F)

(https://www.opensubtitles.com/docs/api/ ... x.htm#find) of both Find endpoints, but the examples feature it. Just warning you about the lack of it, okay?
thanks for pointing it out !
You're welcome! :-)
will still take some time until we take down the old api, should be all good !
No problem! 8)
haha don't worry, no native english speakers at opensubtitles - we have very various and flowery accents, and we also watch english language films with english subtitles
Great! See ya! ;-)
A RECKLESS SLACKER! ;-)

Return to “Developing”

Who is online

Users browsing this forum: No registered users and 38 guests