Jump to content

Prevent library scan when folder is almost empty


Recommended Posts

Posted

Hello,
I have a question, is it possible to implement that if a library suddenly has about 100 (or more or less) files, these are not automatically scanned, but you have to actively scan the folder?

Background is, I have just a little problem with my nas, honestly with the switch. My Emby server likes to lose the connection to the nas and then thinks “great, an empty library” the rescan then unfortunately always takes a while.

However, since my Linux ISO procurement system sometimes downloads things anyway, just into the unmounted folder, 1-2 files are there from time to time. Therefore, it would not help to say “no more files, no scan”.

 

Thank you 

Posted
Quote

Background is, I have just a little problem with my nas, honestly with the switch. My Emby server likes to lose the connection to the nas and then thinks “great, an empty library” the rescan then unfortunately always takes a while.

Hi, perhaps it would be better to look at the root issue?

Thanks.

Happy2Play
Posted
On 1/18/2025 at 2:51 AM, slevin7 said:

I have a question, is it possible to implement that if a library suddenly has about 100 (or more or less) files, these are not automatically scanned, but you have to actively scan the folder?

Background is, I have just a little problem with my nas, honestly with the switch. My Emby server likes to lose the connection to the nas and then thinks “great, an empty library” the rescan then unfortunately always takes a while.

Well that sort of is two fold but technically yes you would have to ensure RealTime Monitoring is not enabled on the library and delete the scheduled task trigger to scan libraries every 12 hours.  So there are not tasks to actually add or remove content that is not already in the database.  So all adding/removing can only happen if  you tell Emby to do a library scan.

But yes there are few topics out there about Emby removing library when content becomes unavailable/offline/disconnected. 

Devs are trying to correct this so when these scenarios happen it does not just dump the library.

darkassassin07
Posted

Perhaps you could remove the real-time monitoring and the scheduled task within emby; then have an external script ping the nas and trigger a library scan via embys api if it gets a successful response. Run that on whatever schedule you like.

Posted
10 hours ago, Happy2Play said:

Well that sort of is two fold but technically yes you would have to ensure RealTime Monitoring is not enabled on the library and delete the scheduled task trigger to scan libraries every 12 hours.  So there are not tasks to actually add or remove content that is not already in the database.  So all adding/removing can only happen if  you tell Emby to do a library scan.

But yes there are few topics out there about Emby removing library when content becomes unavailable/offline/disconnected. 

Devs are trying to correct this so when these scenarios happen it does not just dump the library.

I have recognized the problem, my switch has said goodbye, so it wasn't emby's fault but mine.
When did I realize that? When my library was nearly empty.
Now, of course, I've taken the planned tasks out for the time being until everything is running again.

It was just an idea how to prevent such cases (the nas is no longer mounted, something is loaded on the unmounted folder, emby thinks I have deleted all but one file).

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