Get watched status from Jellyfin, move files if watched via bash script

I would like to perform file actions based on the watched status of content.
In the past, I used Flexget, which would know the watched status via Trakt and it would be able to perform bash commands.

Now that I have switched fully to Jellyfin (it’s a breeze! I am going to donate!) and don’t really need Trakt anymore (happy to get rid of it), I am looking for a way to read out/get watched status from Jellyfin and delete the corresponding file or move it to a different drive.

I am not a developer nor an expert user, but I do know basic command line (using Ubuntu 19.10 Budgie).

How would one start doing this?

I’m not sure - You might get a better answer talking with more of the development team through Chat. All the rooms on Matrix are now available on Freenode IRC as well.

That said, if you move a file after being watched, Jellyfin will pick up the library change and remove it, which I’m guessing is what you want anyway.


There is a feature request already:

And there is even a simple solution, a Python script with parameters to delete tv/movie files after x days and include/exclude favourites. It’s designed for Emby but I suppose if you fill in the right server url it might work for Jellyfin? I am going to try, it even has a demo mode to test (without actually deleting files).