quodlibet / quodlibet

Music player and music library manager for Linux, Windows, and macOS
https://quodlibet.readthedocs.io
GNU General Public License v2.0
1.43k stars 223 forks source link

Enable playing a playlist from the command line #1303

Open lazka opened 9 years ago

lazka commented 9 years ago

Original issue 1303 created by johnalexbensin on 2013-12-08T15:11:06.000Z:

As asked in this post:

https://groups.google.com/forum/#!topic/quod-libet-development/NTUZw-oBn00

it would be nice to be able to play a playlist from the command line. Syntax like that suggested by Nick here:

https://code.google.com/p/quodlibet/issues/detail?id=1302

would be appropriate.

lazka commented 9 years ago

Comment #1 originally posted by spxxxk on 2013-12-08T15:43:23.000Z:

Even simpler workaround (assuming the name of your playlist doesn't have spaces), $ cat ~/.quodlibet/playlists/myplaylist | sed 's/(.*)/enqueue \1/' >> ~/.quodlibet/control

lazka commented 9 years ago

Comment #2 originally posted by nick.boultbee on 2013-12-11T19:15:17.000Z:

The two ways I had in mind for fixing this are:

  1. A(nother) new command e.g. --play-playlist
  2. Magic detection of playlists (whatever that implies) into some existing commands, notably --play-file and --enqueue

My preference is (2) if done well, but there are some edge cases...

lazka commented 9 years ago

Comment #3 originally posted by spxxxk on 2013-12-12T13:46:03.000Z:

Isn't this $ quodlibet --enqueue "~playlists=myPlaylist" what op's looking for btw ?

Works for me.

lazka commented 9 years ago

Comment #4 originally posted by johnalexbensin on 2013-12-12T14:14:27.000Z:

I'll try that when I get back home. Does this overwrite the current queue? If I'm playing another playlist or other tracks, will they still be in the queue? (I would prefer them not to be, because ideally I want to just play that playlist).

lazka commented 9 years ago

Comment #5 originally posted by spxxxk on 2013-12-12T14:33:49.000Z:

The choice is yours : quodlibet --unqueue "" && quodlibet --enqueue "~playlists=MyPlaylist" && quodlibet --next

lazka commented 9 years ago

Comment #6 originally posted by nick.boultbee on 2015-02-21T11:56:59.000Z:

Issue #1548 has been merged into this issue.

ruuter commented 9 years ago

$ quodlibet --enqueue "~playlists=myPlaylist" Works fine, but it does not keep the sorting order of the playlist. Can not figure out by what is this method sorting the queued tracks.

declension commented 9 years ago

It's filtering the entire library in "native" order by inclusion on that playlist. Works, but not really ideal (hence this feature request)