AMC: Emby refresh calls to SSL on wrong port

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
hinkleb192
Posts: 3
Joined: 18 Mar 2018, 21:00

AMC: Emby refresh calls to SSL on wrong port

Post by hinkleb192 »

I've recently set up filebot using the AMC script. I'm trying to automate the Emby refresh after the sorting, however Emby wasn't receiving the API Post. I dug into the amc.log, and found the following:

Notify Emby: [{emby.server.com}, token:{super-secret-key}]
POST: https://{emby.server.com}:8096/Library/Refresh?api_key={super-secret-key}
SSLHandshakeException: Remote host closed connection during handshake

Looking at the ports, 8096 is used for non-ssl communication while 8920 is used for ssl. I tested with Postman, and sure enough, 8920 works with https://.

So, is there an easy way to switch either the port used, or whether or not it's using ssl?

Thanks in advance!
User avatar
rednoah
The Source
Posts: 23955
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC: Emby refresh calls to SSL on wrong port

Post by rednoah »

Fixed.

You can try the latest script by running -script dev:amc.
:idea: Please read the FAQ and How to Request Help.
hinkleb192
Posts: 3
Joined: 18 Mar 2018, 21:00

Re: AMC: Emby refresh calls to SSL on wrong port

Post by hinkleb192 »

I'm doing something wrong (or things are still askew). Here's what I did:

Code: Select all

C:\filebot -script dev:amc "e:/watch" --output "{mediastore}" --action move --conflict auto -non-strict --log-file e:/amc.log --def seriesFormat="{mediastore}\tv\{n}\Season{s}\{n}.S{s.pad(2)}E{e.pad(2)}.{t}" subtitles=en excludeList=e:/amc-exclude.txt unsorted=n clean=y emby={emby server}:{super secret key} "ut_label=TV"
And the output...

Code: Select all

Locking e:\amc.log
Run script [dev:amc] at [Mon Mar 19 09:22:23 EDT 2018]
Parameter: seriesFormat = \\{mediastore}\tv\{n}\Season{s}\{n}.S{s.pad(2)}E{e.pad(2)}.{t}
Parameter: subtitles = en
Parameter: excludeList = e:/amc-exclude.txt
Parameter: unsorted = n
Parameter: clean = y
Parameter: emby = {emby server}:{super secret key}
Parameter: ut_label = TV
Argument[0]: E:\watch
Use excludes: e:\amc-exclude.txt
Input: E:\watch\Bobs.Burgers.S08E10.The.Secret.Ceramics.Room.of.Secrets.720p.AMZN.WEB-DL.DD+5.1.H264-SiGMA.mkv
Group: [tvs:bobs burgers] => [Bobs.Burgers.S08E10.The.Secret.Ceramics.Room.of.Secrets.720p.AMZN.WEB-DL.DD+5.1.H264-SiGMA.mkv]
Get [English] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: E:\watch\Bobs.Burgers.S08E10.The.Secret.Ceramics.Room.of.Secrets.720p.AMZN.WEB-DL.DD+5.1.H264-SiGMA.mkv
Rename episodes using [TheTVDB]
Auto-detected query: [Bobs Burgers]
Fetching episode data for [Bob's Burgers]
[MOVE] From [E:\watch\Bobs.Burgers.S08E10.The.Secret.Ceramics.Room.of.Secrets.720p.AMZN.WEB-DL.DD+5.1.H264-SiGMA.mkv] to [\\{mediastore}\tv\Bob's Burgers\Season8\Bob's Burgers.S08E10.The Secret Ceramics Room of Secrets.mkv]
Processed 1 files
Notify Emby: [host:{emby server}, token:{super secret key}]
POST: https://{emby server}:8096/Library/Refresh?api_key={super secret key}
SSLHandshakeException: Remote host closed connection during handshake
Clean clutter files and empty folders
Done ?(?????)?
It still went to https:// on port 8096. Where did I go wrong?
User avatar
rednoah
The Source
Posts: 23955
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC: Emby refresh calls to SSL on wrong port

Post by rednoah »

Are you usually using -script dev:amc? You might need to call -clear-cache once.
:idea: Please read the FAQ and How to Request Help.
hinkleb192
Posts: 3
Joined: 18 Mar 2018, 21:00

Re: AMC: Emby refresh calls to SSL on wrong port

Post by hinkleb192 »

Good call. I don't typically use the dev version, but I had while testing. Clearing solved that issue. However, here's the error I see:

Code: Select all

SSLHandshakeException: java.security.cert.CertificateException: No name matching {emby server} found
My assumption is that this is a certificate trust issue. It will take some time to work through that one. Certificates....fun...

One thing I did try was with the IP rather than the FQDN. When I did this, I see that you don't use SSL for IP refresh. So I will use that as a work-around until I work through the cert trust issue.

Thanks for the help. If I still have issues after the SAN cert is worked out, I'll ping back.
Post Reply