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

Load smart playlist with DCOP

Tags: None
(comma "," separated)
ankle
Registered Member
Posts
6
Karma
0

Load smart playlist with DCOP

Mon Oct 16, 2006 10:52 pm
Is there a way to use DCOP to load a smart playlist?

Alternatively, is there a DCOP command that would load a playlist of 10 random tracks?

This is for an alarm clock: weekalarm.py works well, but (as far as I can tell) it only plays whatever playlist is currently loaded (or an M3U with a fixed list of tracks).

Last edited by ankle on Thu Oct 19, 2006 12:22 pm, edited 1 time in total.
ankle
Registered Member
Posts
6
Karma
0

Re: Load smart playlist with DCOP

Tue Nov 21, 2006 1:37 pm
To answer my own question:

system('dcop amarok playlistbrowser loadPlaylist "50 Random Tracks"')
time.sleep(5)
system('dcop amarok player play')

The small sleep seems to be necessary as otherwise Amarok will try to start playing before the playlist has loaded, and will fail.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]