gxineshell 1.1 KB

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. rm -f /tmp/gxineerror.log 2>/dev/null
  3. #v3.99 bugfix: when a file with full path, prefix with file://
  4. PREFILE=''
  5. #[ "`echo "$@" | grep ':/'`" = "" ] && [ -f "$@" ] && PREFILE='file://'
  6. [ "`echo "$@" | cut -b 1`" = "/" ] && [ -f "$@" ] && PREFILE='file://'
  7. SCRNSAVE=`xset q | grep "timeout:" | tr -s " " | cut -f 3 -d " "`
  8. if [ $SCRNSAVE -ne 0 ];then
  9. xset s off -dpms #v426 bugfix
  10. gxine ${PREFILE}"$@" 2> /tmp/gxineerror.log
  11. xset s on +dpms #v426
  12. else
  13. gxine ${PREFILE}"$@" 2> /tmp/gxineerror.log
  14. fi
  15. if [ -s /tmp/gxineerror.log ];then
  16. if [ ! "`grep 'Error loading library' /tmp/gxineerror.log`" = "" ];then
  17. if [ "`cat /root/.packages/packages.txt /root/.packages/livepackages.txt | grep '"mplayer_codecs_full' | grep '" on "'`" = "" ];then #'Geany
  18. xmessage -center -bg '#FF8080' -title "Gxine ERROR" "Gxine failed to load a codec file required to play the media file.
  19. There is a PET package with extra codecs, called 'mplayer_codecs_full'.
  20. Please run the PETget package manager and install it -- click the
  21. 'install' button on the desktop or run from the 'Setup' menu."
  22. fi
  23. fi
  24. fi
  25. ###END###