Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

XBMC UpdateLibrary and unRAID Issues

Featured Replies

I decided to post this issue here as well, as I'm not totally convinced where the problem lies.

 

My shares are all NFS and are mounted on my XBMC box under /media/movies. From the client's perceptive, it looks like:

--/media/movies

   --/media/movies/SD

      --/media/movies/SD/new movie 1

      ...

   --/media/movies/HD

      --/media/movies/HD/new movie 2

      ...

 

While attempting to update the XMBC database using

/usr/bin/xbmc-send -a "UpdateLibrary(video)"
no new movies are found.

 

On the other hand, "Scan for new content"  option works and finds the new movies. From what I understand "update library" use hashes of the dirs, and if those have not changed, the scan is skipped. "Scan for new content" ignores the hash and runs a full scan no matter.

 

Fundamentally, I don't know how directory hashes work, but what could prevent XBMC from locating the new movies on unRAID. Could it maybe be that the new movies reside on disks that have yet to spin up before scan is complete?

 

Have others with an unRAID + XBMC setup noticed the same?

User shares don't update directory modification times. There was a discussion about this but I don't remember where. Post a request for this problem to be fixed in the Roadmap forum.

  • Author

Will give cache_dirs a try, thanks for the suggestion.

 

So, the current cached directory contents are scanned, once a new folder is added, cache_dirs will pick up the change and cache the new dir in memory. What's the rescan interval? How long does it take for it to pick up the new addition?

 

Given my aforementioned structure, '-d 4' would essentially cache the movie file in its entirety?

Will give cache_dirs a try, thanks for the suggestion.

 

So, the current cached directory contents are scanned, once a new folder is added, cache_dirs will pick up the change and cache the new dir in memory. What's the rescan interval? How long does it take for it to pick up the new addition?

 

Given my aforementioned structure, '-d 4' would essentially cache the movie file in its entirety?

It caches the directory listing, not the files in the directories.  It typically loops every few seconds.

 

Joe L.

  • Author

Mine always seems to scrape just fine. I however use cache_dirs so everything is loaded up in ram and readily available for scraping.

http://lime-technology.com/forum/index.php?topic=4500.0

 

I also have my HTPC set to update library on startup. Rips thru 700+ movies and a lot of TV episodes pretty fast.

 

Thanks Joe.

 

@kizer, ok so I'm trying cache_dirs with pretty much no options besides a few excludes. Can't say that I'm having any success. I added a movie under the top level directory /mnt/user/movies. In fact I moved it to  /mnt/user/movies/HD to be precise, waited some minutes and rescanned my xbmc library and it does not pick up the new movie.

 

Are you saying under these circumstances it works for you in this manner?

Mine always seems to scrape just fine. I however use cache_dirs so everything is loaded up in ram and readily available for scraping.

http://lime-technology.com/forum/index.php?topic=4500.0

 

I also have my HTPC set to update library on startup. Rips thru 700+ movies and a lot of TV episodes pretty fast.

 

Thanks Joe.

 

@kizer, ok so I'm trying cache_dirs with pretty much no options besides a few excludes. Can't say that I'm having any success. I added a movie under the top level directory /mnt/user/movies. In fact I moved it to  /mnt/user/movies/HD to be precise, waited some minutes and rescanned my xbmc library and it does not pick up the new movie.

 

Are you saying under these circumstances it works for you in this manner?

No, I did not say that at all.  Cache_dirs does nothing more that get a listing of the files and directorys on the disk.  It throws the result away.  The side effect if the data read is now in the disk buffer cache and the disk does not need to be spinning to read it.  If you cannot see your movies with your XBMC config, then there is a different issue.  Are you using an SMB connection? or an NFS connection?

 

I use an SMB connection and never have any issues seeing new movies.  I need to get out of the movies mode and go back in to get it to scan the movie source directory once more, otherwise, it uses its (XBMC's) cached view of the movie listing.

 

Joe L.

Your xbmc log file will show you some more detail of exactly what it's doing. Including logging directories as it finds them along with it's decision around whether it needs updating or not...

  • Author




Mine always seems to scrape just fine. I however use cache_dirs so everything is loaded up in ram and readily available for scraping.
http://lime-technology.com/forum/index.php?topic=4500.0
 
I also have my HTPC set to update library on startup. Rips thru 700+ movies and a lot of TV episodes pretty fast.
 
Thanks Joe.
 
@kizer, ok so I'm trying cache_dirs with pretty much no options besides a few excludes. Can't say that I'm having any success. I added a movie under the top level directory /mnt/user/movies. In fact I moved it to  /mnt/user/movies/HD to be precise, waited some minutes and rescanned my xbmc library and it does not pick up the new movie.
 
Are you saying under these circumstances it works for you in this manner?
No, I did not say that at all.   Cache_dirs does nothing more that get a listing of the files and directorys on the disk.  It throws the result away.   The side effect if the data read is now in the disk buffer cache and the disk does not need to be spinning to read it.   If you cannot see your movies with your XBMC config, then there is a different issue.   Are you using an SMB connection? or an NFS connection?
 
I use an SMB connection and never have any issues seeing new movies.  I need to get out of the movies mode and go back in to get it to scan the movie source directory once more, otherwise, it uses its (XBMC's) cached view of the movie listing.
 
Joe L.
 
Thanks.
 
The way I understood it was as follows:
 
  • cache_dirs is currently running, /mnt/user/movies is being cached (/media/movies as seen on my xbmc client)
  • add a new movie, directory looks like /mnt/user/movies/HD/New_Movie
  • next iteration cache_dirs discards old listing, scans the directory anew and finds /mnt/user/movies/HD/New_Movie and adds that the disk buffer cache
  • run an UpdateLibrary on xbmc with new cached contents
  • step 5: profits!

 

Upon running the update on the client  (regardless of the mode on xbmc; sometimes on the main screen of the skin, and most often through xbmc-send), xbmc does not find New_Movie. Unless xbmc somehow caches the old contents under /media/movies, it should retrieve the new directory listing from cache_dirs, no?

 

I tried this with both smb and nfs, the result is the same.

 

Perhaps it would be helpful to share how you mount the nfs exports, if indeed you use nfs. My fstab on my client looks like:

 

192.168.1.99:/mnt/user/movies   /media/movies   nfs    _netdev,auto  0  0

Have you looked at your xbmc log?

 

This will tell you if it's actually scanned / parsed the new directory (i.e first step..is xbmc actually seeing it and trying to evaluate it?) and if it is seeing it there should be some info on the decision making it's taking on whether or not to process it further.

 

You can keep trying to debug this from the unraid end - but I think you'd be better off asking xbmc what's wrong as a first step.

 

And yes, in all your scenarios it should see the new directory.

 

XBMC's library update can be..interesting..in how it works at times. Even when your storage is 100% fine (which will usually be the case) it can still not bother doing an update for many reasons.

 

There is a final option (which again the log will tell you) in that xbmc *is* finding your new directory with absolutely no problems. But then is unable to actually get any information when scraping it.

 

i.e can't determine what the film is. Can't connect to any websites to get information.

 

This is quite common. I use ember media manager to directly scrape info outwith xbmc. I've found this makes the library update much more reliable as xbmc can get the information it needs from the metadata held in the films folder rather than trying to figure it out itself. Thus if xbmc can see the folder (which is usually the case) it can see all the info it needs to add it to the library.

  • Author

Thanks boof. Will turn on debugging and investigate the xbmc log. I use ember media manager as well for my movies before updating the library.

You *probably* don't need to enable debugging. The info you need is likely there as part of the default logging level (though turning on debugging will never hurt!).

 

 

  • Author

Default logging level gives me no info whatsoever:

 

20:48:12 T:2772036464 M:1202995200  NOTICE: VideoInfoScanner: Starting scan ..

20:48:39 T:2772036464 M:1203003392  NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:27

  • Author

The xbmc.log essentially doesn't pick up the new movie, I get the expected lines below, for the already found movies:

 

10:51:29 T:3048495984 M:1285603328  DEBUG: VideoInfoScanner: Skipping dir '/media/movies/SD/Movie....

 

However, I do think the problem is on the XBMC side. I can reboot the client running XBMC and then updating the library works fine and it picks up the movie without a hitch. It appears as though the the directories are cached is some way on the client. I'm afraid I don't know the inner workings of nfs or filesystems for that matter to truly understand what's going on here.

That is the habit I have fallen into...add my movies to the share, reboot xbmc, update library.  Getting tiresome.  I'm still not sure if it has something to do with Wake-on-USB or not.

 

I'm going to tryand mount the NFS shares via fstab raher than teh rc.local when I get home (as suggested in my thread on the xbmc forum).

 

John

  • Author

@johnodon, totally. Was in the same boot and as such wrote a script to somewhat automate the whole process and integrate it in unMENU. Basically the script does as you say, moves directories, wakes up xbmc client via WOL if needed, performs reboot and updates library if necessary. It has some dependencies but it may prove to be useful for me, hopefully others.

 

http://lime-technology.com/forum/index.php?topic=12067.0

 

bob.

 

EDIT: I have them mounted via fstab, no improvement. Only reboot seems to help.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.