smplayer-dev / smplayer

Free Media Player for Windows, Linux and Mac OS with YouTube support.
https://smplayer.info
GNU General Public License v2.0
667 stars 94 forks source link

OpenSubtitles.org API deprecation and end of life - upgrade to new REST API on OpenSubtitles.com #833

Closed Thierry7754 closed 9 months ago

Thierry7754 commented 11 months ago

Hello,

OpenSubtitles.org has announced the end of its original API and will cease functioning by the end of 2023 (https://forum.opensubtitles.org/viewtopic.php?f=1&t=18389&p=49836).

I would like an enhancements / a new feature to be able to consume the new REST API on opensubtitles.com as a replacement of the current option available in SMplayer.

Thx in advance for your dev.

Regards,

smplayer-dev commented 11 months ago

I'm already working in the adaptation for the REST API.

smplayer-dev commented 11 months ago

Version 10184 uses the REST API. Please test and let me know if you find any problem.

Thierry7754 commented 11 months ago

Hello Ricardo,

Thx for your support. I've tested 2 package in the version 10184 (smplayer-23.6.0.10184-x64-qt5.6-unsigned.exe and smplayer-23.6.0.10184-x64-unsigned.exe) I've noticed subtitles are still provided frrom opensubtitles.org instead of opensubtitles.com I was expecting a way to enter the API key and I don't find any field for that. Unless I'am mistaken, I was not able to pull subtitles from opensubtitles.com with the API with the version 10184 Capture

Access to API DOC => https://opensubtitles.stoplight.io/docs/opensubtitles-api/e3750fd63a100-getting-started

Thierry7754 commented 11 months ago

API key created on opensubtitles.com

Capture2

smplayer-dev commented 11 months ago

I haven't changed the opensubtitles link yet, but it's using opensubtitles.com. As far as I know you don't need to use your own api key, that's why there isn't a field for it. The code uses my api key.

Thierry7754 commented 10 months ago

Hi Ricardo, Subtitles can be downloaded with my user account from opensubtitles.com. But behavior in this version seems to have changed.

Previously, when I clicked on "find subtitle at..." in the subtitles drop-down menu, all subtiles available in opensubltitles.org was directly provided in the list. Now, the list is empty by default. When I click on the search button, nothing happened. To retreive subtitles you must click on the "refresh button". Could you applied same behavior as before ? Thx for your support.

smplayer-dev commented 10 months ago

The behavior should be the same as before. Click on the Options button in the subtitles window and select "Hash" as search method and see if that fixes it.

hnsteyding commented 10 months ago

I have the same behavior - all commits after 18554be and the latest test release version 23.6.0.10190 show zero results. It doesn't matter if i select "Hash", "Filename" or "Hash and Filename" as search method in "Options" in the subtitles window.

Only the official release 23.6.0 (revision 10157) or test release version 23.6.0.10170 works.

smplayer-dev commented 10 months ago

Please send the smplayer log after the subtitle search so that I can try to figure out the problem.

hnsteyding commented 10 months ago

I've made log files from different revisions/commits: smplayer-log-working-test-release-revision-10176.log smplayer-log-not-working-commit-910a0eb-revision-10195.log smplayer-log-not-working-latest-test-release-revision-10190.log smplayer-log-working-official-release-23.6.0.log

smplayer-dev commented 10 months ago

If I search for "matrix" I get 51 results. Are you filtering for a specific language?

hnsteyding commented 10 months ago

I search for "matrix" in all languages and get '100 files available' in working releases/commits: grafik

If i switch to english language in working releases/commits i get 9 results and '100 files available': grafik

smplayer-dev commented 10 months ago

Check this version

Now if you select a language it will search for subtitles in that language only.

hnsteyding commented 10 months ago

@smplayer-dev the latest test release version 23.6.0.10197 show also zero results so i could not check if i select a language it will search for subtitles in that language only.

smplayer-dev commented 10 months ago

Select a language and then search, see if now you get results.

hnsteyding commented 10 months ago

OK, i found out that it works from Version 23.6.0.10184 on only if i load a video file or media and then search fo subtitles. Works also then without select a language.

Search only for a title without previously load a video file or media shows still zero results.

smplayer-dev commented 10 months ago

I can't reproduce this problem in my computer. I play a video, open the find subtitles window and it displays some results. What's the file name of you video?

hnsteyding commented 10 months ago

I've compile SMplayer against latest source code (Version 23.6.0.10199) and now it works also without previously load a video file or media.

I use an ISO file from Disneys cartoon MULAN and also type "Matrix" in "Search for title" field in "Find Subtitles" window without previously load MATRIX video file or media - every time i got expected results now.

Everything works now - i don't know what was wrong in the past....

Shadowized commented 10 months ago

I don't know if I should make a new topic for this but when I'm searching with v23.12.0.10207, for instance "Some.Show.Name.S05E01" I'm being given results for S01,S02,S03,S04 and so on, if I wrap it in quotes I get only one result when there is meant to be five. Not sure what to do.

smplayer-dev commented 9 months ago

I don't know if I should make a new topic for this but when I'm searching with v23.12.0.10207, for instance "Some.Show.Name.S05E01" I'm being given results for S01,S02,S03,S04 and so on, if I wrap it in quotes I get only one result when there is meant to be five. Not sure what to do.

This problem may be fixed in version 10213: https://github.com/smplayer-dev/smplayer/releases/tag/v23.12.0.10213

Shadowized commented 9 months ago

I just tested v23.12.0.10213 and the searches I performed are returning the correct results now 👍

mkey commented 9 months ago

Hello, referring to the REST API issue.

I have now installed SMPlayer 23.12.0-1. For the past few days subtitles downloaded through "Subtitles \ Find subtitles on OpenSubtitles.org..." will only contain one subtitle line stating "Become OpenSubtitles.org VIP member to get subtitles -> osdb.link/vip"

Does this mean that this functionality from now onward is limited to opensubtitle VIP members?

smplayer-dev commented 9 months ago

No. That happens with the old API.

From version 23.12 smplayer uses the new API and the downloaded subtitles are correct. Be sure you're really using version 23.12.

mkey commented 9 months ago

No. That happens with the old API.

From version 23.12 smplayer uses the new API and the downloaded subtitles are correct. Be sure you're really using version 23.12.

Thanks for the reply and confirmation. I am quite confident that I am using the correct version.

image

I have updated my system a few hours ago but haven't still rebooted. Possibly that's causing the issue, but smplayer is obviously on the correct version.

mkey commented 9 months ago

OK, I have downloaded your appimage and with that the subtitle download is working fine. I see also that in this version you have renamed the button from "Find subtitles" to "Download subtitles".

Maybe/very probably an issue with whatever is available in the Arch repository. Thanks.

Update:

All OK on my end after performing a reboot. Very strange stuff, it shows the correct version but the module being run is older.