Changeset 30


Ignore:
Timestamp:
Oct 12, 2014, 6:24:37 PM (3 years ago)
Author:
stefan
Message:

some improvements to openMovieOnDreambox.sh

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/openMovieOnDreambox.sh

    r29 r30  
    44settingsFile=~/.openMovieOnDreambox.conf
    55
     6
     7# load settings
    68if [ -e $settingsFile ]; then
    79  source $settingsFile
     
    911  echo """dreamboxHost=dm8000
    1012dreamboxMoviePath=/mnt/diskstation/Spielfilme
     13dreamboxMountPath=/mnt/diskstation
    1114  """ >$settingsFile
    1215  echo "Configuration file \"$settingsFile\" created."
     
    1518fi
    1619
     20
     21# mount diretory on dreambox
     22if [[ "$dreamboxMountPath" != "" ]]; then
     23  ssh $dreamboxHost "mount $dreamboxMountPath"
     24fi
     25
     26
     27# get video name via argument or ask user to enter one
    1728movie=$1
    18 
    1929if [[ "$movie" == "" ]]; then
    2030  movie=`kdialog --inputbox "Filmname"` || exit 1
     
    2232fi
    2333
     34
     35# find movie diretory on dreambox
    2436movieDir=`ssh $dreamboxHost "ls \"$dreamboxMoviePath\" | grep -i \"$movie\" -m 1"` || exit 2
    2537
     
    3143kdialog --passivepopup "Found $movieDir"
    3244
     45
     46# find ts file on dreambox
    3347movieTs=`ssh $dreamboxHost "ls \"$dreamboxMoviePath/$movieDir\" | grep -i \"$movie\" | grep .ts -m 1"` || exit 3
    3448
     
    3953
    4054fullMoviePath="$dreamboxMoviePath/$movieDir/$movieTs"
    41 
    4255echo $fullMoviePath
    4356
     57
     58# play movie on dreambox
    4459curl -F "sRef=1:0:0:0:0:0:0:0:0:0:$fullMoviePath" "http://dm8000/web/zap"
Note: See TracChangeset for help on using the changeset viewer.