it-artikel:linux:gnome-rhythmbox-autoplay-wrapper-script-for-internet-radio-shoutcast-streams

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

it-artikel:linux:gnome-rhythmbox-autoplay-wrapper-script-for-internet-radio-shoutcast-streams [2022-08-31 12:30] – created - external edit 127.0.0.1it-artikel:linux:gnome-rhythmbox-autoplay-wrapper-script-for-internet-radio-shoutcast-streams [2023-01-21 14:45] (current) – removed axel.werner.1973@gmail.com
Line 1: Line 1:
-====== gnome rhythmbox autoplay wrapper script for internet radio (shoutcast) streams ====== 
  
-<note warning>**Warning:** This page is most likely **DEPRECATED**! Its most likely that this problem has been fixed for many years. Just keeping it up for historic reasons.  --- //[[axel.werner.1973@gmail.com|Axel Werner]] 2021-04-01 20:16// </note> 
- 
-//**English Describtion see source code.**// 
- 
-Bereits seit einigen Jahren besteht bei Gnome-Rhythmbox das Problem, dass es Radio-Streams z.B. von Shoutcast und ähnlichem nicht automatisch abspielt wenn man den Link dazu im Firefox Webbrowser angeklickt hat. Selbst dann nicht wenn man Firefox explizit sagt dass der Link (pls oder m3u Playlists) ausdrücklich mit Rhythmbox geöffnet werden sollen. Rhythmbox fügt in diesem Fall nur den Radio-Sender unter "RADIO" seiner Liste hinzu, spielt diesen aber nicht automatisch ab. 
- 
-Interessanter Weise spielt RB jedoch einen solchen Link automatisch ab, wenn man RB die URL direkt auf der Kommandozeile übergibt. z.b. <code>rhythmbox http://radio.108.pl:8004/listen.pls</code> 
- 
-Ich persönlich halte dieses Verhalten für einen BUG bzw eine fehlende Funktion in RB. Darum habe ich nach einer geeigneten Lösung für das Problem gesucht, Doch leider ohne Erfolg. Durch Experimentieren bin ich dann darauf gestossen wie Firefox (3.0 für Linux) die Informationen an RB weitergibt und hab eine mögliche "Zwischenlösung" erkannt.  
- 
-Das nachfolgend gezeigte Script fängt die Daten von Firefox einfach ab und leitet diese entsprechend aufbereitet an Rhythmbox weiter. Rhythmbox startet daraufhin und spielt den gewünschten Stream automatisch ab.  
- 
-Um verwenden zu können installiert man das Script am besten nach /usr/bin , macht es ausführbar und gibt es im Firefox als ZIELPROGRAMM für *.pls und *.m3u playlisten an. Der Rest sollte dann von selbst funktionieren. 
- 
- --- //[[mail@awerner.myhome-server.de|Axel Werner]] 2009-08-22 18:00// 
- 
- 
- 
-===== /usr/bin/rb-autoplay.sh ===== 
- 
-<code> 
-#!/bin/bash 
-# 
-# 
-# Rhythmbox-autoplay wrapper script for firefox 
-# 
-# Version 1.0 - 2009-08-22 - by Axel Werner [mail@awerner.myhome-server.de] 
-# 
-# 
-# rhythmbox does not autoplay shoutcast-streams when started through firefox 
-# this script intercepts the firefox output, examines it and starts rhythmbox 
-# with the proper argument/url to autoplay the desired stream.  
-# 
-# this is just a workaround for some stupid bug/feature in rhythmbox.  
-# all this should be implemented into rhythmbox in some more intelligent way. 
-# 
-# So one day this may become unnessesary. 
-# 
- 
-playlist="$1" 
- 
-#determine type of playlist 
- 
-type=`basename $playlist | cut -f2 -d'.'` 
- 
-case $type in 
- pls) 
- # is .pls type 
- url=`grep "File1=" "$playlist" | cut -f2 -d'=' 
- if [ ! "$url" = "" ] ; then 
- rhythmbox "$url" & 
- sleep 3 
- rm -f $playlist 
- fi 
- ;; 
- m3u) 
- # is .m3u type 
- url=`grep "^http://" "$playlist" | head -1`  
- if [ ! "$url" = "" ] ; then 
- rhythmbox "$url" & 
- sleep 3 
- rm -f $playlist 
- fi 
- ;; 
- *) 
- # is UNKNOWN type 
- echo "Type of Playlist is UNKNOWN to $0 . See '$playlist'. Exiting now." | tee "/tmp/$0.log" 
- exit 1 
- ;; 
-esac 
- 
- 
-</code> 
- 
- 
-{{tag>bash shell linux scripting rhythmbox auto play autoplay stream shoutcast radio firefox gnome}} 
it-artikel/linux/gnome-rhythmbox-autoplay-wrapper-script-for-internet-radio-shoutcast-streams.1661949019.txt.gz · Last modified: 2022-08-31 12:30 by 127.0.0.1