;ELC ;;; Compiled by heimdall@baldur on Fri Feb 1 18:34:51 2008 ;;; from file /home/heimdall/repos/emms/emms-last-played.el ;;; in Emacs version 23.0.60.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`emms-last-played.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'emms) #@136 Specifies if EMMS should record the number of times you play a track. Set it to t if you want such a feature, and to nil if you don't. (defvar emms-last-played-keep-count t (#$ . 612)) #@894 Specifies date format depending on when a track was last played. This is an alist of items (AGE . FORMAT). AGE can be a number (of seconds) or a Lisp expression evaluating to a number. When the age of the track is less than this number, then use `format-time-string' with the corresponding FORMAT for displaying the date of the track. If AGE is not a number or a Lisp expression evaluating to a non-number, then the corresponding FORMAT is used as a default value. Note that the list is processed from the beginning, so it should be sorted by ascending AGE. Also note that items following the first non-number AGE will be ignored. You can use the functions `emms-last-played-seconds-today', `emms-last-played-seconds-month' and `emms-last-played-seconds-year' in the AGE spec. They return the number of seconds passed since the start of today, of this month, of this year, respectively. (defvar emms-last-played-format-alist '(((emms-last-played-seconds-today) . "%k:%M") (604800 . "%a %k:%M") ((emms-last-played-seconds-month) . "%a %d") ((emms-last-played-seconds-year) . "%b %d") (t . "%b %d '%y")) (#$ . 804)) #@40 Updates the last-played time of TRACK. (defalias 'emms-last-played-update-track #[(track) "\301\302\303 #\207" [track emms-track-set last-played current-time] 4 (#$ . 1930)]) #@79 Increments the play-count property of TRACK. If non-existent, it is set to 1. (defalias 'emms-last-played-increment-count #[(track) "\302\301\"\211\203\303\301 T#\202\303\301\304#)\207" [track play-count emms-track-get emms-track-set 1] 5 (#$ . 2112)]) #@28 Updates the current track. (defalias 'emms-last-played-update-current #[nil "\301\302 !\210\205 \303\302 !\207" [emms-last-played-keep-count emms-last-played-update-track emms-playlist-current-selected-track emms-last-played-increment-count] 2 (#$ . 2379)]) #@44 Return the number of seconds passed today. (defalias 'emms-last-played-seconds-today #[nil "\301\302 !\211@A@\303_\\AA@\304_\\)\207" [now decode-time current-time 60 3600] 4 (#$ . 2645)]) #@49 Return the number of seconds passed this month. (defalias 'emms-last-played-seconds-month #[nil "\301\302 !\211@A@\303_\\AA@\304_\\\305\233@S\306_\\)\207" [now decode-time current-time 60 3600 3 86400] 4 (#$ . 2842)]) #@48 Return the number of seconds passed this year. (defalias 'emms-last-played-seconds-year #[nil "\302\303 !\304\305\303 \"\211@ A@\306_\\ AA@\307_\\\310!S\311_\\*\207" [days now decode-time current-time format-time-string "%j" 60 3600 string-to-number 86400] 5 (#$ . 3070)]) #@197 Format the messy-date according to emms-last-played-format-alist. Returns " ? " if there's bad input or if an other error occurs. Input should look like this: "Sun, 14 Oct 2001 13:34:39 +0200". (defalias 'emms-last-played-format-date #[(messy-date) "\300\301\302\217\207" [nil (byte-code "\306!\306\307 !\310 Z\f\311 \211\f@@)!\211 \247\203( W\202+ ?\203@ A\311 \211\f@@)!\211 \202 @A;\203K @A+\312\311\n!\313!\"+\207" [messy-date now my-format difference emms-last-played-format-alist templist time-to-seconds current-time "%b %d '%y" eval format-time-string seconds-to-time x top] 5) ((error "Never."))] 3 (#$ . 3353)]) (provide 'emms-last-played)