Sonarr Connect XBMC/Kodi

Hi Everyone ( and markus!)

I am trying to have Sonarr update/clean library whenever a file is downloaded. This is to avoid having to clean it every 2 hours through automatic library clean plugin. The reason I want to clean so frequently is that a lot of the shows I watch start off at 720 but then get upgraded to 1080 without a library clean I am left with 2 Identical shows…one of which no longer exists being displayed in the library.

The problem is that a library clean on my machine ( for whatever reason) takes close to 15 min. Which is way to long every 2 hours.

I have xbmc connect setup and when I test it says successful. Settings are to Update Library & Clean Library. Can anyone help me troubleshoot?

Also I was wondering, does a feature exist to forgo downloading the higher quality file if the lower quality file has been watched? Often times the 720 is downloaded day of release…I watch it…and then 4-5 days later gets replaced with a higher quality ( also larger file) that I’ll never watch.

THANKS!!!

For library updates I use in my nas the headless version of kodi running watchdog. Every new file added to the library gets informed to the watchdog through inotify and then the entry gets added to the Mysql dB. On upgrades (proper in my case) I have always the leftovers of the replaced episode, so now every time a proper comes I trigger a library clean through a sonarr post processing script that executes curl to the kodi api endpoint.

If I recall you can also use the kodi api to update specific paths of the library.

On the quality issue you need to setup the profiles accordingly using the cutoff.

Thanks for the reply.

Most of it seems a bit too technical for me. I run Kodi on the same machine that runs sonarr and the same one that does all d/l and hosts the mysql db.

I feel like the connect part of sonarr should handle this but it just isnt working.

Make sure Update Library AND On Download are enabled for the connection, the former tells Sonarr to update the library when it runs and the latter tells Sonarr when to trigger it.

If I have On Download, On Grab, On Upgrade, and On Rename all “on” and Update Library AND Clean Library On…does that mean it would update and clean the library 4x?

On Grab won’t trigger the update or clean (no new files so it’d be a waste).

On Grab will trigger when the first file for an episode is imported, if the file is deleted later to make room for an upgraded file (SDTV to HDTV-720p for example), then On Upgrade will trigger. On Rename will only trigger when files for a series are renamed.

To fully answer your question, no it won’t ever trigger more than once per import.

Ok, I have this all set…however it doesnt seem to update/clean library. I do get the GUI notifications of Grab and Download but thats all. strange?

You can verify in Sonarr’s log files that the request is being sent debug logs and if you check trace logs the response from Kodi will also be included.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.