[mythtv-users] Mount samba shares of videos on mythtv box

Xamindar junkxamindar at gmail.com
Thu May 11 00:41:54 EDT 2006


First of all has anyone done this?

What I am going to try to do is have a cron job that will check to see
if my desktop is up and then mount the video directory of my desktop
onto my mythtv box. Then hopefully add a menu option to browse that
folder and launch a program like xine or mplayer with the files. It will
also have to check every minute or so and unmount the share if my
desktop goes down.  

I already made the script and it works pretty good:

#!/bin/bash

## Set these variables for your system
#STORAGE should be set to where you localy (on mythtv box) mount your
samba share
STORAGE=/mnt/video/external_videos
# set this one to the ip or hostname of the computer with the share to
be mounted
COMPUTER=192.168.2.22
# Your samba share
SHARE=//192.168.2.22/storage
#########Do not modify the following##########

# Set variables
MOUNTED=`mount | grep -c -m 1 $STORAGE`
UP=`ping -c1 $COMPUTER | grep "[0-9] received" | awk '{print $4}'`
#Thanks Seth ;)

# Check if the machine is up AND not mounted, then mount the share

if [ "$UP" == "1" ] && [ "$MOUNTED" == "0" ]; then
        smbmount $SHARE $STORAGE -o guest
fi

# Check if the machine is down AND mounted, then unmount the share

if [ "$UP" == "0" ] && [ "$MOUNTED" == "1" ]; then
        umount -l $STORAGE
fi


Now I just need to figure out a way to have mythtv display a list of the
folder's contents and allow me to select files to by played.  I tried
using myth video but it doesn't show any files to be played.  Also, it
would be useful if I could select a bunch of files and have it play them
all one after the other for example in a playlist.

Any ideas of what I can add to my mythtv menus?

Thanks.


More information about the mythtv-users mailing list