[PATCH] queued files should play first
Brandon Kuczenski <[email protected]> Wed, 20 Jul 2005 23:33:21 -0400 (EDT)
| Newsgroups | gmane.comp.multimedia.xmms.devel |
|---|---|
| Message-ID | <Pine.LNX.4.62.0507202317110.20553@localhost> |
I would like to present some code for your approval. I haven't worked on this project before, so if I'm way off base, please let me know. Following after my comment on Sunday, I observed that if a playlist exists in xmms, but xmms is not currently playing, and a file is added to it with the -Q option, when xmms is subsequently started (with the play button or the -p option) the queued file is not played first, but second. Attached is a patch to remedy this. A side effect of this change is that after the queued file[s] plays, xmms stops, rather than continue with the original playlist. This is consistent with current behavior when a playlist is playing and a new file is queued. Question: is that 'current behavior' desirable? I feel that when listening to a playlist, when a file is queued, the player should continue with the existing playlist after the file completes. But I don't quite see how to get there from here. If there's any interest, I will try to work on this. Heck, I'm interested. But I would appreciate any advice. -Brandon _______________________________________________ xmms-devel mailing list [email protected] http://lists.xmms.org/mailman/listinfo/xmms-devel
playlist.patch
(text/plain, 520 B)
Index: playlist.c
===================================================================
RCS file: /cvs/xmms/xmms/playlist.c,v
retrieving revision 1.89
diff -u -b -r1.89 playlist.c
--- playlist.c 7 May 2005 01:47:35 -0000 1.89
+++ playlist.c 21 Jul 2005 03:16:42 -0000
@@ -592,7 +592,9 @@
PL_LOCK();
if (playlist)
{
- if (!playlist_position)
+ if (queued_list)
+ play_queued();
+ else if (!playlist_position)
{
if (cfg.shuffle)
playlist_position = shuffle_list->data;