This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Re: OnLine Radio

Tags: None
(comma "," separated)
alessiol
Registered Member
Posts
3
Karma
0

[SOLVED] OnLine Radio

Mon Apr 20, 2009 9:57 am
Hi all, I have a made a script for Amarok 2 (http://www.kde-apps.org/content/show.ph ... ent=100304) for a list of Italian Radios, can I set an Image each radio? If yes how?

Last edited by alessiol on Mon Apr 20, 2009 10:14 am, edited 1 time in total.
nhn
KDE Developer
Posts
114
Karma
0
OS

Re: OnLine Radio

Mon Apr 20, 2009 10:06 am
Yes and no.

You currently cannot have it show a custom image for each station in the browser. You can however set a custom "album" image that will be shown when a radio station is added to the playlist. You can also set a number of other values that are shown when a station is added like this:

            item = Amarok.StreamItem;
            item.level = 0;
            item.callbackData = "";
            item.itemName = title;
            item.playableUrl = url;
            item.album = "Something";
            item.artist = "Something else";
            item.coverUrl = cover;
            item.infoHtml = "this is what I want to show in the service info applet when the item is selected in the browser";

            script.insertItem( item );

I hope this helps.

Note that you either have to use an online url for the images, or install them along with the script. In the latter case you then get the path of the image by using:

var cover = Amarok.Info.scriptPath() + "/some_image.png";

If in doubt, look at how it works in the librivox script: http://websvn.kde.org/trunk/extragear/m ... x_service/

- Nikolaj
alessiol
Registered Member
Posts
3
Karma
0

Re: OnLine Radio

Mon Apr 20, 2009 10:13 am
Thanks a lot!


Bookmarks



Who is online

Registered users: Bing [Bot], gfielding, Google [Bot], markhm, Sogou [Bot], Yahoo [Bot]