diff options
author | Ye Wenbin <wenbinye@gmail.com> | 2006-12-07 06:35:00 +0000 |
---|---|---|
committer | Ye Wenbin <wenbinye@gmail.com> | 2006-12-07 06:35:00 +0000 |
commit | ea35b0637aff4d1f61dac2d25b6556a4d939e6b4 (patch) | |
tree | 6fb4ef53684159f72de480d88a2950673b199794 /emms-score.el | |
parent | d87cd1c3112c9e916fc71fd41721726709cae7c0 (diff) |
emms-i18n changes, add playlist navigate command, uniq playlist command
darcs-hash:20061207063510-94065-7726a0fc26d04c70038d5576a0a1451e7e71e368.gz
Diffstat (limited to 'emms-score.el')
-rw-r--r-- | emms-score.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/emms-score.el b/emms-score.el index f9e520e..e8d066f 100644 --- a/emms-score.el +++ b/emms-score.el @@ -242,12 +242,15 @@ See also `emms-next-noerror'." (defun emms-score-load-hash () "Load score hash from `emms-score-file'." (interactive) - (mapc (lambda (elt) - (puthash (car elt) (cdr elt) emms-score-hash)) - (read - (with-temp-buffer - (insert-file-contents emms-score-file) - (buffer-string))))) + (if (file-exists-p emms-score-file) + (mapc (lambda (elt) + (puthash (car elt) (cdr elt) emms-score-hash)) + (read + (with-temp-buffer + (insert-file-contents emms-score-file) + (buffer-string)))) + ;; when file not exists, make empty but valid score file + (emms-score-save-hash))) (defun emms-score-get-plist (filename) (gethash filename emms-score-hash)) |