emms-patches
[Top][All Lists]
Advanced

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

[Emms-patches] darcs patch: emms-playing-time.el: New variable `emms-pla


From: William Xu
Subject: [Emms-patches] darcs patch: emms-playing-time.el: New variable `emms-playing-time-...
Date: Tue, 14 Nov 2006 13:00:35 +0800

Sun Nov 12 20:33:08 CST 2006  address@hidden
  * emms-playing-time.el: New variable `emms-playing-time-style', it
  supports two styles at present, `time' and `bar'.
New patches:

[emms-playing-time.el: New variable `emms-playing-time-style', it
address@hidden
 supports two styles at present, `time' and `bar'.
] {
hunk ./emms-playing-time.el 47
-  "If non-nil, only display elapsed time, don't display total
-playing time. e.g., display 02:37 instead of 02:37/05:49. You
-should enable `emms-playing-time-display-p' first, though."
+  "Non-nil will only display elapsed time.
+e.g., display 02:37 instead of 02:37/05:49."
hunk ./emms-playing-time.el 57
+(defcustom emms-playing-time-style 'time
+  "Style used for displaying playing time.
+Valid styles are `time' (e.g., 01:30/4:20) and `bar' (e.g., [===>  ])."
+  :type 'symbol
+  :group 'emms-playing-time)
+
hunk ./emms-playing-time.el 170
+    (case emms-playing-time-style
+      ((bar)
+       (if (zerop total-playing-time)
+           (setq emms-playing-time-string "[==>........]")
+         (let ((progress "[")
+               ;; percent based on 10
+               (percent (/ (* emms-playing-time 10) total-playing-time)))
+           (dotimes (i percent)
+             (setq progress (concat progress "=")))
+           (setq progress (concat progress ">"))
+           (dotimes (i (- 10 percent))
+             (setq progress (concat progress " ")))
+           (setq progress (concat progress "]"))
+           (setq emms-playing-time-string progress))))
+      (t
+       (setq emms-playing-time-string
+             (emms-replace-regexp-in-string
+              " " "0"
+              (if (or emms-playing-time-display-short-p
+                      ;; unable to get total playing-time
+                      (eq total-playing-time 0))
+                  (format "%2d:%2d" min sec)
+                (format "%2d:%2d/%2s:%2s"
+                        min sec total-min-only total-sec-only))))))
hunk ./emms-playing-time.el 195
-         (format
-          emms-playing-time-display-format
-          (emms-replace-regexp-in-string
-           " " "0"
-           (if (or emms-playing-time-display-short-p
-                   ;; unable to get total playing-time
-                   (eq total-playing-time 0))
-               (format "%2d:%2d" min sec)
-             (format "%2d:%2d/%2s:%2s"
-                     min sec total-min-only total-sec-only)))))
+          (format emms-playing-time-display-format
+                  emms-playing-time-string))
}

Context:

[emms-player-mpd: Deal with change in output when getting supported file types
Michael Olson <address@hidden>**20061028042119] 
[emms.el: Move macros to the top of the file.
address@hidden 
[NEWS: Add entry for recent emms-player-mpd change
Michael Olson <address@hidden>**20061023125738] 
[emms-player-mpd: Handle errors that occur when we begin playback
Michael Olson <address@hidden>**20061022215310] 
[NEWS: Version 2 is version 2.0
address@hidden 
[emms-playlist-mode: Handle case where selection has not been set but user 
wants to delete a region
Michael Olson <address@hidden>**20061022201724] 
[emms-playlist-mode: Fix typo in hook name
Michael Olson <address@hidden>**20061022022812] 
[emms-player-mpd: Update version recommendation
Michael Olson <address@hidden>**20061022012223] 
[emms-player-mpd: Work properly with tracks inserted by emms-browser
Michael Olson <address@hidden>**20061022011050] 
[Add NEWS items since version 2.1
Michael Olson <address@hidden>**20061017222117] 
[emms-player-mpd: When using the emms-volume interface, allow the user to 
specify the amount of change in the volume
Michael Olson <address@hidden>**20061017220404] 
[Documentation cleanups in emms-player-mpd and emms-source-playlist
Michael Olson <address@hidden>**20061017215345] 
[Since emms-player-seeked-to-functions and emms-player-time-set-functions hooks 
do the same thing, replace the former with the latter
Michael Olson <address@hidden>**20061017210238] 
[emms-browser: Fix compiler warning
Michael Olson <address@hidden>**20061017205310] 
[emms-player-mpd: Implement seek-to support
Michael Olson <address@hidden>**20061017205106] 
[FluidSynth midi file player
address@hidden 
[Added delYsid
address@hidden 
[jackd-support-for-emacs
address@hidden
 jackd is a pro-audio server which can be used as a backend for
 alsaplayer, mplayer, and lots of other linux audio apps.
 This module allows to start jackd from within emacs, and
 connect/disconnect jack client ports.
] 
[browser: ensure the RNG is seeded before use
Damien Elmes <address@hidden>**20061011151535] 
[browser: require sort (fixes bug with sort-fold-case being void)
Damien Elmes <address@hidden>**20061010125718] 
[emms-player-mplayer.el: Mplayer also supports .vob files.
address@hidden 
[fix faulty emms-playlist-mode keybinding, fix due to William and Damien.
address@hidden 
[Added seeking to the playlist keymap, and updated the manual.
address@hidden 
[emms-player-mpd: Only display error if we are certain that url.el is not 
up-to-date
Michael Olson <address@hidden>**20061004032213] 
[seek-for-alsaplayer
address@hidden
 Add relative seek support for alsaplayer
] 
[midi-files-via-timidity
address@hidden
 A simple-player definition for timidity
] 
[pause-for-alsaplayer
address@hidden
 Get pause/resume working for alsaplayer
] 
[mms-for-mplayer
address@hidden
 mplayer also supports mms:// URLs
] 
[emms-playing-time.el: Minor cleanups.
address@hidden 
[emms-lyrics.el: Minor Cleanups.
address@hidden 
[DoTheRightThing with player pausing and emms-bookmarks.el
address@hidden 
[Added emms-bookmarks.el
address@hidden 
[Added `emms-pause' to emms-playlist-mode.el bound to to ``P''.
address@hidden 
[browser: add deletion started/finished message
Damien Elmes <address@hidden>**20060923051128] 
[Added a link to the online version of the manual.
address@hidden 
[emms-playing-time.el now works with `seek-to'.
address@hidden 
[Added `seek-to' to emms.el and emms-player-mplayer.el.
address@hidden 
[browser/cache: support deleting files, make emms-cache-dirty a defsubst
Damien Elmes <address@hidden>**20060922090553] 
[TAG 2.1
address@hidden 
Patch bundle hash:
36fada9a1bc4193c565cce0a33e4b40c4f477432

reply via email to

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