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

Adding Podnapisi.net as an alternative subtitle provider #761

Open
tomasklaen opened this issue Nov 2, 2023 · 2 comments
Open

Adding Podnapisi.net as an alternative subtitle provider #761

tomasklaen opened this issue Nov 2, 2023 · 2 comments

Comments

@tomasklaen
Copy link
Owner

Originally posted by @kasper93 in #490 (comment)

They provide XML API. Maybe it is not advertised well, but it is documented on forum here https://www.podnapisi.net/forum/viewtopic.php?f=62&t=26164#p212652.

Client that we added in MPC-HC 8 years ago is still working fine today. There is no captcha, login requirement, etc. Not sure if it uses latest api version, but it still works. They also support the same hash as opensubtitles.
https://github.com/mpc-hc/mpc-hc/blob/e37826845859bfbc360989aaef3807ef15a83768/src/mpc-hc/SubtitlesProvider.cpp#L548-L764

Apparently there is also JSON API Diaoul/subliminal#916 (comment) (MasterMind2k is podnapisi admin)

If you would be interested in adding it, I guess you can ping MasterMind2k with any questions. I don't want to summon him here prematurely :)

@tomasklaen
Copy link
Owner Author

If they have no limits and an API, I'd definitely like to add them as an alternative provider. But yeah, the API is undocumented. The XML thing from the forum post (for which I had to register an account 😢) is weird and old (even the endpoint has "old" in it, and that was 8 years ago). So I've tried to work out the json one from the subliminal issue:

https://hopp.sh/r/8GRtz2HsCk9q

The result is:

  • Dunno how to make search for multiple languages work. As soon as I set 2 delimited by comma like en,de I get no results.
  • No idea how to send the hash. And is it even the same hash open subtitles are using? Hashed 64kb from each end + file size?
  • Really slow, and sometimes I get 504 gateway timeout errors.

That's as much as I have time to reverse engineer it now.

@kasper93
Copy link

kasper93 commented Nov 2, 2023

is weird and old (even the endpoint has "old" in it, and that was 8 years ago).

Yeah, it got amended I think. Just use https://www.podnapisi.net/ppodnapisi/search

https://www.podnapisi.net/ppodnapisi/search?sK={keyword}&sJ={language},{language2}&sY={year}&sTS={season}&sTE={episode}&sMH={movie_hash}&sR={release}&sXML=1

As for download, you may use the http://www.podnaisi.net/subtitles/{ID}/download

https://hopp.sh/r/kM3cMh5W4K66 (if you remove sXML it responses with json, but year seems to not work then for whatever reason). But probably "new" API is also good candidate, I guess whichever works better. I agree it is not well defined, but seems to work and give some results. And like said before it is stable, because even old code still works.

No idea how to send the hash. And is it even the same hash open subtitles are using? Hashed 64kb from each end + file size?

Yes, the movie hash is/was the same as open subtitles is using, but not sure if it is supported in fact these days. Looking at web ui, there is no place to specify file/hash. So maybe it is not used these days.

EDIT:

Really slow, and sometimes I get 504 gateway timeout errors.

Agreed, but it depends, sometimes it is fast, sometimes it takes more time. Probably it is hosted on potato :)

EDIT2:

Maybe this also will give some insight https://github.com/Podnapisi-NET/service.subtitles.podnapisi xbmc plugin (but it is even different)

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

2 participants