thetbdb API "Not authorized"

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
checksumerror
Donor
Posts: 14
Joined: 23 Mar 2017, 19:52

thetbdb API "Not authorized"

Post by checksumerror » 06 Apr 2019, 14:32

So I have some files stuck, mainly because they are not being identified correctly. For example wrong season, trying overwrite the first season.

However first problem appears that the thetvdb API is responding with Not Authorized.

Please can someone tell me how to tell filebot my API details?

Info...

Code: Select all

FileBot 4.8.5 (r6224)
JNA Native: 5.2.2
MediaInfo: 17.12
7-Zip-JBinding: 9.20
Chromaprint: fpcalc version 1.4.3
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-04-03 (r558)
Groovy: 2.5.6
JRE: Java(TM) SE Runtime Environment 1.8.0_131
JVM: true-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 3 Core / 1 GB Max Memory / 19 MB Used Memory
OS: Linux (amd64)
HW: Linux DiskStation6 3.10.102 #15284 SMP Sat May 19 04:16:44 CST 2018 x86_64 GNU/Linux synology_bromolow_3615xs
DATA: /volume1/@appstore/filebot/data/root
Package: SPK
License: FileBot License P5606708 (Valid-Until: 2019-09-13)
Done ヾ(@⌒ー⌒@)ノ
execution line

Code: Select all

filebot -script 'fn:amc' '/volume1/homes/admin/Media/Unprocessed/TV Shows' --output '/volume1/homes/admin/Media/TV Shows/' --action move -non-strict --conflict auto --lang en --def 'ut_label=tv' 'music=y' 'unsorted=y' 'artwork=y' 'clean=y' 'deleteAfterExtract=y' 'ignore=idx|sub' 'seriesFormat={n}/Season {s}/{n.space('\''.'\'')}.S{(episode.season ? s : 1).pad(2)}E{e.pad(2)}.{t.space('\''.'\'')}' 'excludeList=.excludes' --log info --log-file '/volume1/@appstore/filebot-node/filebot.log'
Log Extract

Code: Select all

Resource not found: https://api.thetvdb.com/search/series?name=the+magicians+us
...
Resource not found: https://api.thetvdb.com/search/series?imdbId=tt7697966
Resource not found: https://api.thetvdb.com/search/series?imdbId=tt7697958
Resource not found: https://api.thetvdb.com/search/series?imdbId=tt7697962
Resource not found: https://api.thetvdb.com/search/series?imdbId=tt7697974
Skipped [/volume1/homes/admin/Media/Unprocessed/TV Shows/www.Torrenting.org - Chilling Adventures of Sabrina S02E01 720p WEBRip X264-METCON/Chilling.Adventures.of.Sabrina.S02E01.720p.WEBRip.X264-METCON.mkv] because [/volume1/homes/admin/Media/TV Shows/Chilling Adventures of Sabrina/Season 1/Chilling.Adventures.of.Sabrina.S01E01.Chapter.One.October.Country.mkv] already exists
....
Resource not found: https://api.thetvdb.com/series/357888/images/query?keyType=seasonwide
SocketTimeoutException: Read timed out
Fetch failed: Try again in 5 seconds (2 more) => javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
....
Failed to set xattr: FileSystemException: /volume1/homes/admin/Media/TV Shows/Love, Death & Robots/Season 1/Love,.Death.&.Robots.S01E16.Ice.Age.mkv: Error writing extended attribute 'net.filebot.metadata': Operation not supported
Curl test for SSL handsake issues...

Code: Select all

curl https://api.thetvdb.com/search/series?imdbId=tt7697972
{"Error":"Not authorized"}

User avatar
rednoah
The Source
Posts: 16822
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: thetbdb API "Not authorized"

Post by rednoah » 06 Apr 2019, 18:39

1.
This is a generic network error that you can't do anything about:

Code: Select all

javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
* You can check stackoverflow to help on how to debug this kind of issue, and maybe fix whatever is causing it on your machine

* You're using an old version of Java. Try the Java 8 package included in the FileBot repository, not the Synology one.

* Since it's a network issue, any network related change is worth a try, e.g. if you use VPN, don't use VPN, etc


2.
The error you get in your test case is a completely different and unrelated to the issue above, and simply means that HTTPS connection worked, but your client request didn't contain an API key and thus successfully returned an error.

Code: Select all

{"Error":"Not authorized"}
:idea: Please read the FAQ and How to Request Help.

checksumerror
Donor
Posts: 14
Joined: 23 Mar 2017, 19:52

Re: thetbdb API "Not authorized"

Post by checksumerror » 07 Apr 2019, 11:14

Does filebot have its own API key? or do I need to provide my own?

checksumerror
Donor
Posts: 14
Joined: 23 Mar 2017, 19:52

Re: thetbdb API "Not authorized"

Post by checksumerror » 07 Apr 2019, 11:19

Also I don't see the unofficial Java from filebot repository? I am currently installing the synology java 8 though as that didn't appear to be installed.

User avatar
rednoah
The Source
Posts: 16822
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: thetbdb API "Not authorized"

Post by rednoah » 07 Apr 2019, 20:33

1.
FileBot has its own key. Nothing you need to worry about.


2.
The repository includes a Java package, whatever it may be called nowadays:
viewtopic.php?f=13&t=1802

The Synology Java 8 package may or may not work. Worth a try.
:idea: Please read the FAQ and How to Request Help.

Post Reply