diff options
author | william.xwl <william.xwl> | 2005-12-16 09:19:00 +0000 |
---|---|---|
committer | william.xwl <mwolson@gnu.org> | 2005-12-16 09:19:00 +0000 |
commit | 6f5d5aec27e89f6215b7bcccd4bbefd6d0bb9190 (patch) | |
tree | d9562e2a0fe31d65d5249600285f99d7462b76fc | |
parent | fe75d2aac6312c97b4463b7bf86e459b25228dc4 (diff) |
`emms-score-set-playing' is not really "set", but "add". Fix this. Same
for `emms-score-set-file-on-line'.
darcs-hash:20051216091938-e8fe6-cbba6bc91a39e46d1585654e51beb590efed1350.gz
-rw-r--r-- | emms-score.el | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/emms-score.el b/emms-score.el index eedec49..dca9c4d 100644 --- a/emms-score.el +++ b/emms-score.el @@ -129,14 +129,21 @@ The score hash is automatically saved." (defun emms-score-set-playing (score) "Set score for current playing track." (interactive "nSet score for playing track: ") - (if emms-player-playing-p - (emms-score-change-score score (emms-score-current-selected-track-filename)) - (error "No track currently playing"))) + (let ((filename (emms-score-current-selected-track-filename))) + (if emms-player-playing-p + (emms-score-change-score + (- score (emms-score-get-score filename)) + filename) + (error "No track currently playing")))) (defun emms-score-set-file-on-line (score) "Set score for track at point in emms-playlist buffer." (interactive "nSet score for track at point: ") - (emms-score-change-score score (emms-score-track-at-filename))) + (let ((filename (emms-score-track-at-filename))) + (if emms-player-playing-p + (emms-score-change-score + (- score (emms-score-get-score filename)) + filename)))) (defun emms-score-set-tolerance (tolerance) "Allow playing tracks with a score >= tolerance." |