Subject: [PATCH] emms.el: Maintain original player list order when selecting a player

From: Morgan Smith <[email-masked]>
Date: Tue, 06 Sep 2022 14:54:15 -0400

Hello!

I'm not sure where to send emms patches so I guess I'll send them here.

I struggled for quite a while to figure out why emms was using the
second player in my config instead of the first.  This fixes that issue.

Thanks,

Morgan

>From e9f3912066945afdf3ffb8e0c8fd35a21dfe099d Mon Sep 17 00:00:00 2001
From: Morgan Smith <[email-masked]>
Date: Tue, 6 Sep 2022 14:40:33 -0400
Subject: [PATCH] emms.el: Maintain original player list order when selecting a
 player

(emms-players-for): Maintain original player list order when selecting a player

This allows users to prioritize players using the order of `emms-player-list'
as stated in various comments and documentation.
---
 emms.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/emms.el b/emms.el
index fccecb9..c22b295 100644
--- a/emms.el
+++ b/emms.el
@@ -1484,6 +1484,7 @@ If the track can be played by more than one player, call
 	 (when (funcall (emms-player-get player 'playablep) track)
 	   (push player players)))
      emms-player-list)
+    (nreverse players)
     (if (< 1 (length players))
 	(emms-players-preference track players)
       (car players))))
-- 
2.37.2