Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Best Solution to listen Music Streaming

Off-Topic discussions about science, technology, and non Debian specific topics.
Message
Author
Bulkley
Posts: 6387
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Best Solution to listen Music Streaming

#21 Post by Bulkley »

Radio Tray Out of the way; nothing to look at. It just plays.

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: Best Solution to listen Music Streaming

#22 Post by bester69 »

Using mpd with streamtunner2:

Image
subir imagenes


mpd-player.sh

Code: Select all

#!/bin/bash
#
MYHOST='192.168.1.128' # or your MPD host

touch ~/.mpd/flag
touch ~/.mpd/song
A=$(cat ~/.mpd/flag)
ANT=$(cat ~/.mpd/song)
mpc clearerror
killall  mpc &
killall  mpd &
killall  -9 mpc &
killall  -9 mpd &
mpd
mpd

#echo $1 > ~/fich.txt
case "$1" in
*m3u*) OPT="m3u" ;; # Para SurfMusci Tab
*pls*) OPT="m3u" ;; # Para Shoutcast tab
*  ) OPT="gener";;
esac
  
#Pinta la opción escogida  
#echo $OPT > ~/fich.txt;echo "$1" >> ~/fich.txt;echo "$2" >> ~/fich.txt
  
  
if [ "$A" = "1" ]
  then
  
 
 if [ "$OPT" = "m3u" ]
  then
    mpc -h $MYHOST load $1
    index=$(mpc -h $MYHOST playlist|wc -l)
    mpc -h $MYHOST play $index
      
  else
    mpc -h $MYHOST add $1
    index=$(mpc -h $MYHOST playlist|wc -l)
    mpc -h $MYHOST play $index 
  fi
  
   
  ACT=$(mpc -h $MYHOST current)
  mpc -h $MYHOST stop
  if [ "$ACT" = "$ANT" ]
    then
      echo "0" > ~/.mpd/flag
      mpc stop   
     
     else
   
 
  
 if [ "$OPT" = "m3u" ]
  then
    mpc -h $MYHOST load $1
    index=$(mpc -h $MYHOST playlist|wc -l)
    mpc -h $MYHOST play $index
   
      
  else
    mpc -h $MYHOST add $1
    index=$(mpc -h $MYHOST playlist|wc -l)
    mpc -h $MYHOST play $index 
   
  fi

   mpc -h $MYHOST current >  ~/.mpd/song
    echo "1" > ~/.mpd/flag
     
    fi
     else
     
if [ "$OPT" = "m3u" ]
  then
    mpc -h $MYHOST load $1
    index=$(mpc -h $MYHOST playlist|wc -l)
    mpc -h $MYHOST play $index
   
      
  else
    mpc -h $MYHOST add $1
    index=$(mpc -h $MYHOST playlist|wc -l)
    mpc -h $MYHOST play $index 
   
  fi
  
  mpc -h $MYHOST current >  ~/.mpd/song
   echo "1" > ~/.mpd/flag

fi



bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

stevesr0
Posts: 159
Joined: 2012-05-05 03:32

Re: Best Solution to listen Music Streaming

#23 Post by stevesr0 »

Re: radiotray.

I thought it wasn't working until I noticed this very faint icon in the tray.

If anyone has the same problem, be aware to look closely, as it may be a small, faint icon.

Steve

Post Reply