Hi,

since my debian LMS works well with the Pluginplayer, (currently 1.2)
but if some hours nothing is played and i put a title in the playlist it
wont play the tune correct.
The only sound thats coming out is the first note from the songs and
would repeat like a machinegun.

I didnt find out why - its not a problem with a special Hardware
(i checked it with another board, same board with different usb DACs and
so on)

Since i want wake up with "while my guitar gently weeps" and not just a
machinegunlike 1.note of it i build this workaround.
May someone had some similar issues.

THE SCRIPT \"PLAYERCHECK.SH\" - PLACED IN /USR/LOCAL/BIN

> 
> root@muzzigbox:/usr/local/bin# cat playercheck.sh
> #!/bin/bash
> ## check if player is playing (better how long is the playtime of
> current track)
> ## if not wait and check again
> ## check also for a running scanprocess
> ## and restart LMS (to restart the pluginplayer) if not
> ## because of i use the plugin localplayer the only way to stop it is
> stop the main process that is LMS
> 
> ###
> parameter
> ###
> server=localhost
> port=9090
> playerID=$(printf "player id ?\nexit\n" | nc $server $port | cut -d ' '
> -f 4 | sed 's/%/%%/g')
> timetoplay=$(printf "$playerID time ?\nexit\n" | nc $server $port | cut
> -d ' ' -f 3)
> 
> ##make logfile
> echo "$(date)">~/../tmp/playercheck.log
> if [ $timetoplay = 0 ]
> then
> echo "player seems not to play right
> now">>~/../tmp/playercheck.log
> echo i ll check again
> sleep 15
> playerState=$(printf "$playerID time ?\nexit\n" | nc $server
> $port | cut -d ' ' -f 3)
> if [ $playerState = 0 ]
> then
> echo "check for a running
> scan">>~/../tmp/playercheck.log
> ps -u root | grep squeezeboxserve || sudo service
> logitechmediaserver restart >>~/../tmp/playercheck.log
> fi
> else
> echo "player is playing nothing 2do
> 4me">>~/../tmp/playercheck.log
> fi
> 
> 
> 

After saving that file make shure it executable
> 
> chmod +x /usr/local/bin/playercheck.sh
> 

Edit crontab to start it (in my case all 15 minutes from 7am till
23:45)
cause of kill it just once a hour - the next morning the same
machingunterror wake me (my family) up :confused:

SUDO CRONTAB -E
> */15 7-23 * * * /usr/local/bin/playercheck.sh

To check if its running i want a "short" logfile with only the status
from the last run:
> cat ~/../tmp/playercheck.log

btw: i found out its better to kill lms and make a rescan so i always do
so with this one:
CAT /USR/LOCAL/BIN/WIPE.SH
> #!/bin/bash
> sudo service logitechmediaserver stop
> sudo squeezeboxserver-scanner --wipe --novideo --noimage --cleanup
> sudo service logitechmediaserver restart
> 


cheers and have a nice day.



Gruss

Jan
------------------------------------------------------------------------
DJanGo's Profile: http://forums.slimdevices.com/member.php?userid=1516
View this thread: http://forums.slimdevices.com/showthread.php?t=99916

_______________________________________________
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to