aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS8
-rw-r--r--doc/developer-release.txt16
-rw-r--r--emms.el42
3 files changed, 55 insertions, 11 deletions
diff --git a/NEWS b/NEWS
index d95798f..30b97f7 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,11 @@
+New in 7.6
+
+ * Change the way we write the NEWS file: "New in..." instead of "News since...".
+ * emms-player-mpv.el: Fix customize.
+ * Document how `emms-player-mpv-update-metadata' works.
+ * emms-player-mpd: fix caching behavior.
+
+
News since version 7.4
- emms-player-mpv.el: fix reconnect-playback-restart issue.
diff --git a/doc/developer-release.txt b/doc/developer-release.txt
index 15edf33..cd3e06d 100644
--- a/doc/developer-release.txt
+++ b/doc/developer-release.txt
@@ -4,19 +4,19 @@ distributed via Emacs ELPA (https://elpa.gnu.org/).
* Check for clean compilation.
-* Increase the version number in emms.el (variable, elpa header)
+* Increase the version number in emms.el (variable, elpa header).
-* Update NEWS
+* Update NEWS.
-* Update the manual
+* Update the manual (makeinfo --html --no-split emms.texinfo).
-* Update website (cvs commit -m "update website" index.html)
+* Update website (cvs commit -m "update website" index.html).
-* Tag release in VCS, for example `git tag -a 4.2 -m "4.2"'
+* Tag release in VCS, for example `git tag -a 4.2 -m "4.2"'.
-* Push tag to VCS, for example `git push --tags origin "4.2"'
+* Push tag to VCS, for example `git push --tags origin "4.2"'.
-* Push version updates to VCS
+* Push version updates to VCS.
* If automatic syncronization is enabled then we are done. Otherwise:
@@ -26,4 +26,4 @@ distributed via Emacs ELPA (https://elpa.gnu.org/).
- from the "elpa" branch in Savannah push to elpa.git: "git push elpa elpa:externals/emms"
-* Send announcement email to the emms mailing list
+* Send announcement email to the emms mailing list if needed.
diff --git a/emms.el b/emms.el
index ba4f97d..f3bb678 100644
--- a/emms.el
+++ b/emms.el
@@ -4,7 +4,7 @@
;; Author: Jorgen Schäfer <forcer@forcix.cx>, the Emms developers (see AUTHORS file)
;; Maintainer: Yoni Rabkin <yrk@gnu.org>
-;; Version: 7.5
+;; Version: 7.6
;; Keywords: emms, mp3, ogg, flac, music, mpeg, video, multimedia
;; Package-Type: multi
;; Package-Requires: ((cl-lib "0.5") (nadvice "0.3") (seq))
@@ -44,7 +44,7 @@
;;; Code:
-(defvar emms-version "7.5"
+(defvar emms-version "7.6"
"EMMS version string.")
@@ -314,6 +314,10 @@ being the playlist buffer.")
(defvar emms-playlist-buffer nil
"The current playlist buffer, if any.")
+(defvar emms-players-preference-f #'emms-players-default-preference-f
+ "Default function for player preference.")
+
+
;;; Macros
@@ -1454,11 +1458,43 @@ non-nil, or nil if no such player exists."
(car lis)
nil)))
+(defun emms-players-default-preference-f (track players)
+ "Default preference function.
+
+Returns the first player."
+ (ignore track)
+ (car players))
+
+(defun emms-players-preference (track players)
+ "Call `emms-players-preference-f' with TRACK and PLAYERS.
+
+The function `emms-players-preference-f' must accept an Emms
+track and a list of players. It can be assumed that all of the
+players in PLAYERS can play TRACK.
+
+The function must return one of the players from PLAYERS."
+ (funcall emms-players-preference-f track players))
+
+(defun emms-players-for (track)
+ "Return a player for TRACK.
+
+If the track can be played by more than one player, call
+`emms-players-preference' to choose a player."
+ (let (players)
+ (mapc
+ #'(lambda (player)
+ (when (funcall (emms-player-get player 'playablep) track)
+ (push player players)))
+ emms-player-list)
+ (if (< 1 (length players))
+ (emms-players-preference track players)
+ (car players))))
+
(defun emms-player-start (track)
"Start playing TRACK."
(if emms-player-playing-p
(error "A player is already playing")
- (let ((player (emms-player-for track)))
+ (let ((player (emms-players-for track)))
(if (not player)
(error "Don't know how to play track: %S" track)
;; Change default-directory so we don't accidentally block any