X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=media.el;h=b83bbef032f2f8348c6da1819faded6aa975b426;hb=68437333c6fb4ed63860f22e12fccc9cc37e7c28;hp=c94491c16695df37998fc77ca156b82437fe7459;hpb=3771096a125c7cff7216ca61ce51b2cda5a7aca1;p=elisp.git diff --git a/media.el b/media.el index c94491c..b83bbef 100644 --- a/media.el +++ b/media.el @@ -1,4 +1,4 @@ -;; -*-Emacs-Lisp-*- +;; -*- mode: emacs-lisp -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This program is free software; you can redistribute it and/or ;; @@ -79,17 +79,17 @@ title to display in the list (convenient for internet radios)." :group 'media) (defcustom media/playlist-at-top nil - "Should the playlists be created at the top of the media buffer ?" + "Should the playlists be created at the top of the media buffer?" :type 'bool :group 'media) (defcustom media/add-current-song-to-interrupted-when-killing nil - "Should we save the current song with time in the Interrupted playlist ?" + "Should we save the current song with time in the Interrupted playlist?" :type 'bool :group 'media) (defcustom media/do-not-remove-nonexisting-entries nil - "Should we remove the entries corresponding to a non-existing file when saving the playlists ?" + "Should we remove the entries corresponding to a non-existing file when saving the playlists?" :type 'bool :group 'media) @@ -99,12 +99,12 @@ title to display in the list (convenient for internet radios)." :group 'media) (defcustom media/continue-mode nil - "Should the player start the next song in the buffer when the current terminates ?" + "Should the player start the next song in the buffer when the current terminates?" :type 'boolean :group 'media) (defcustom media/expert nil - "Should the keymap help be shown ?" + "Should the keymap help be shown?" :type 'boolean :group 'media) @@ -254,6 +254,7 @@ and the bitrate. Should be nil if no information is available.") (time (get-text-property position 'time))) (if (not url) (media/remove-highlight) (run-hook-with-args 'media/before-play-hook url) + (setq media/current-information nil) (media/api/play url) ;; We keep the information of the url and the title (setq media/played-information (cons url (get-text-property position 'title))) @@ -804,8 +805,7 @@ returns nil if no id3 tags could be found." " " (or title (media/format-url url)) (if time (propertize - (concat " ->" (media/duration-to-string time)) - ;; (concat " [@ " (media/duration-to-string time) "]") + (concat " @" (media/duration-to-string time)) 'face 'media/timestamp-face )) "\n" @@ -944,7 +944,7 @@ which stops when the songs ends." (unless (condition-case nil (media/save-playlists) - (error (not (y-or-n-p "Can not save the playlists. Still kill the media buffer ? ")))) + (error (not (y-or-n-p "Can not save the playlists. Still kill the media buffer? ")))) (kill-buffer media/buffer)) )