Posted by: isaraffee | August 10, 2009

My Home Media Player

My Home Media Player

The /root/script directory contains:

chkcount*

chkcountsummary*

chkcountsummary2*

chktest1*

chktest10*

chktest11*

chktest12*

chktest13*

chktest14*

chktest2*

chktest3*

chktest4*

chktest5*

chktest6*

chktest7*

chktest8*

chktest9*

moviestats.txt

playall*

playlist*

The Movies Scripts

root:# more chktest*

::::::::::::::

chktest1

::::::::::::::

/usr/bin/mplayer -fs /root/script/Childmovies/kangkung/*.DAT

::::::::::::::

chktest10

::::::::::::::

/usr/bin/mplayer -fs /root/script/Childmovies/warnerbros.DAT

::::::::::::::

chktest11

::::::::::::::

/usr/bin/mplayer -fs /root/script/Childmovies/zamzam1/*.DAT

::::::::::::::

chktest12

::::::::::::::

/usr/bin/mplayer -fs /root/script/Childmovies/zamzam2/*.DAT

::::::::::::::

chktest13

::::::::::::::

/usr/bin/mplayer -fs /root/script/Childmovies/spider1.DAT

::::::::::::::

chktest14

::::::::::::::

/usr/bin/mplayer -fs /root/script/Childmovies/spider2.DAT

::::::::::::::

chktest2

::::::::::::::

/usr/bin/mplayer -fs /root/script/Childmovies/Barney2.DAT

::::::::::::::

chktest3

::::::::::::::

/usr/bin/mplayer -fs /root/script/Childmovies/Hifi1.DAT

::::::::::::::

chktest4

::::::::::::::

/usr/bin/mplayer -fs /root/script/Childmovies/Hifi2.DAT

::::::::::::::

chktest5

::::::::::::::

/usr/bin/mplayer -fs /root/script/Childmovies/Jellabies1/*.DAT

::::::::::::::

chktest6

::::::::::::::

/usr/bin/mplayer -fs /root/script/Childmovies/Richardcount.DAT

::::::::::::::

chktest7

::::::::::::::

/usr/bin/mplayer -fs /root/script/Childmovies/Sesame1.DAT

::::::::::::::

chktest8

::::::::::::::

/usr/bin/mplayer -fs /root/script/Childmovies/Sesame2.DAT

::::::::::::::

chktest9

::::::::::::::

/usr/bin/mplayer -fs /root/script/Childmovies/Tom*.avi

The Media Player script

while [ “$choice” != “x” ]

do

clear

echo “Hello! WELCOME to Planet ISMAILMOVIE Player”

echo “**********************************************************”

echo “Some INSTRUCTIONS that are helpful”

echo

echo “To play a movie, select the number that is on the list”

echo

echo “To stop a movie while the movie is running, press q”

echo

echo “To quit this movie player, press x and hit the <ENTER> key”

echo

echo “***********************************************************”

echo

echo “1)Lenggang Kangkung”

chkcountsummary

echo “2)Barney2”

chkcountsummary2

echo “3)HiFi1”

echo “4)HiFi2”

echo “5)Jellabies1”

echo “6)Richard Scary Count”

echo “7)Sesame1”

echo “8)Sesame2”

echo “9)Tom and Jerry”

echo “10)Looney toons”

echo “11)Zam zam1”

echo “12)Zam zam2”

echo “13)Spider 1”

echo “14)Spider 2”

echo

echo “What movie would you like to watch today? Enter movie number:”

read choice

case “$choice” in

1)

#/usr/bin/mplayer -fs /root/script/Childmovies/Barney1.DAT

/root/script/chkcount

/root/script/chktest1

#xterm -title “Please wait…taking 12 seconds to load movie” -e /root/script/chktest1

;;

2)

#/usr/bin/mplayer -fs /root/script/Childmovies/Barney2.DAT

/root/script/chkcount

/root/script/chktest2

#xterm -title “Please wait…taking 12 seconds to load movie” -e /root/script/chktest2

;;

3)

#/usr/bin/mplayer -fs /root/script/Childmovies/Hifi1.DAT

/root/script/chktest3

#xterm -title “Please wait…taking 12 seconds to load movie” -e /root/script/chktest3

;;

4)

#/usr/bin/mplayer -fs /root/script/Childmovies/Hifi2.DAT

/root/script/chktest4

#xterm -title “Please wait…taking 12 seconds to load movie” -e /root/script/chktest4

;;

5)

#/usr/bin/mplayer -fs /root/script/Childmovies/Jellabies1/*.DAT

/root/script/chktest5

#xterm -title “Please wait…taking 12 seconds to load movie” -e /root/script/chktest5

;;

6)

#/usr/bin/mplayer -fs /root/script/Childmovies/Richardcount.DAT

/root/script/chktest6

#xterm -title “Please wait…taking 12 seconds to load movie” -e /root/script/chktest6

;;

7)

#/usr/bin/mplayer -fs /root/script/Childmovies/Sesame1.DAT

/root/script/chktest7

#xterm -title “Please wait…taking 12 seconds to load movie” -e /root/script/chktest7

;;

8)

#/usr/bin/mplayer -fs /root/script/Childmovies/Sesame2.DAT

/root/script/chktest8

#xterm -title “Please wait…taking 12 seconds to load movie” -e /root/script/chktest8

;;

9)

#/usr/bin/mplayer -fs /root/script/Childmovies/Tom*.avi

/root/script/chktest9

#xterm -title “Please wait…taking 12 seconds to load movie” -e /root/script/chktest9

;;

10)

#/usr/bin/mplayer -fs /root/script/Childmovies/warnerbros.DAT

/root/script/chktest10

#xterm -title “Please wait…taking 12 seconds to load movie” -e /root/script/chktest10

;;

11)

#/usr/bin/mplayer -fs /root/script/Childmovies/zamzam1/*.DAT

/root/script/chktest11

#xterm -title “Please wait…taking 12 seconds to load movie” -e /root/script/chktest11

;;

12)

#/usr/bin/mplayer -fs /root/script/Childmovies/zamzam2/*.DAT

/root/script/chktest12

#xterm -title “Please wait…taking 12 seconds to load movie” -e /root/script/chktest12

;;

13)

#/usr/bin/mplayer -fs /root/script/Childmovies/zamzam2/*.DAT

/root/script/chktest13

#xterm -title “Please wait…taking 12 seconds to load movie” -e /root/script/chktest13

;;

14)

#/usr/bin/mplayer -fs /root/script/Childmovies/zamzam2/*.DAT

/root/script/chktest14

#xterm -title “Please wait…taking 12 seconds to load movie” -e /root/script/chktest14

;;

x)

echo “You have decided to quit the movie player.Bye! Rock on! Ow! Ow!”

;;

*)

echo “NO such movie number.Pick a number from 1 to 14”

sleep 2

;;

esac

done

The “Play All Movies” script

root:# more playall

#/usr/sbin/crond

/usr/bin/mplayer -fs /root/script/Childmovies/kangkung/*.DAT

/usr/bin/mplayer -fs /root/script/Childmovies/Hifi1.DAT

/usr/bin/mplayer -fs /root/script/Childmovies/Sesame1.DAT

/usr/bin/mplayer -fs /root/script/Childmovies/Richardcount.DAT

/usr/bin/mplayer -fs /root/script/Childmovies/Tom*.avi

/usr/bin/mplayer -fs /root/script/Childmovies/Jellabies1/*.DAT

/usr/bin/mplayer -fs /root/script/Childmovies/zamzam1/*.DAT

/usr/bin/mplayer -fs /root/script/Childmovies/spider1.DAT

/usr/bin/mplayer -fs /root/script/Childmovies/Barney2.DAT

/usr/bin/mplayer -fs /root/script/Childmovies/Hifi2.DAT

/usr/bin/mplayer -fs /root/script/Childmovies/Sesame2.DAT

/usr/bin/mplayer -fs /root/script/Childmovies/warnerbros.DAT

/usr/bin/mplayer -fs /root/script/Childmovies/zamzam2/*.DAT

/usr/bin/mplayer -fs /root/script/Childmovies/spider2.DAT

#/usr/bin/mplayer -fs /root/script/Childmovies/Jellabies2/*.DAT

The “Check Which Movie is Frequently Played” Script

root:# more chkcount*

::::::::::::::

chkcount

::::::::::::::

#This script is to record the number of time each movie is watched

date >> /root/script/moviestats.txt

echo barney2 >> /root/script/moviestats.txt

echo >> /root/script/moviestats.txt

::::::::::::::

chkcountsummary

::::::::::::::

#This script will provide the summary stats of the movies watched

LENKAN=`grep -c lenggang /root/script/moviestats.txt`

echo ” Lenggang Kangkung has been watched $LENKAN times”

::::::::::::::

chkcountsummary2

::::::::::::::

#This script will provide the summary stats of the movies watched

BARNEY2=`grep -c barney2 /root/script/moviestats.txt`

echo ” Barney2 has been watched $BARNEY2 times”

You will need the moviestats.txt file:

root:# more moviestats.txt

Thu Jan 24 11:36:00 SGT 2008

lenggang

Thu Jan 24 11:42:40 SGT 2008

lenggang

Mon Feb 4 23:37:29 SGT 2008

barney2

Mon Feb 4 23:41:59 SGT 2008

barney2

Tue Nov 18 21:43:04 SGT 2008

barney2

Fri Dec 19 23:37:42 SGT 2008

barney2

Mon Apr 13 03:54:59 SGT 2009

barney2

Mon Apr 13 03:55:42 SGT 2009

barney2

Location of Movies

Basically I housed all the movies in a directory:

root:# cd /root/script/Childmovies/

neptune:/~/script/Childmovies

root:# ls

Barney2.DAT* mcdonaldfarm/

Hifi1.DAT* mothergoose/

Hifi2.DAT* postmanpat/

Jellabies1/ spider1.DAT*

Richardcount.DAT* spider2.DAT*

Sesame1.DAT* teletubsnow.DAT*

Sesame2.DAT* warnerbros.DAT*

Tom.And.Jerry.A.Nutcracker.Tale.[2007].DVDrip.XviD-DUQA.avi zamzam1/

hulaballoon.DAT* zamzam2/

kangkung/

The Open Source Word Processor, AbiWord was used to produce this documentation.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: