How can I play a playlist through stock Harmattan Music Player programmatically?
This is a cross-post from TMO (sorry for the repetition). I am trying to find a way to play a playlist through Harmattan's built-in/stock music player (music-suite) via commandline or dbus or Qt. I have a playlist named "Test" in the music suite. I have tried using Harmattan's MeeGo Touch Framework API ([URL="http://harmattan-dev.nokia.com/docs/platform-api-reference/xml/daily-docs/maemo-meegotouch-interfaces/class_music_suite_interface.html"]MusicSuiteService[/URL]). But I couldn't find what is a valid input for the [B]playPlaylist[/B] method from harmattan documentation or anywhere else.
I tried these commands.
[CODE]dbus-send --type=method_call --print-reply --dest=com.nokia.maemo.meegotouch.MusicSuiteService / com.nokia.maemo.meegotouch.MusicSuiteInterface.playPlaylist array:string:'Test'[/CODE]
Result: No Dbus error. Launches a blank page with an error prompt "Can't connect to server"
[CODE]dbus-send --type=method_call --print-reply --dest=com.nokia.maemo.meegotouch.MusicSuiteService / com.nokia.maemo.meegotouch.MusicSuiteInterface.playPlaylist array:string:'urn:uuid:3abfeac6-c314-4aa4-9d8e-bd573b0bc1d1'[/CODE]
Result: No Dbus error. Launches a blank page with an error prompt "You can't play these types of files on this device"
Can anyone let me know what is the correct format for playPlaylist method? Is there any other way of launching the music suite and playing a playlist (custom or "Recently Added" or "Most Played" or "All Songs") from command-line/Dbus/another-application?
Re: How can I play a playlist through stock Harmattan Music Player programmatically?
Hi,
Have you seen this post..
[url]http://talk.maemo.org/showthread.php?t=80565[/url]
It could be the relative path problem.. i could not try it as i dont have an n9.
Hope this helps. Try giving absolute path in the above dbus command.
-Kusuma
Re: How can I play a playlist through stock Harmattan Music Player programmatically?
[QUOTE=kusumk;904435]Hi,
Have you seen this post..
[url]http://talk.maemo.org/showthread.php?t=80565[/url]
It could be the relative path problem.. i could not try it as i dont have an n9.
Hope this helps. Try giving absolute path in the above dbus command.
-Kusuma[/QUOTE]
As that poster mentioned, absolute path works for a single mp3 file but NOT with an m3u playlist. It's a known issue that Harmattan's music suite does not support external m3u playlists. So, I created my playlist "Test" using the music suite interface itself. I am trying to play this playlist.
I have already tried it before, but just for the sake of confirmation, I created an external playlist file called "MyExternalPlayList.m3u" and executed these commands:
[CODE]dbus-send --type=method_call --print-reply --dest=com.nokia.mae
mo.meegotouch.MusicSuiteService / com.nokia.maemo.meegotouch.MusicSuiteInterface
.playPlaylist array:string:'/home/user/MyDocs/Music/MyExternalPlaylist.m3u'[/CODE]
[CODE]qdbus com.nokia.maemo.meegotouch.MusicSuiteService / com.nokia.
maemo.meegotouch.MusicSuiteInterface.playPlaylist /home/user/MyDocs/Music/MyExte
rnalPlaylist.m3u[/CODE]
In both cases I got a black screen and "Can't connect to server" error. So my question is, what kind of input does com.nokia.
maemo.meegotouch.MusicSuiteInterface.playPlaylist need exactly? The apparently system-generated documentation on [URL="http://harmattan-dev.nokia.com/docs/platform-api-reference/xml/daily-docs/maemo-meegotouch-interfaces/class_music_suite_interface.html"]Harmattan Meego Touch Music Suite API[/URL] for this method is as good as non-existent.