Rewrite `empc-response-get-playlist' to convert some attributes to integer.
This commit is contained in:
parent
1ad38c8e2d
commit
949a4cb920
1 changed files with 4 additions and 1 deletions
5
empc.el
5
empc.el
|
|
@ -147,7 +147,10 @@ form '('error (error-code . error-message))."
|
|||
(plist-get song field))
|
||||
(setq empc-current-playlist (cons song empc-current-playlist))
|
||||
(setq song nil))
|
||||
(setq song (cons field (cons (cdr cell) song)))))
|
||||
(cond
|
||||
((member field '(:time :track :date :pos :id))
|
||||
(setq song (cons field (cons (string-to-int (cdr cell)) song))))
|
||||
(t (setq song (cons field (cons (cdr cell) song)))))))
|
||||
(setq empc-current-playlist (cons song empc-current-playlist))))
|
||||
|
||||
(defun empc-response-idle (data)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue