Jump to content

Library Real Time Monitoring needs SAFETY CHECK


Recommended Posts

Posted (edited)

Hello,

I have a scenario where one of my libraries sits on the external HDD enclosure. I want to have for it Real Time Monitoring enabled but there is a catch.. sometimes happens this external HDD enclosure has connectivity issues or after reboot it did not get properly mounted to the Linux file system and Emby starts purging everything related to it. This is huge pain in case such library is 50k home video files - everything needs to be rebuild from scratch, which can take weeks! I know it kind of makes sense of Real Time Monitoring feature but I would propose to implement a safety check that the library is actually present on the file system. I know this is difficult to detect properly when Emby server is inside docker, but something simple like: If any specified folder is entirely empty, skip the synchronization for it.

So before triggering the real time sync perform for both of this folders this empty folder check:

  • IF contains SOMETHING -> sync
  • IF contains NOTHING -> skip

I would do this safety check also when triggered manually, because many times user don't even notice the external HDD enclosure is not mounted.. 99% of cases user finds out when his media are missing in the Emby library.. In order to sync on these empty libraries user would need to disable safety check.

 

Solution:

image.png.130eb9486c537ad3c1e1f9ade445f48f.png

Edited by MacGyver27
Posted

Hey.
Thanks fore the reply. Unfortunately this happened quite few weeks ago.. but can simulate if necessary.. should be pretty straight forward with docker. Let me know!

  • Thanks 1
RanmaCanada
Posted

This is not an Emby problem, this is a problem with your hardware being faulty. 

Replace it.

Posted

If your storage is normally mounted to /srv/media then when it's not mounted /srv/media will exist as an empty folder, but /srv/media/YouTube would not. To my knowledge the server already has a check in place wherein if the mapped folder does not exist at all it does not try to scan and delete. You mentioned docker specifically, so I believe if you're running the container with mapped paths and those paths don't exist that it will still map them anyway (it will create the path on the host?), so the Emby server running inside the container would yes see the folders as being empty and then clear out.

It would be better to require your storage to be mounted before starting the docker container, or mapping a lower path instead so that your actual folders would not exist and you would not have that problem. So if you map /srv/media into the container, then only map the library paths as /srv/media/YouTube and /srv/media/.downloads/ADV, if /srv/media is not mounted those folders would not exist and it won't delete anything.

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...