Live Subtitles unable to login to OpenSubtitles.org

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
CrosstownTee
Posts: 2
Joined: Mon Apr 06, 2020 4:42 am

Live Subtitles unable to login to OpenSubtitles.org

Post by CrosstownTee »

Since a couple of days my UMS 9.3.0 and 9.3.1 are unable to fetch any subtitles using the Live Subtitles feature.
It seems like the login UMS needs to perform on OpenSubtitles.org fails. I've found no settings concerning this, so I presume it's hardcoded, these credentials?

The Live Subtitles folder does appear, but when selecting the folder, and the movie inside, UMS logs this:

ERROR 2020-04-05 18:41:22.545 [pool-6-thread-21] OpenSubtitles replied with an error, aborting: Error: Unauthorized
ERROR 2020-04-05 18:41:22.546 [pool-6-thread-21] OpenSubtitles login was aborted


With Trace logging active, this is what happens:

DEBUG 2020-04-05 18:48:14.332 [pool-6-thread-20] net.pms.util.OpenSubtitle Trying to log in to OpenSubtitles
...
TRACE 2020-04-05 18:48:14.378 [pool-6-thread-20] net.pms.util.OpenSubtitle Sending OpenSubtitles login request:
<methodCall>
<methodName>LogIn</methodName>
<params>
<param>
<value>
<string/>
</value>
</param>
<param>
<value>
<string/>
</value>
</param>
<param>
<value>
<string/>
</value>
</param>
<param>
<value>
<string>Universal Media Server v1</string>
</value>
</param>
</params>
</methodCall>
...
TRACE 2020-04-05 18:48:16.045 [pool-6-thread-20] net.pms.util.OpenSubtitle Parsing OpenSubtitles login response
TRACE 2020-04-05 18:48:16.053 [pool-6-thread-20] net.pms.util.OpenSubtitle Received OpenSubtitles login response:
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>status</name>
<value>
<string>401 Unauthorized</string>
</value>
</member>
<member>
<name>seconds</name>
<value>
<double>0.001</double>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>

ERROR 2020-04-05 18:48:16.055 [pool-6-thread-20] net.pms.util.OpenSubtitle OpenSubtitles replied with an error, aborting: Error: Unauthorized
TRACE 2020-04-05 18:48:16.055 [pool-6-thread-20] net.pms.util.OpenSubtitle
net.pms.util.OpenSubtitle$OpenSubtitlesException: Error: Unauthorized
at net.pms.util.OpenSubtitle$StatusCode.handleStatusCode(OpenSubtitle.java:4760)
at net.pms.util.OpenSubtitle.checkStatus(OpenSubtitle.java:483)
at net.pms.util.OpenSubtitle.login(OpenSubtitle.java:414)
at net.pms.util.OpenSubtitle.findSubtitles(OpenSubtitle.java:591)
at net.pms.dlna.SubSelFile.discoverChildren(SubSelFile.java:43)
at net.pms.dlna.DLNAResource.discoverChildren(DLNAResource.java:1439)
at net.pms.dlna.DLNAResource.discoverWithRenderer(DLNAResource.java:1302)
at net.pms.dlna.DLNAResource.getDLNAResources(DLNAResource.java:1224)
at net.pms.remote.RemoteBrowseHandler.mkBrowsePage(RemoteBrowseHandler.java:44)
at net.pms.remote.RemoteBrowseHandler.handle(RemoteBrowseHandler.java:236)
at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
at sun.net.httpserver.AuthFilter.doFilter(Unknown Source)
at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(Unknown Source)
at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
at sun.net.httpserver.ServerImpl$Exchange.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
ERROR 2020-04-05 18:48:16.056 [pool-6-thread-20] net.pms.util.OpenSubtitle OpenSubtitles login was aborted


This has been working perfectly for months... any idea what's going wrong here?
Attachments
debug.zip
(3.05 KiB) Downloaded 327 times
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Live Subtitles unable to login to OpenSubtitles.org

Post by Nadahar »

Blame SARS2....: https://forum.opensubtitles.org/viewtop ... 489#p43489

It should be possible to configure a user for UMS to use unless this has been broken since I made it. That means you'd have to create an opensubtitles.org user and store the username and password in UMS' "creds" file.

I wouldn't be too surprised if the API stays "lock down" also after the pandemic is over.
CrosstownTee
Posts: 2
Joined: Mon Apr 06, 2020 4:42 am

Re: Live Subtitles unable to login to OpenSubtitles.org

Post by CrosstownTee »

Nadahar wrote: Mon Apr 06, 2020 5:11 am It should be possible to configure a user for UMS to use unless this has been broken since I made it. That means you'd have to create an opensubtitles.org user and store the username and password in UMS' "creds" file.
Hi Nadahar, thanks for your reply, Any idea where I would find the "creds" file?

Best regards!
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Live Subtitles unable to login to OpenSubtitles.org

Post by Nadahar »

You might have to create it yourself. I'm not sure to what extent this is documented or where this documentation exists, but it actually a very simple text file. I think it should be placed in the UMS profile folder (where you find UMS.conf), and I think it should be names "UMS.cred".

The template is:

Code: Select all

# Add credentials to the file
# on the format tag=user,password
# For example:
# channels.xxx=name,secret
The clue thus is what the "tag" is, but from a quick look in the source code it looks like the tag is simply "opensubtitles".

If this is the case, all you would need to do is to create a file, UMS.cred, in the correct folder, containing the following:

Code: Select all

opensubtitles=<username>,<password>
Post Reply