Jump to content

Scan Library Files Works If It Feels Like It


Recommended Posts

Posted (edited)

So, sonarr just added something to my library. So I'm looking for it on Emby. Emby doesn't see it yet. So I right click TV and tell it to rescan library files. And if it feels like it, it does. But usually I have to force it to do it's job. I get ignored, so I restart the entire Emby server then tell it to rescan TV's library files and wow, like magic that works.

Please fix this. I shouldn't have to kick your server to get it to do it's job. That's just sloppy coding. Make actions immediate. 

 

Note: there's a linux kernel utility called "inotify". It monitors filesystem inode changes. It was written by John McCutchan I believe. Your developers might want to use it. Food for thought. 

Edited by zofryer
Posted

Hi there, can you please go over a specific example? Thanks.

Posted (edited)

I mean I guess I could take a screenshot of Scan Library not working. You right click on a category, tell it to rescan library, and it does absolutely nothing. You restart the server, and tell it to do it, boom you get your pretty green circle and it counts up to 100 percent over a short spam of time, and your addition to your library shows up.

So it feels like Scan Library has some sort of pointless or needless sanity check. Something that makes the experience dumb. 

I'll go further.

Typically when something like this happens it's because of "asset bleed". You have a convenient config file or xml that covers a general area, so you just throw that other managable in there with it to consolidate. Then bam, something like Scan Library has a "check if this has ran in the past five minutes and queue it to run in two minutes" instead of a "do this immediately."

Hope this helps. 

Edited by zofryer
Posted (edited)

I know sometimes when i trigger a scan library from the home screen (via 3 dot menu) rather than in the settings (complete library scan), it does appear to do nothing for a minute or two, but if i refresh the page then it does show the circle on the category box eventually. Where as triggering a full scan from settings - library does appear instantly and shows in the Dashboard

Edited by Happy2Play
edited per request
Posted (edited)

Yeah, that's the pause. it's needless. They should be looking for inotify kernel events, using them to know when a file is showing up, and just adding the new file. In the very least the Scan Library function should work immediately.

For now I'm just going to keep restarting Emby to force it to act normal and Scan when it's told to do it. 

Edited by zofryer
Spaceboy
Posted

problem is that only works if your media is coming from sonarr/radarr.

i see this regularly with tv programs recorded by emby. it is very annoying. based on my observation it seems to be because emby has some other activity in progress and the scan can't start until its finished. but no indication what that might be...

Posted

The Emby server logs are the best place to find if the server was indeed doing nothing.

Normally Luke's first response to a post reporting a problem will be this:

Real Time Monitoring (RTM) is already using inotify and does work on supported filesystems.

There might be a delay of a minute or so from the time the file lands until Emby adds it to the library. I don't know if this is a built in lag though it works out since many *arr users move media around and you wouldn't want Emby scanning a file that has a copy in progress.

Sometimes the web app does not update as it should and it takes a page refresh to show the media changes.

 

Happy2Play
Posted
2 minutes ago, Q-Droid said:

There might be a delay of a minute or so from the time the file lands until Emby adds it to the library. I don't know if this is a built in lag though it works out since many *arr users move media around and you wouldn't want Emby scanning a file that has a copy in progress.

Yes it is in your system.xml 

<LibraryMonitorDelay>60</LibraryMonitorDelay>

But yes other active processes can cause the process to be queued.

  • Thanks 1
Posted

We aren't talking about moving mountains. The button that's supposed to work immediately doesn't. That's a bug. It should be fixed. I'm basing that on absolutely nothing I've ever used ever having an update button that might not work. 

Happy2Play
Posted

But inotify works on the majority of platforms within 2 minutes.  Devs many need to see server logs going over specific examples.  But will have to search as I believe there is/was a issue in the way Sonarr operates.

Posted

I'd just be happy if the Update Library button worked when you pressed it. I don't mind having to tell it something new is there. I'd just like that to work without me having to reboot the entire server. No rush. It's a bug. Next version is fine. I'm not sweating anyone. You have a bug. Please get around to fixing it at some point. Thanks. 

mastrmind11
Posted
10 hours ago, zofryer said:

I'd just be happy if the Update Library button worked when you pressed it. I don't mind having to tell it something new is there. I'd just like that to work without me having to reboot the entire server. No rush. It's a bug. Next version is fine. I'm not sweating anyone. You have a bug. Please get around to fixing it at some point. Thanks. 

if the majority of your media comes from sonarr/radarr, set them up to tell emby new stuff is added.  it's an api call and the media shows up immediately instead of having to depend on inotify or a manual scan.

Posted
10 hours ago, zofryer said:

I'd just be happy if the Update Library button worked when you pressed it. I don't mind having to tell it something new is there. I'd just like that to work without me having to reboot the entire server. No rush. It's a bug. Next version is fine. I'm not sweating anyone. You have a bug. Please get around to fixing it at some point. Thanks. 

It all works fine in Windows, so possibly a Linux issue.

Have you supplied any server logs yet? If not, that s what you needs to do first.

See How to Report a Problem, as linked above by @Q-Droid.
 

3 minutes ago, mastrmind11 said:

if the majority of your media comes from sonarr/radarr, set them up to tell emby new stuff is added.  it's an api call and the media shows up immediately instead of having to depend on inotify or a manual scan.

You don't need to do that if RTM is enabled and working correctly in Emby.
 

Posted

Hi, please go over a specific example and attach the corresponding emby server log file. Thanks.

Spaceboy
Posted
1 hour ago, CBers said:

It all works fine in Windows, so possibly a Linux issue.

Have you supplied any server logs yet? If not, that s what you needs to do first.

See How to Report a Problem, as linked above by @Q-Droid.
 

You don't need to do that if RTM is enabled and working correctly in Emby.
 

it definitely doesnt consistently work fine in windows for me. I'll see about trying to get some examples

Posted

Sorry, I missed the request for logs. I'm working now but I'll put something together this afternoon. Thanks for the active community. Not kidding. This is joyous. 

Posted
On 10/26/2021 at 9:20 AM, zofryer said:

Sorry, I missed the request for logs. I'm working now but I'll put something together this afternoon. Thanks for the active community. Not kidding. This is joyous. 

That would be great, thanks.

Posted

Ok, I'm going to reproduce the event to time it for the logs and I'll see if I can find a little animated gif creator. Motion will be needed to show it not working. Should be fun! Gimme a bit. 

  • Thanks 1
Posted

embyserver.txt

 

Here ya go. I've included animated gifs of it working and not working right. Here's my latest log. Thanks In Advance

Peek 2021-10-27 12-42.gif

Peek 2021-10-27 12-41.gif

  • Like 1

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