I am using the latest version of jellyfin on windows and tonight I tried to delete a movie from my library. To my great surprise jellyfin didn’t used the windows recycle bin to delete the file. I don’t know if I have a wrong setting or if this is normal jellyfin behavior. But it would really be more safe and really better if jellyfin could remove files to recycle bin like Emby.
This is the normal behaviour. Jellyfin originally started as a split from Emby 3.5.2, where that was the behaviour. They only started using the recycle bin after that version. We’ve thought about ways to try and adapt this, but we’re not sure on how to do it just yet. In the meantime, we did make the delete a big red button - so do be careful with it.
Thanks a lot for your reply. From now I will delete directly from my PC. The reason why I was deleting movies from Jellyfin was to make sure that the data associated with it will also be deleted. But the question is : If I delete a movie from my HDD and then re-scan my library will jellyfin remove data associated or not?
It will. If it doesn’t see the file anymore, it will remove the data from its library
Are you aware of the VB DeleteFile with RecycleBin option?
Yes, but Jellyfin isn’t written in VB
It’s written in C# for .NET Core 3.1 specifically. We’d also need to consider how this would work across a number of operating systems. As a short list, we run on various flavours of Linux (which don’t have a “Recycle Bin”) including Docker, Windows, and macOS.
And I believe that the VB solution wouldn’t work correctly considering we’re a non-interactive console app.
Would there be a way of replicating the Recycle Bin, by having the BRB Move the file to a purgatory folder, if enabled to do so in settings? Once the mkv or whatever is moved, JF will delete the residual data.
That’s a thought we had. Specify a folder (Recycle Bin if Windows, .trash on macOS, a “purgatory” folder on Linux), but we couldn’t agree on a good way to do it/priority yet there seems to be a big overlap between media server developers and data hoarders
I think the request lives on, it’s just not been a high priority at the moment.
It’s available in C# .NET Core 3.1. Just need a reference to the library, to be used in C#.
Alternatively it can be done with pinkoke SHFileOperation in shell32.
But, as you mention, it would require platformspecific implementations for the other OS’es.