summaryrefslogtreecommitdiff
path: root/config/scripts/radioinfo-1093-541
blob: bbac81cf8b2f13aa349ea5c43941666bcd6828af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# MDR Jump-Playlist
# $1 = outfile

### Variabel
Name="MDR Jump [www.jumpradio.de]"
### 

# get...
wget -q --tries=2 --timeout=5 -O /tmp/playlist "http://www.jumpradio.de/scripts/musik/wsx_vote_recher.cfm?&titelsuche=zeit"

# Artist/Title
artist=`grep -B30 '<h2>Suche nach Datum und Uhrzeit' /tmp/playlist | tac`
artist=${artist/*$'">'/}; artist=${artist/$'<'\/'h2>'*/}
title=`grep -B29 '<h2>Suche nach Datum und Uhrzeit' /tmp/playlist | tac`
title=${title/*$'">"'/}; title=${title/$'"<'\/'p>'*/}
# temp. no Info
artist=${artist:='---'}; titel=${title:='---'}

# write...
if [ $1 ]; then
	echo $Name    > $1
	echo $artist >> $1
	echo $title  >> $1
else
	echo "$Name: Interpret/Titel =  $artist / $title"
fi