maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   [How-To] play web radio streams using native Music Suite on N9/N950 (https://talk.maemo.org/showthread.php?t=80038)

juhapekka 2011-11-16 09:21

[How-To] play web radio streams using native Music Suite on N9/N950
 
Dear community,

I was playing with the web radio stream stuff, because a friend of mine started to think that do we really need a radio app as more likely the music suite is just using playbin2, so the solution would be just the desktop file which would open the music suite with the url, and I then ended up on investigating mime-types and associated applications.

So here is the smallest possible thing what you need to do, in order to use the native music-suite application to play web radio streams and to have a kewl shortcut on your home screen. No need for 3rd party internet radio apps.

For now you will need to have a developer mode enabled for transferring the desktop file.

1) create a radiorock.desktop file on your desktop machine with following content:
Code:

[Desktop Entry]
Type=Application
Name=Radio Rock
X-Maemo-Method=com.nokia.maemo.meegotouch.MusicSuiteInterface.play
X-Maemo-Service=com.nokia.maemo.meegotouch.MusicSuiteService
X-Maemo-Fixed-Args=http://stream.radiorock.fi

2) transfer the radiorock.desktop to ~/.local/share/applications/ using scp

Now you will have a desktop shortcut on home screen which will open the web stream defined in X-Maemo-Fixed-Args field inside the desktop file.


Cheers,
Juhapekka Piiroinen

juhapekka 2011-11-16 09:27

Re: [How-To] play web radio streams using native Music Suite on N9/N950
 
This works at least with the PR1.1 which was released for N950 developer device.

juhapekka 2011-11-16 09:36

Re: [How-To] play web radio streams using native Music Suite on N9/N950
 
I created an application for creating these desktop files and published the source code as well as a testing deb package. The source code is licensed under GPLv2. The package will be published also in Ovi Store.

Source code is available @
https://gitorious.org/qad-shortcut-c...hortcutcreator

And prebuilt binary for testing is @
http://qad.jpii.fi/

Screenshot
https://gitorious.org/qad-shortcut-c...screenshot.png

I will prepare the application for ovi store release.

sph 2011-11-16 10:53

Re: [How-To] play web radio streams using native Music Suite on N9/N950
 
Any way to specify an icon for the shortcut?

Rockenroller 2011-11-16 11:12

Shoutcast.com
 
Playing music from internet streams is quid best to download dirrectly .pls file from shoutcast.com. After download open it. And it opens in Harmattan native music player.

I found this is the simpliest way.

juhapekka 2011-11-16 11:32

Re: [How-To] play web radio streams using native Music Suite on N9/N950
 
Quote:

Originally Posted by sph (Post 1124308)
Any way to specify an icon for the shortcut?

added automatic generation to the source, which will use the name of the radio.

juhapekka 2011-11-16 11:33

Re: Shoutcast.com
 
Quote:

Originally Posted by Rockenroller (Post 1124314)
Playing music from internet streams is quid best to download dirrectly .pls file from shoutcast.com. After download open it. And it opens in Harmattan native music player.

I found this is the simpliest way.

Yeah that is possible, but in that way you do not get a shortcut to application list. :p

juhapekka 2011-11-16 11:34

Re: [How-To] play web radio streams using native Music Suite on N9/N950
 
feel free to improve the source code and just request merge, after which i will just push it to thru the release process etc.

Version 0.0.1 has been sent to ovi store publish service.

MartinK 2011-11-16 16:25

Re: [How-To] play web radio streams using native Music Suite on N9/N950
 
Nice idea !

BTW, what about support for shortcuts that launch apps/utilities/scripts?
That would IMHO be really useful! :)

It would just have to generate a .desktop file similar to this one:
Code:

[Desktop Entry]
Type=Application
Name=My shortcut name
Exec=/path/to/my/app

If the user wants to launch the application in a single instance only, it would look like this:
Code:

[Desktop Entry]
Type=Application
Name=My shortcut name
Exec=invoker --type=e --single-instance /path/to/my/app


elemental 2011-11-17 13:09

Re: [How-To] play web radio streams using native Music Suite on N9/N950
 
Some applications in the home screen have "red icon" to delete them. Do you know how to add that to created icons ?

juhapekka 2011-11-17 15:56

Re: [How-To] play web radio streams using native Music Suite on N9/N950
 
Quote:

Originally Posted by elemental (Post 1124996)
Some applications in the home screen have "red icon" to delete them. Do you know how to add that to created icons ?

I have no idea. Any suggestions are welcome.

juhapekka 2011-11-18 04:46

Re: [How-To] play web radio streams using native Music Suite on N9/N950
 
In the next version you should be able to:
- define an image file which is used as an icon, or to resize it to icon
- define other kind of shortcuts, like shortcuts to scripts etc.

If somebody has the time to do those, feel free to checkout the code from https://gitorious.org/qad-shortcut-creator and then ask for a merge, as for now I am busy for the next 1 to 2 weeks

vielfrass 2011-11-24 22:41

Re: [How-To] play web radio streams using native Music Suite on N9/N950
 
Is it possible to open and play an album or playlist with this method?


All times are GMT. The time now is 14:56.

vBulletin® Version 3.8.8