aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2022-03-14 20:40:31 +1100
committerYuchen Pei <hi@ypei.me>2022-03-14 20:40:31 +1100
commit8b89b43897e8ed5080b8a18b931766e09557fa63 (patch)
tree3bcd1fb56c0e4df6161c8848b410adf599fd8423
parentc532f2d1203eb4eefc71baa403bf51d176dd43ce (diff)
fixing whitespace.
-rw-r--r--emms-info-ytdl.el54
1 files changed, 27 insertions, 27 deletions
diff --git a/emms-info-ytdl.el b/emms-info-ytdl.el
index b1936c8..9136860 100644
--- a/emms-info-ytdl.el
+++ b/emms-info-ytdl.el
@@ -52,39 +52,39 @@
"Regexp not to use ytdl to get info.")
(defvar emms-info-ytdl-command
- "youtube-dl"
- "Command to run for emms-info-ytdl.")
+ "youtube-dl"
+ "Command to run for emms-info-ytdl.")
(defun emms-info-ytdl (track)
"Set TRACK info using ytdl."
(when (and (eq (emms-track-type track) 'url)
- (string-match emms-info-ytdl-regexp (emms-track-name track))
- (not
- (string-match emms-info-ytdl-exclude-regexp
- (emms-track-name track))))
+ (string-match emms-info-ytdl-regexp (emms-track-name track))
+ (not
+ (string-match emms-info-ytdl-exclude-regexp
+ (emms-track-name track))))
(with-temp-buffer
(when (zerop
- (let ((coding-system-for-read 'utf-8))
- (call-process emms-info-ytdl-command nil '(t nil) nil
- "-j" (emms-track-name track))))
- (goto-char (point-min))
- (condition-case nil
- (let ((json-fields (json-read)))
- (mapc
- (lambda (field-map)
- (let ((emms-field (car field-map))
- (ytdl-field (cdr field-map)))
- (let ((track-field (assoc ytdl-field json-fields)))
- (when track-field
- (emms-track-set
- track
- emms-field
- (if (eq emms-field 'info-playing-time)
- (truncate (cdr track-field))
- (cdr track-field)))))))
- emms-info-ytdl-field-map))
- (error (message "error while reading track info")))
- track))))
+ (let ((coding-system-for-read 'utf-8))
+ (call-process emms-info-ytdl-command nil '(t nil) nil
+ "-j" (emms-track-name track))))
+ (goto-char (point-min))
+ (condition-case nil
+ (let ((json-fields (json-read)))
+ (mapc
+ (lambda (field-map)
+ (let ((emms-field (car field-map))
+ (ytdl-field (cdr field-map)))
+ (let ((track-field (assoc ytdl-field json-fields)))
+ (when track-field
+ (emms-track-set
+ track
+ emms-field
+ (if (eq emms-field 'info-playing-time)
+ (truncate (cdr track-field))
+ (cdr track-field)))))))
+ emms-info-ytdl-field-map))
+ (error (message "error while reading track info")))
+ track))))
(provide 'emms-info-ytdl)