Configuring Media Library

BJBBJB wrote:

ncarver,

I know this post is a few months old but it is right inline with my question…How did you configure the WDTVLS and your NAS so that you could of course add/delete, etc. as admin from your PC but make sure the WDTV did not write over your files?

 

Just noticed this request, so here is what I have set up…

I was unwilling to let our SMPs write to the drives containing the video files, as I didn’t want to ever have to deal with corruption of one or more 3 TB drives. So for quite a while I simply browsed the (SMB) share folders.  However, once we got to having multiple drives, each with Movies and TV subdirectories, I started searching for some way to merge them.  While web searching this I came across suggestion to use symbolic links, and I realized that that would also allow setting up a separate writable share, so I could finally use the Media Library.

So here is the setup (on a Linux server running Samba for sharing):

– Each external drive containing the video files gets mounted like /Video1, with subdirectories Movies, TV, etc.

– The /Video_n_ directories are each shared out so that I can browse them as shares (if desired), but they are readonly

– I created a new directory, /Video, on the internal drive of the Linux server, and made subdirectories Movies, TV, etc.

– Symlinks are created in /Video/Movies to each video file in /Video1/Movies, /Video2/Movies, etc.

– Symlinks are created in /Video/TV to each video file in /Video1/TV, etc., and so forth.

– /Video/Movies is shared out as Movies, /Video/TV as TV, and these shares are writable

– Media Library is enabled, the writable Movies and TV shares are added to it

– The SMPs are used to get content, writing all metadata (e.g., .xml files) in the /Video directory only

The key to making this work is that Samba can be setup to serve the target file of a symlink rather than the symlink.  This requires the following lines be in the smb.conf file (given my setup):

  unix extensions = no    [global section]

  follow symlinks = yes   [share section]

  wide links = yes             [share section]

Works just as I wanted:  (1) can use ML without danger of video drives being touched, and (2) Movies and TV from multiple video drives end up merged into single shares.

Obviously creating all the symlinks by hand would be annoying with more than a few files, so I wrote a simple shell script that adds any missing symlinks; I just run this script anytime I add video files to the video drives, so trivial to keep up to date.  Oh, yes, one complication was subdirectories under TV.  They have to be recreated in the merged share (can’t be symlinks).  Not a big problem when using a script.

With 6 TB of video files, /Video requires < 1 GB for all the metadata and backdrops, etc.

Reproducing this sort of setup on an NAS will require that you be able to create symlinks from one NAS directory to another, and that you be able to set the appropriate Samba options (which will probably require editing a config file).  I frankly don’t know how easy it is to do such things on a typical NAS.

1 Like