Jump to content
el_pedriyo

Not updating library

Recommended Posts

el_pedriyo

Hello,

 

I just wanted to know how can I get my library updated automatically when added a film to it, I have the real time monitoring enabled, but when I tried copying a file inside the library, the movie is not appearing without doing a manual refresh of it.

Any idea?

 

Kind regards,

 

Pedro

Share this post


Link to post
Share on other sites
el_pedriyo

I have tried with a local drive in linux, and seems like after 5 min the library is being updated.

 

But my infraestructure is basically a NFS share mounted into linux to share files all accross the network, does any know why with the NFS share this is not working fine?

 

Kind regards

Share this post


Link to post
Share on other sites
Luke

HI, the realtime monitor doesn't support every possible kind of file system. It may not support NFS shares. 

Share this post


Link to post
Share on other sites
el_pedriyo

And how can I solve this then? Is there any command to execute on a cron to solve this?

 

Kind regards

Share this post


Link to post
Share on other sites
mastrmind11

it does support NFS shares.  what is the underlying filesystem?

Share this post


Link to post
Share on other sites
el_pedriyo

I am running an NFS share with ZFS

Share this post


Link to post
Share on other sites
el_pedriyo

What I am currently seeing is that NFS shares doesn't have something called inotify so there is no way for services to know when a change was made on a HDD or not. So it seems like you will need to cron any type of command that makes the services read the NFS X times per minute to have it updated. Do we have any command in emby for that?

Apart from that, what do you mean by saying that emby supports NFS shares?

 

Kind regards

Share this post


Link to post
Share on other sites
Luke

Correct, the .net core runtime uses inotify as the basis for it's file system watcher.

Share this post


Link to post
Share on other sites
el_pedriyo

So Luke, if we finally have our infrastructure build in NFS of CIFS (which I believe doesn't support inotify) how can we fix this problem? At least a solution for it, like an emby command that can be execute on a cron every 1 min to refresh the changes in the library.

Share this post


Link to post
Share on other sites
Luke

1 minute is much too aggressive. I would schedule the library scan to run once per hour.

 

You can also head over to the .net core repository and file a request to support more protocols.

Share this post


Link to post
Share on other sites
el_pedriyo

Pfff, 1 hour scan I think it would be so much, I mean, if I just copy a movie inside the system I do not want to wait 1 hour for it to appear so that I can start watching it without having to refresh manually the library.

Also could you please tell me where can I find the command to refresh libraries so that I can make a cron for it?

 

About the second thing I do not know more protocols, thats why I was asking here. And I imagine that apart from the cron you may not know any other solution, right?

By the way, am I the only people with this problem, maybe I am losing the miracle of any other system I do not know that exist and I am trying doing it through NFS when maybe is not the best idea, but I was just trying to make this with freenas and then have various services like emby accesing it. Any potencial idea on how could I achieve all of these?

 

Really appreciate all the help you could fire at me.

Share this post


Link to post
Share on other sites
Luke

In other words i'm saying we're relying on another component for this feature, so we'd need to request that they support more kinds of file systems.

Share this post


Link to post
Share on other sites
mastrmind11

fwiw, I have ZFS pools mounted via NFS on Ubuntu 16.04 and have absolutely no problems w/ the realtime monitor.  So :shrug:

Share this post


Link to post
Share on other sites
Luke

Interesting thanks !

Share this post


Link to post
Share on other sites
el_pedriyo

In other words i'm saying we're relying on another component for this feature, so we'd need to request that they support more kinds of file systems.

well, apart from that they are not going to implement it right now, and I will need emby to work, if not I won't be able to use it :(

also in the meantime I was asking you for some help on how to deal with any command or api to make emby refresh the library as a provisional fix.

 

fwiw, I have ZFS pools mounted via NFS on Ubuntu 16.04 and have absolutely no problems w/ the realtime monitor.  So :shrug:

Hello,

 

Could you please guide as on how did you achieve this? As if you go into inotify documentation you will see that it was not designed for this purpose, and that it does not work neither with other network protocols as CIFS or in this case NFS. Also searched a bit more and it seems that even other media servers as Plex are having the same issue because of inotify, but plex at least have its documentation clear on how to achieve a refresh by command or even api, which I have not found on emby.

Share this post


Link to post
Share on other sites
mastrmind11

Dunno. What's your fstab? Haven't had an issue in years w emby so guessing you've got something wrong with your mount.

well, apart from that they are not going to implement it right now, and I will need emby to work, if not I won't be able to use it :(

also in the meantime I was asking you for some help on how to deal with any command or api to make emby refresh the library as a provisional fix.

 

Hello,

 

Could you please guide as on how did you achieve this? As if you go into inotify documentation you will see that it was not designed for this purpose, and that it does not work neither with other network protocols as CIFS or in this case NFS. Also searched a bit more and it seems that even other media servers as Plex are having the same issue because of inotify, but plex at least have its documentation clear on how to achieve a refresh by command or even api, which I have not found on emby.

Sent from my SM-G965U using Tapatalk

Share this post


Link to post
Share on other sites
plexman

well, apart from that they are not going to implement it right now, and I will need emby to work, if not I won't be able to use it :(

also in the meantime I was asking you for some help on how to deal with any command or api to make emby refresh the library as a provisional fix.

 

Hello,

 

Could you please guide as on how did you achieve this? As if you go into inotify documentation you will see that it was not designed for this purpose, and that it does not work neither with other network protocols as CIFS or in this case NFS. Also searched a bit more and it seems that even other media servers as Plex are having the same issue because of inotify, but plex at least have its documentation clear on how to achieve a refresh by command or even api, which I have not found on emby.

Try to read a little bit before spamming for help. Emby has a nice api and wiki where you can get all the info you need, plus it uses swagger (so it is even easier). BTW, here is your command to trigger the library refresh:

 

curl -d "" -X POST http://embyip:embyport/Library/Refresh?api_key=embyapi
Edited by plexman

Share this post


Link to post
Share on other sites
el_pedriyo

Dunno. What's your fstab? Haven't had an issue in years w emby so guessing you've got something wrong with your mount.

Sent from my SM-G965U using Tapatalk

Hello, I am currently using autofs to mount it, I will try to see how it goes with fstab, although I think it doesn't work neither. Could you provide your fstab to test with it?

Share this post


Link to post
Share on other sites
mastrmind11

Hello, I am currently using autofs to mount it, I will try to see how it goes with fstab, although I think it doesn't work neither. Could you provide your fstab to test with it?

Here you go:

10.0.1.151:/storage/movies/Hi-Def /storage/movies/Hi-Def  nfs rsize=8192,wsize=8192,timeo=14,intr

Share this post


Link to post
Share on other sites
el_pedriyo

 

Here you go:

10.0.1.151:/storage/movies/Hi-Def /storage/movies/Hi-Def  nfs rsize=8192,wsize=8192,timeo=14,intr

I will try with that, but it is really strange. 

Thank you :D

Share this post


Link to post
Share on other sites
el_pedriyo

Try to read a little bit before spamming for help. Emby has a nice api and wiki where you can get all the info you need, plus it uses swagger (so it is even easier). BTW, here is your command to trigger the library refresh:

 

curl -d "" -X POST http://embyip:embyport/Library/Refresh?api_key=embyapi

Sorry if you felt hurted but if I think that the wiki could be better is what I think, as I could not find that specific curl command on it, apart from other posts that people wrote

Edited by el_pedriyo

Share this post


Link to post
Share on other sites
el_pedriyo

Hello,

 

It seems like it continued without working the real monitor with your fstab, it mounts the nfs but nothing occured with emby.

I have been also testing the search for missing metadata, and it somehow hits up the cpu a bit like refreshing more things than only searching for the missing metadata.

Also I have been working with the api, I could finally found it in swagger inside the admin panel and will see if I can code something up in which I search for all movie items and only refresh the medata for the ones that really do not have an image or the metadata itself.

 

Apart from my discoveries, can you please provide some information on why searching for missing metadata is so heavy loading task?

 

Kind regards

Share this post


Link to post
Share on other sites
Luke

Because it rescans the media and then runs searches with the internet metadata providers.

Share this post


Link to post
Share on other sites
el_pedriyo

I assume there is no option on just doing that with the files that have no metadata at all, right?

 

The only solution for that will be coding script with the api as I was planning, right?

 

Kind regards

Share this post


Link to post
Share on other sites
Luke

Did you explore the options in the drop down?

Share this post


Link to post
Share on other sites

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