Jump to content


Photo

Not updating library

library refresh movie

  • Please log in to reply
27 replies to this topic

#1 el_pedriyo OFFLINE  

el_pedriyo

    Advanced Member

  • Members
  • 58 posts
  • Local time: 01:11 PM

Posted 06 September 2018 - 07:42 PM

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



#2 el_pedriyo OFFLINE  

el_pedriyo

    Advanced Member

  • Members
  • 58 posts
  • Local time: 01:11 PM

Posted 06 September 2018 - 08:02 PM

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



#3 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 124564 posts
  • Local time: 07:11 AM

Posted 06 September 2018 - 11:40 PM

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



#4 el_pedriyo OFFLINE  

el_pedriyo

    Advanced Member

  • Members
  • 58 posts
  • Local time: 01:11 PM

Posted 07 September 2018 - 03:26 AM

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

 

Kind regards



#5 mastrmind11 OFFLINE  

mastrmind11

    Advanced Member

  • Members
  • 2615 posts
  • Local time: 07:11 AM
  • LocationLong Island, NY

Posted 07 September 2018 - 06:55 AM

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



#6 el_pedriyo OFFLINE  

el_pedriyo

    Advanced Member

  • Members
  • 58 posts
  • Local time: 01:11 PM

Posted 07 September 2018 - 09:16 AM

I am running an NFS share with ZFS



#7 el_pedriyo OFFLINE  

el_pedriyo

    Advanced Member

  • Members
  • 58 posts
  • Local time: 01:11 PM

Posted 07 September 2018 - 09:38 AM

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



#8 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 124564 posts
  • Local time: 07:11 AM

Posted 07 September 2018 - 09:49 AM

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

#9 el_pedriyo OFFLINE  

el_pedriyo

    Advanced Member

  • Members
  • 58 posts
  • Local time: 01:11 PM

Posted 07 September 2018 - 10:44 AM

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.



#10 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 124564 posts
  • Local time: 07:11 AM

Posted 07 September 2018 - 11:19 AM

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.

#11 el_pedriyo OFFLINE  

el_pedriyo

    Advanced Member

  • Members
  • 58 posts
  • Local time: 01:11 PM

Posted 07 September 2018 - 12:27 PM

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.



#12 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 124564 posts
  • Local time: 07:11 AM

Posted 07 September 2018 - 10:22 PM

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.



#13 mastrmind11 OFFLINE  

mastrmind11

    Advanced Member

  • Members
  • 2615 posts
  • Local time: 07:11 AM
  • LocationLong Island, NY

Posted 08 September 2018 - 08:45 AM

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



#14 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 124564 posts
  • Local time: 07:11 AM

Posted 08 September 2018 - 10:41 AM

Interesting thanks !

#15 el_pedriyo OFFLINE  

el_pedriyo

    Advanced Member

  • Members
  • 58 posts
  • Local time: 01:11 PM

Posted 08 September 2018 - 06:35 PM

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.



#16 mastrmind11 OFFLINE  

mastrmind11

    Advanced Member

  • Members
  • 2615 posts
  • Local time: 07:11 AM
  • LocationLong Island, NY

Posted 08 September 2018 - 07:38 PM

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

#17 plexman OFFLINE  

plexman

    Advanced Member

  • Members
  • 330 posts
  • Local time: 01:11 PM
  • LocationSpain

Posted 08 September 2018 - 09:11 PM

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, 08 September 2018 - 09:14 PM.


#18 el_pedriyo OFFLINE  

el_pedriyo

    Advanced Member

  • Members
  • 58 posts
  • Local time: 01:11 PM

Posted 09 September 2018 - 06:33 AM

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?



#19 mastrmind11 OFFLINE  

mastrmind11

    Advanced Member

  • Members
  • 2615 posts
  • Local time: 07:11 AM
  • LocationLong Island, NY

Posted 09 September 2018 - 07:27 AM

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


#20 el_pedriyo OFFLINE  

el_pedriyo

    Advanced Member

  • Members
  • 58 posts
  • Local time: 01:11 PM

Posted 09 September 2018 - 04:20 PM

 

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







Also tagged with one or more of these keywords: library, refresh, movie

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users