Jump to content

Emby Connect API/Radarr


fizzyade

Recommended Posts

fizzyade

Thanks, that looks good. So are you using this same script for both Sonarr and Radarr

yeah, although I havent actually tested sonarr but I assume it works fine!

 

The script originally came from a user on this forum, I just modified it to do the path substitution.

Link to comment
Share on other sites

fizzyade

Let me know if it works for you, its working fine for me and its nice to have radarr refreshing the library again!

Link to comment
Share on other sites

Let me know if it works for you, its working fine for me and its nice to have radarr refreshing the library again!

 

This is not working for me at all. I have tried with local and wan Emby url. I have custom script set to run for download and upgrade. Are you passing any arguments to the script? When I run the script it is giving me the following so it is executable and should be working

root@Ubuntu-1604-xenial-64-minimal /mnt/nzbget/downloads # ./embyconnectscript.sh 
******************************************************************
* Error: Must be called as a custom script from Sonarr or Radarr.*
******************************************************************
Edited by Pog22
Link to comment
Share on other sites

fizzyade

This is not working for me at all. I have tried with local and wan Emby url. I have custom script set to run for download and upgrade. Are you passing any arguments to the script? When I run the script it is giving me the following so it is executable and should be working

 

root@Ubuntu-1604-xenial-64-minimal /mnt/nzbget/downloads # ./embyconnectscript.sh 
******************************************************************
* Error: Must be called as a custom script from Sonarr or Radarr.*
******************************************************************

you dont run it directly, upload it to somewhere that your radarr can read it and then add a new connection in radarr, select script and point it at that script.

 

You use a script connection with this script instead of radarrs built in emby connection.

Link to comment
Share on other sites

you dont run it directly, upload it to somewhere that your radarr can read it and then add a new connection in radarr, select script and point it at that script.

 

You use a script connection with this script instead of radarrs built in emby connection.

That's exactly what I've done. Radarr should be calling the script but I see no mention of it in the Radarr logs. Are you running the script in Radarr with any arguments?

Link to comment
Share on other sites

fizzyade

That's exactly what I've done. Radarr should be calling the script but I see no mention of it in the Radarr logs. Are you running the script in Radarr with any arguments?

Nope. Does it pass the test?

Link to comment
Share on other sites

And this is my redacted variables

apiKey="f3bcac2random6bdb8f8"
url="https://mydomainname:443"
local_movie_path="/mnt/rclone-d/media/movies/"
local_tv_path="/mnt/rclone-d/media/tv/"
remote_movie_path="/mnt/plexdrive5/media/movies/"
remote_tv_path="/mnt/plexdrive5/media/tv/"

Link to comment
Share on other sites

fizzyade

Yes

 

5d580fb25048d_Screenshot2019081715303598

then it should be working as long as put the right url and api key in,

 

turn on debug logging in emby, trigger a download in radarr and once its finished (and gone from activity in radarr) have a look at the emby log, you should see that radarr triggered a refresh with the path it is refrrshing on thr emby server.

Link to comment
Share on other sites

fizzyade

And this is my redacted variables

 

apiKey="f3bcac2random6bdb8f8"
url="https://mydomainname:443"
local_movie_path="/mnt/rclone-d/media/movies/"
local_tv_path="/mnt/rclone-d/media/tv/"
remote_movie_path="/mnt/plexdrive5/media/movies/"
remote_tv_path="/mnt/plexdrive5/media/tv/"

 

You’re running emby on port 443?

 

Normally it’d be “https://mydomainname:8920”

 

or

 

for http “http://mydomainname:8096”

Link to comment
Share on other sites

You’re running emby on port 443?

 

Normally it’d be “https://mydomainname:8920”

 

or

 

for http “http://mydomainname:8096”

 

Yes, it's behind a reverse proxy and it's a subdomain on port 443. 

 

I'm not seeing any connection from Radarr in the Emby logs using the Wan url, i'll play around with the local address. I cannot use local Ip as it's dynamic in docker

Edited by Pog22
Link to comment
Share on other sites

fizzyade

Yes, it's behind a reverse proxy and on port 443. 

 

I'm not seeing any connection from Radarr in the Emby logs using the Wan url, i'll play around with the local address. I cannot use local Ip as it's dynamic in docker

Why is the IP dynamic on the docker container? Set embys container to Host and connect from your radarr script using the Docker hosts local IP.

 

if youre using the WAN IP in the script then it all depends on whether your router supports hairpin NAT at to whether that will work, you ideally should be using LAN IP’s inside your network, when you use the WAN IP you’re routing all traffic via your router instead of directly between LAN devices,

Link to comment
Share on other sites

Why is the IP dynamic on the docker container? Set embys container to Host and connect from your radarr script using the Docker hosts local IP.

 

if youre using the WAN IP in the script then it all depends on whether your router supports hairpin NAT at to whether that will work, you ideally should be using LAN IP’s inside your network, when you use the WAN IP you’re routing all traffic via your router instead of directly between LAN devices,

 

This is a remote dedi, there is no router, the docker host has a public IP so i need to use nginx-proxy for security for my docker containers and only expose port 443. 

I'm trying local hostname now as I think the reverse proxy is causing issues as I'm seeing an unknown HTTP Response 204 in the logs

Link to comment
Share on other sites

Ok, i'm getting somewhere, I'm getting the connect it's just not updating

2019-08-17 16:42:46.809 Info HttpClient: POST https://connect.emby.media/service/Servers?id=<redacted>
2019-08-17 16:43:25.341 Info HttpServer: HTTP POST http://emby-server:8096/mediabrowser/Library/Media/Updated. UserAgent: curl/7.58.0
2019-08-17 16:43:25.354 Debug LibraryMonitor: New file refresher created for /movies/Scary Movie 3 (2003)
2019-08-17 16:43:25.355 Info HttpServer: HTTP Response 204 to 172.21.0.15. Time: 14ms. http://emby-server:8096/mediabrowser/Library/Media/Updated
Link to comment
Share on other sites

fizzyade

Ok, i'm getting somewhere, I'm getting the connect it's just not updating

 

2019-08-17 16:42:46.809 Info HttpClient: POST https://connect.emby.media/service/Servers?id=<redacted>
2019-08-17 16:43:25.341 Info HttpServer: HTTP POST http://emby-server:8096/mediabrowser/Library/Media/Updated. UserAgent: curl/7.58.0
2019-08-17 16:43:25.354 Debug LibraryMonitor: New file refresher created for /movies/Scary Movie 3 (2003)
2019-08-17 16:43:25.355 Info HttpServer: HTTP Response 204 to 172.21.0.15. Time: 14ms. http://emby-server:8096/mediabrowser/Library/Media/Updated
 

the path shown there is different to what you showed a few posts earlier which was /mnt/plexdrive5/media/movies?

 

remote_movie_path is the path to the movies that emby uses (i.e where theyre mounted if its running in a docker container)

local_movie_path is the same but for radarr, the path it uses for movies.

Link to comment
Share on other sites

the path shown there is different to what you showed a few posts earlier which was /mnt/plexdrive5/media/movies?

 

remote_movie_path is the path to the movies that emby uses (i.e where theyre mounted if its running in a docker container)

local_movie_path is the same but for radarr, the path it uses for movies.

 

Ah yes, of course, I'm mounting volumes in docker, neither container would see the full path. I should have it sorted now.

 

Thanks for your help

  • Like 1
Link to comment
Share on other sites

fizzyade

Ah yes, of course, I'm mounting volumes in docker, neither container would see the full path. I should have it sorted now.

 

Thanks for your help

Awsome, hopefully it’ll fine once you have the right paths in!

 

(and to b clear you only need this version of the script if the mount point inside the radarr container is different to the mount point inside the emby container)

Link to comment
Share on other sites

Awsome, hopefully it’ll fine once you have the right paths in!

 

(and to b clear you only need this version of the script if the mount point inside the radarr container is different to the mount point inside the emby container)

 

Yes they are completely different mounts.

Link to comment
Share on other sites

fizzyade

Working perfect now mate.

 

Awesome stuff, its great to have libraries refresh automatically when content is added again isnt it?

Link to comment
Share on other sites

Awesome stuff, its great to have libraries refresh automatically when content is added again isnt it?

 

Yes, especially when I have an issue/bug where lately my scans take 4.5hrs and do a lookup every single episode. I've had to disable all scans and just schedule one at 2AM as it eats the server ram and affects transcoding and performance in general

https://emby.media/community/index.php?/topic/75628-tv-shows-library-scan-takes-longer-with-newer-beta-servers/

Link to comment
Share on other sites

  • 8 months later...
fbrassin

Hello,

i tried this script, test is working, but i think it does not make library to update.

 

Is there a way to see is the script works, running it manually?

Link to comment
Share on other sites

fizzyade

Hello,

i tried this script, test is working, but i think it does not make library to update.

 

Is there a way to see is the script works, running it manually?

 

Test doesn’t do anything, that’s expected behaviour.  It just checks that the script is callable.

 

See earlier in the thread regarding what to look for in the logs about whether it’s working correctly.  I use the script as I posted it here without any problems.

Link to comment
Share on other sites

fbrassin

Do you mean looking for something like this? But in radarr log or emby log?

2019-08-17 16:42:46.809 Info HttpClient: POST https://connect.emby.media/service/Servers?id=<redacted>
2019-08-17 16:43:25.341 Info HttpServer: HTTP POST http://emby-server:8096/mediabrowser/Library/Media/Updated. UserAgent: curl/7.58.0
2019-08-17 16:43:25.354 Debug LibraryMonitor: New file refresher created for /movies/Scary Movie 3 (2003)
2019-08-17 16:43:25.355 Info HttpServer: HTTP Response 204 to 172.21.0.15. Time: 14ms. http://emby-server:8096/mediabrowser/Library/Media/Updated
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...