Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

dbus interface for dynamic playlists #14

Closed
GoogleCodeExporter opened this issue Apr 25, 2015 · 3 comments
Closed

dbus interface for dynamic playlists #14

GoogleCodeExporter opened this issue Apr 25, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

I found that I like dynamic playlists best when MPD is in random and consume 
mode. Right now I need to way-to-many clicks to achieve desired configuration.

If Cantata had dbus interface for dynamic playlists, then I could write simple 
shell script and play Cantata I like it with just one click :) .

dbus interface should be able to:
1. list all available dynamic playlists
2. select dynamic playlist
3. start/stop dynamic mode

Original issue reported on code.google.com by mini...@gmail.com on 11 May 2012 at 11:18

@GoogleCodeExporter
Copy link
Author

Why would you want to use dynamic play lists with random and consume modes set? 
The cantata-dynamic helper script already randomly selects tracks, and removes 
tracks so that there is only 10 tracks in the playqueue at any one time.

You could already do what you wish without needing any further dbus support, 
and even without cantata running.

You can obtain the list of dynamic play lists by looking in 
~/.config/cantata/dynamic
To 'load' a dynamic play list, all you need to do in symkink the one in the 
folder above to ~/.cache/cantata/dynamic/rules. Then you can start the helper 
by calling '/usr/lib/kde4/libexec/cantata-dynamic start'  (or first call 
'/usr/lib/kde4/libexec/cantata-dynamic stop' to stop any current play list)

Original comment by craig.p....@gmail.com on 11 May 2012 at 9:05

@GoogleCodeExporter
Copy link
Author

I have never realized that cantata-dynamic script will remove tracks from 
playlist at some point. You are right - there is no need for consume mode.

As for random - that was due to another script that was running only when MPD 
was in random mode, and I wanted to run it also when Cantata dynamic mode is 
on. But I decided to just modify that script to be aware of cantata-dynamic 
process.

Thanks for the tips about CLI interface to cantata-dynamic!

But I think I have found bug. That's what I did:
1. create symlink in ~/.cache/cantata/dynamic/ to one of files in 
~/.config/cantata/dynamic/
2. run /usr/lib/kde4/libexec/cantata-dynamic start

Playlist was populated, but Cantata was unaware of dynamic playlist in use. All 
of them could be started and Cantata did not display "[dynamic]" notify in 
status bar, although cantata-dynamic script was obviously running. Cantata 
restart helped.

Maybe Cantata should periodically (each 10 seconds or anything) look for 
~/.cache/cantata/dynamic/lock file to check if cantata-dynamic script is in use?

Should I file another bug report for this?

Original comment by mini...@gmail.com on 14 May 2012 at 11:51

@GoogleCodeExporter
Copy link
Author

If its ok, I'm going to close this bug report. Please re-open if you disagree 
with me. I'm closing because, as stated above, you can already do what you 
require manually. I've updated the help script so that it sends a dbus message 
to cantata when it is started/stopped. I've also updated the README to document 
the help scripts behaviour.

Original comment by craig.p....@gmail.com on 18 May 2012 at 5:01

  • Changed state: Fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant