bongo-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bongo-patches] Implement `bongo-set-backend-for-track' and remove corre


From: Daniel Brockman
Subject: [bongo-patches] Implement `bongo-set-backend-for-track' and remove corresponding TODO item
Date: Sun, 18 Mar 2007 20:31:41 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

2007-03-18  Daniel Jensen  <address@hidden>

        Implement `bongo-set-backend-for-track' and remove corresponding
        TODO item.

diff -rN -u old-bongo/bongo.el new-bongo/bongo.el
--- old-bongo/bongo.el  2007-03-18 20:31:25.000000000 +0100
+++ new-bongo/bongo.el  2007-03-18 20:31:25.000000000 +0100
@@ -61,9 +61,6 @@
 
 ;; Better error messages when players fail.
 
-;; The user should have a way to say ``play this track using
-;; that backend.''
-
 ;; Generalize intra-playlist queue.
 
 ;; Implement intra-track region repeat.
@@ -3005,7 +3002,7 @@
   (list 'bongo-file-name 'bongo-action 'bongo-infoset
         'bongo-fields 'bongo-external-fields
         'bongo-header 'bongo-collapsed 'bongo-marked
-        'bongo-player 'bongo-played)
+        'bongo-player 'bongo-backend 'bongo-played)
   "List of semantic text properties used in Bongo buffers.
 When redisplaying lines, semantic text properties are preserved,
 whereas all other text properties (e.g., `face') are discarded.")
@@ -3831,6 +3828,17 @@
   'bongo-best-backend-for-file
   'bongo-backend-for-file)
 
+(defun bongo-set-backend-for-track (backend &optional point)
+  "Change to using BACKEND for the track at POINT."
+  (interactive
+   (list (intern (completing-read "Backend: "
+                                  (mapcar (lambda (x) (list (symbol-name x)))
+                                          bongo-enabled-backends)
+                                  nil t))))
+  (save-excursion
+    (bongo-goto-point point)
+    (bongo-line-set-property 'bongo-backend backend)))
+
 
 ;;;; Last.fm
 
@@ -5713,7 +5721,9 @@
     (bongo-set-current-track-position)
     (let ((player (if (bongo-action-track-line-p)
                       (bongo-start-action-player (bongo-line-action))
-                    (bongo-play-file (bongo-line-file-name)))))
+                    (bongo-play-file
+                     (bongo-line-file-name)
+                     (bongo-line-get-property 'bongo-backend)))))
       (bongo-player-put player 'infoset (bongo-line-infoset))
       (setq bongo-player player)
       (bongo-line-set-property 'bongo-player player)
-- 
Daniel Brockman <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]