yodelaye
Group: Members
Posts: 16
Joined: Feb. 2007 |
|
Posted: July 02 2007,19:10 |
|
Hi, again
In fact it was not so hard to change the cpanel.lua script to have this tuner_gui script working for DSL too
the script is provided below to use it : - copy it in your text editor - save it (ex : in your /home/dsl as tuner_gui_dsl - in a terminal - allow the file to be executed - and launch it
Code Sample | chmod +x tuner_gui_dsl ./tuner_gui_dsl
|
a few remark : - of course it requires mplayer. so don t forget to download one mplayer extension in the repositery
- As you can see, it is quite easy to edit the radio available. the most difficult is to find the url for the streaming flux of your favorite radio...
-------------------------------------------------------------------- Here is the script for DSL : --------------------------------------------------------------------
Code Sample | #!/bin/lua
-- Derived from cpanel (C) Robert Shingledecker 2005,2006 -- inspired by tuner -- Main GUI loop for myDSL Extensions
function b1(self) os.execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/lemouv_hd.m3u") end
function b2(self) os.execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/franceinter_hd.m3u") end
function b3(self) os.execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/franceculture_hd.m3u") end
function b4(self) os.execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/fip_hd.m3u") end
function b5(self) os.execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/francemusique_hd.m3u") end
function b6(self) os.execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/francebleu_idf_hd.m3u") end
function b7(self) os.execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip1.yacast.fr/encodercheriefm") end
function b8(self) os.execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip8.yacast.fr/encodereurope1") end
function b9(self) os.execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip8.yacast.fr/encodereurope2") end
function b10(self) os.execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip1.yacast.fr/encodernrj") end
function b11(self) os.execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vipbu.yacast.fr/encodernostalgie") end
function b12(self) os.execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip1.yacast.fr/encoderrireetchansons") end
function b13(self) end
function b14(self)
end
function b15(self)
end
function b16(self) end
function b17(self)
end
function b18(self)
end
function b19(self)
end
function b20(self) end
function b21(self)
end
function b22(self)
end
function b23(self)
end
function b24(self)
end
btnCB = {b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18,b19,b20,b21,b22,b23,b24}
w = fltk:Fl_Window(570,255, "Listen your favorite Web Radio on line") btn={} btnLabel={"Le Mouv !","France inter","France Culture","FIP","france musique","france bleu","cherie fm","europe1","europe2","NRJ","nostalgie","rireetchansons","","","","","","","","","","","",""} btnWidth=130; btnHeight=30 rows=6; cols=4; spacer=10
for h=1, rows do for w = 1, cols do i = cols*(h-1)+w btn[i] = fltk:Fl_Button(btnWidth*(w-1)+spacer*w,btnHeight*(h-1)+spacer*h,btnWidth,btnHeight,btnLabel[i]) btn[i]:callback(btnCB[i]) end end
os.execute("sudo ps > /tmp/pipe.lua &") io.input("/tmp/pipe.lua") local data = io.read("*all")
w:show() Fl:run() |
------------------------------------------ and here is the one for DSL-N : ------------------------------------------
Code Sample | #!/bin/flua
-- Derived from cpanel (C) from Robert Shingledecker 2004-2006 -- inspired by tuner -- Main GUI loop
btnWidth = 130 btnHeight = 30 col = {10,150,290,430} row = {10,50,90,130,170,210}
w = Window{570,255, "Listen your favorite Web Radio on line"}
b1 = Button{col[1],row[1],btnWidth,btnHeight, "Le mouv !"} function b1.callback() execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/lemouv_hd.m3u") end
b2 = Button{col[1],row[2],btnWidth,btnHeight, "France Inter"} function b2:callback() execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/franceinter_hd.m3u") end
b3 = Button{col[1],row[3],btnWidth,btnHeight, "France Culture"} function b3:callback() execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/franceculture_hd.m3u") end
b4 = Button{col[1],row[4],btnWidth,btnHeight, "FIP"} function b4:callback() execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/fip_hd.m3u") end
b5 = Button{col[1],row[5],btnWidth,btnHeight, "France musique"} function b5:callback() execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/francemusique_hd.m3u") end
b6 = Button{col[1],row[6],btnWidth,btnHeight, "France bleue"} function b6:callback() execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/francebleu_idf_hd.m3u") end
b13 = Button{col[3],row[1],btnWidth,btnHeight, "Cherie FM"} function b13:callback() execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip1.yacast.fr/encodercheriefm") end
b14 = Button{col[3],row[2],btnWidth,btnHeight, "Europe1"} function b14:callback() execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip8.yacast.fr/encodereurope1") end
b15 = Button{col[3],row[3],btnWidth,btnHeight, "Europe2"} function b15:callback() execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip8.yacast.fr/encodereurope2") end
b16 = Button{col[3],row[4],btnWidth,btnHeight, "NRJ"} function b16:callback() execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip1.yacast.fr/encodernrj") end
b17 = Button{col[3],row[5],btnWidth,btnHeight, "nostalgie"} function b17:callback() execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vipbu.yacast.fr/encodernostalgie") end
b18 = Button{col[3],row[6],btnWidth,btnHeight, "Rire et chansons"} function b18:callback() execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip1.yacast.fr/encoderrireetchansons") end
w:end_layout() w:show()
|
enjoy yod
|