Removing movie from library, including folder

Hi guys. Apologies if this has been discussed before. I did search the forum for a while, but couldn’t find it.

I have been using OSMC for a couple of years now and I love it. I recently decided to switch from Couchpotato to Radarr. Unfortunately, Radarr needs movies to be in their own separate folder, named after the movie.

So, for example, file structure on my NAS would become:

/volume1/Movies/Casablanca (1942)/Casablanca (1942).mkv

So far, no problem. OSMC handles it beautifully. However, after I watched the movie, I want to delete it. I have a ‘delete from library’ hotkey on my remote programmed and OSMC asks me if I want to permanently delete /volume1/Movies/Casablanca (1942)/Casablanca (1942).mkv and it deletes it after I confirmed. However, the folder /volume1/Movies/Casablanca (1942) remains on my NAS, empty. Radarr will notice the movie missing and will download it again. Obviously undesired behaviour. Now, I fixed this temporary by running a little daily script that deletes empty movie folders, but I prefer to do it a little more elegant.

So, the question is: can I make OSMC delete a movie FOLDER, instead of just the file?

I’m happy to be corrected but I think you might be out of luck.

First, the directory structure is not generally used by Kodi and it has no implicit knowledge of whether any other movies will be in a particular directory.

Searching the Kodi wiki at Updating or removing videos - Official Kodi Wiki, there is a line that seems to be relevant to your situation:

Be aware that the deletion setting will only delete the video file. Any artwork, nfo files, trailers, extras, movie folder etc, will not be deleted from the hard disk.

Just a minor correction: OSMC is a linux distribution that is optimized for running the Kodi media center on Pi/Vero hardware. So your question should really be:

Can I make Kodi …

1 Like