You are not logged in.

#1 2011-05-29 15:47:09

erniejunior
Member
Registered: 2011-05-29
Posts: 2
Website

How to add Internet Radio Stations to my MPD database?

Hi guys,

I am trying to set up my MPD to play internet radio stations. The first thing I tried was to add the .pls files to my library folder but MPD did not recognize them. After that I found out that I can play internet radio streams by adding the address of the stream to a playlist. But that is quite ugly (only the url is displayed when I look into the playlist) and the search function does not cover the internet radio staions.
Is there any other way to play back internet radio streams so they behave like songs in my database?

Greetings,


erniejunior

Offline

#2 2011-06-02 09:16:05

rwd
Member
Registered: 2009-02-08
Posts: 664

Re: How to add Internet Radio Stations to my MPD database?

Stream urls are usually stored client-side, and not in the mpd database afaik. Sonata does it that way.

Offline

#3 2011-06-02 11:18:23

xamaco
Member
From: Corsica, France
Registered: 2010-04-05
Posts: 87

Re: How to add Internet Radio Stations to my MPD database?

I have a bunch of radios saved as playlists (m3u and pls). I launch the radios by using a little script which scrubs the data in the playlist and add it to mpc. At the origin, it was 2 scripts found on mpd's web site that I merged into one...

#!/bin/bash
# -*- coding: UTF8 -*-

# Script to launch a web m3u or pls playlist (web radio) on mpd using mpc

# Extract file extension
EXT=`echo "${1##*.}" | tr A-Z a-z`

case "$EXT" in
          "pls"   ) 
          PL=`grep '^File[0-9]*' $1 | sed -e 's/^File[0-9]*=//'`
          ;;

          "m3u" )
          PL=`cat $1 | sed -e '/^#/D'`
          ;;

          * )
          echo "Filename without a valid extension"
          exit 1;;
  esac

# Launch mpd daemon if needed
if ! [ -e ~/.mpd/pid ]; then
        mpd
fi

# Clear old playlist, add new playlist and play
mpc clear
mpc add "$PL"
mpc play

Offline

Board footer

Powered by FluxBB