Page 1 of 1

[OpenSubtitles] Again 401 Unauthorized and weird user stats

Posted: 10 Oct 2024, 17:36
by mrreku
Hi All,
Since yesterday I started to notice the following and not getting any srt using filebot:

Console Output: Select all

Get [English] subtitles for 11 files
Looking up subtitles by hash via OpenSubtitles
Lookup by hash failed: 401 Unauthorized
Looking up subtitles by name via OpenSubtitles
Search by name failed: 401 Unauthorized
Looking at the stats I get:

Console Output: Select all

$ filebot -script fn:osdb.stats                                               
limit_check_by = user_ip
global_24h_download_limit = 200
client_ip =XXX.XXX.XXX.XXX
client_24h_download_count = 2
client_download_quota = 999999999
client_24h_download_limit = 999999999
Done ヾ(@⌒ー⌒@)ノ
Is there any correlation between the 401 and the weird client_24h_download_limit and client_download_quota ??
Is there a way were can get more info /verbose debug around the 401 Error?

Thanks All.

Re: [OpenSubtitles] Again 401 Unauthorized and weird user stats

Posted: 11 Oct 2024, 02:52
by rednoah
:?: Are you using an OpenSubtitles.org VIP account?


:idea: 401 Unauthorized is the error message that FileBot gets from the OpenSubtitles.org XML-RPC API, which may or may not be in the process of shutting down, at the very least for non-VIP users, or it could be an unrelated temporary issue on the server-side.


:arrow: You can configure FileBot to use the new REST API instead. See OpenSubtitles.com REST API. Make sure to configure your opensubtitles.com (not opensubtitles.org) user details when using the new API.

Re: [OpenSubtitles] Again 401 Unauthorized and weird user stats

Posted: 11 Oct 2024, 10:59
by mrreku
Thanks for your prompt reply.
I didn't have a VIP account so to be on the safe side ( and I think it's also deserved after 8000 srt downloaded ) I purchased one this morning.
I then did:

Shell: Select all

filebot -clear-cache
filebot -script 'fn:configure' --def 'osdbUser=USER' 'osdbPwd=PSW'
but I still getting the same user info with the crazy quota and limit and more over I am still getting the usual 401 errors.

@rednoah you mentioned to switch to the REST API and about that I wanted to ask you:
How can I revert back to the XML-RPC if switching to the REST API doesn't solve the issue?

-Thanks

Re: [OpenSubtitles] Again 401 Unauthorized and weird user stats

Posted: 11 Oct 2024, 11:09
by rednoah
:arrow: Switch to REST API:

Shell: Select all

filebot -script fn:properties --def net.filebot.WebServices.OpenSubtitles.v2=true
:arrow: Switch to XML-RPC API:

Shell: Select all

filebot -script fn:properties --def net.filebot.WebServices.OpenSubtitles.v2=false
:arrow: Switch to default:

Shell: Select all

filebot -script fn:properties --def net.filebot.WebServices.OpenSubtitles.v2=

Re: [OpenSubtitles] Again 401 Unauthorized and weird user stats

Posted: 11 Oct 2024, 13:17
by mrreku
Hey rednoah Thank you so much!!!
by changing to the REST API and having the VIP account now everything is working.
If I may, I got one last question:

Upon changing to the REST API I am now don't see any stats while using:

Console Output: Select all

$ filebot -script fn:osdb.stats                                                    
Done ヾ(@⌒ー⌒@)ノ
Is it normal? or I need a different command?
Thanks again

Re: [OpenSubtitles] Again 401 Unauthorized and weird user stats

Posted: 11 Oct 2024, 14:03
by rednoah
Looks like we'll need to update the osdb.stats script to also work for REST API.


You can try the latest revision like so:

Shell: Select all

filebot -script dev:osdb.stats

Re: [OpenSubtitles] Again 401 Unauthorized and weird user stats

Posted: 11 Oct 2024, 14:15
by mrreku

Code: Select all

➜ filebot -script dev:osdb.stats
No such property: k for class: __script_b5a89d6be577407d5a2e721506a718db
Possible solutions: log, now
groovy.lang.MissingPropertyException: No such property: k for class: __script_b5a89d6be577407d5a2e721506a718db
Possible solutions: log, now
        at Script.doCall(Script:13)
        at Script.run(Script:12)
        at net.filebot.GroovyEngine.eval(Unknown Source)
        at net.filebot.cli.ScriptShell.evaluate(Unknown Source)
        at net.filebot.cli.ArgumentProcessor.runScript(Unknown Source)
        at net.filebot.cli.ArgumentProcessor.run(Unknown Source)
        at net.filebot.Main.main(Unknown Source)

Error (o_O)
Unfortunately doesn't work for me :/

Re: [OpenSubtitles] Again 401 Unauthorized and weird user stats

Posted: 11 Oct 2024, 17:12
by rednoah
Please try again. Should work now. You can grab the latest revision from a few minutes ago like so:

Shell: Select all

filebot -clear-cache
filebot -script dev:osdb.stats