;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\307\310\311\312\313\314\315\316&\210\317\310\320\321\322DD\323\324\325%\210\317\326\320\321\327DD\330\324\331%\207" [require cl-lib emms-player-simple emms-source-playlist tq emms-cache emms-url custom-declare-group emms-player-mpd nil "EMMS player for MusicPD." :group emms-player :prefix "emms-player-mpd-" custom-declare-variable funcall function #[0 "\300\301\302\303#\207" [emms-player emms-player-mpd-start emms-player-mpd-stop emms-player-mpd-playable-p] 4] "Parameters for the MusicPD player." :type (cons symbol alist) emms-player-mpd-music-directory #[0 "\300\207" [nil] 1] "The value of 'music_directory' in your MusicPD configuration file.\n\nUnless your MusicPD is configured to use absolute file names, you must\nset this variable to the value of 'music_directory' in your MusicPD\nconfig." (choice :format "%{%t%}:\n %[Value Menu%] %v" (const nil) directory)] 8) #@95 Returns a regexp of file extensions that MusicPD supports, or nil if we cannot figure it out. (defalias 'emms-player-mpd-get-supported-regexp #[0 "\300\301!\302\303\"\203M\304\225\302\305\"\306O\307\310#\311\312\"\302\313\"\205&\304\225\211\2050\314\\\315O\306\2066\316\317\310#\320\321\322\317\"!\323\321\324\325\"!\326\260\207\317\211\302\327\"\203d\330\331\316\332\333\"#\262\202\232\306\307\"\262@\203\232@\334\230\203|\310\262\202\223@\316\230\203\211\317\262\202\223\203\223\211@P\262A\262\202j\211;\205\261\211\316\230?\205\261\335\321\322\317\306!\"!\336Q\207" [shell-command-to-string "mpd --version" string-match "Decoders plugins:$" 0 "Output plugins:$" split-string "\n" t cl-mapcan #[257 "\300\301\"\205\302\303\304\"\305\306#\207" [string-match " +\\[.*\\] +\\(.+\\)$" split-string match-string 1 nil t] 5 "\n\n(fn X)"] "Protocols:$" 2 -1 "" nil "\\(\\.\\(m3u\\|pls\\|" regexp-opt delq "\\)\\'\\)\\|\\(\\`" delete "file://" "\\)" "Supported decoders:\\([^0]+?\\)Supported outputs:" replace-regexp-in-string "\\[.+?\\]" match-string 1 "Supported formats:" "\\`http://\\|\\.\\(m3u\\|pls\\|" "\\)\\'"] 15 (#$ . 1059)]) (byte-code "\302\301\303\304\305DD\306\307\310\311\312&\210\302\313\303\304\314DD\315\307\304%\210\302\316\303\304\317DD\320\307\321%\210\302\322\303\304\323DD\324\307\325%\210\302\326\303\304\327DD\330\307\331%\210\302\332\303\304\333DD\334\307\335%\210\302\336\303\304\337DD\340\307\341%\210\302\342\303\304\343DD\344\307\341%\210\345\346 #\210\345\347\350#\210\345\351\350#\210\345\352\353#\210\345\354\355#\207" [emms-player-mpd emms-player-mpd-supported-regexp custom-declare-variable funcall function #[0 "\300 \206\301\302\303\304\305\306\307\310\311\312&P\207" [emms-player-mpd-get-supported-regexp "\\`http://\\|" emms-player-simple-regexp "m3u" "ogg" "flac" "mp3" "wav" "mod" "au" "aiff"] 10] "Formats supported by MusicPD." :type regexp :set #[514 "L\210\301\302#\207" [emms-player-mpd emms-player-set regex] 6 "\n\n(fn SYM VALUE)"] emms-player-mpd-connect-function #[0 "\300\207" [open-network-stream] 1] "Function used to initiate the connection to MusicPD.\nIt should take same arguments as `open-network-stream' does." emms-player-mpd-server-name #[0 "\300\301!\206\302\207" [getenv "MPD_HOST" "localhost"] 2] "The MusicPD server that we should connect to." string emms-player-mpd-server-port #[0 "\300\301!\206\302\207" [getenv "MPD_PORT" "6600"] 2] "The port of the MusicPD server that we should connect to." (choice number string) emms-player-mpd-server-password #[0 "\300\207" [nil] 1] "The password for the MusicPD server that we should connect to." (choice (const :tag "None" nil) string) emms-player-mpd-check-interval #[0 "\300\207" [1] 1] "How often to check to see whether MusicPD has advanced to the\nnext song. This may be an integer, a floating point number, or\nnil. If set to nil, this check will not be periodically\nperformed.\n\nThis variable is used only if `emms-player-mpd-sync-playlist' is\nnon-nil." (choice (const :tag "Disable check" nil) number) emms-player-mpd-verbose #[0 "\300\207" [nil] 1] "Whether to provide notifications for server connection events\nand errors." boolean emms-player-mpd-sync-playlist #[0 "\300\207" [t] 1] "Whether to synchronize the EMMS playlist with the MusicPD playlist.\n\nIf your EMMS playlist contains music files rather than playlists,\nleave this set to non-nil.\n\nIf your EMMS playlist contains stored playlists, set this to nil." emms-player-set regex pause emms-player-mpd-pause resume seek emms-player-mpd-seek seek-to emms-player-mpd-seek-to] 8) (defvar emms-player-mpd-process nil) (defvar emms-player-mpd-queue nil) (defvar emms-player-mpd-playlist-id nil) (make-variable-buffer-local 'emms-player-mpd-playlist-id) (defvar emms-player-mpd-current-song nil) (defvar emms-player-mpd-last-state nil) (defvar emms-player-mpd-status-timer nil) #@95 Regexp that matches the valid status strings that MusicPD can return at the end of a request. (defvar emms-player-mpd-status-regexp "^\\(OK\\( MPD \\)?\\|ACK \\[\\([0-9]+\\)@[0-9]+\\] \\(.+\\)\\)\n+\\'" (#$ . 4988)) #@52 The process sentinel for MusicPD. (fn PROC EVENT) (defalias 'emms-player-mpd-sentinel #[514 "\301!\302\303\"\203\2055\304\305!\207\211\306\267\202,\307\310!\210\2055\304\311!\207\2055\304\312!\207\2055\304\313#\207" [emms-player-mpd-verbose process-status string-match "^deleted" message "MusicPD process was deleted" #s(hash-table size 5 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (exit 24 signal 24 closed 24 run 36 open 36)) emms-player-mpd-close-process t "Closed MusicPD process" "MusicPD process started successfully" "Other MusicPD status change: %s, %s"] 7 (#$ . 5210)]) #@55 Make sure that a MusicPD process is currently active. (defalias 'emms-player-mpd-ensure-process #[0 "\205\306!\205\307!\310>?\205J \203 \n\311\312 $\202)\313\314\315\316 \317\320&\321\322\"\210\323!\324\312\"\210 ;\205J\325\f\326 \327Q\312\330\331&\207" [emms-player-mpd-process emms-player-mpd-server-port emms-player-mpd-connect-function emms-player-mpd-server-name emms-player-mpd-queue emms-player-mpd-server-password processp process-status (run open) "mpd" nil make-network-process :name "emms-mpd" :service :family local set-process-sentinel emms-player-mpd-sentinel tq-create set-process-query-on-exit-flag tq-enqueue "password " "\n" ignore t emms-player-mpd-status-regexp] 7 (#$ . 5832)]) #@199 Terminate the current MusicPD client process. FROM-SENTINEL indicates whether this was called by the process sentinel, in which case certain checks should not be made. (fn &optional FROM-SENTINEL) (defalias 'emms-player-mpd-close-process #[256 "\211\204\302!\205\303!\304>\205\305 !\210\306\211\211\207" [emms-player-mpd-process emms-player-mpd-queue processp process-status (run open) tq-close nil] 4 (#$ . 6559)]) #@131 Send the given QUESTION to the MusicPD server. When a reply comes, call FN with CLOSURE and the result. (fn QUESTION CLOSURE FN) (defalias 'emms-player-mpd-send #[771 "\302 \210\303\304O\305\230\204\305P\262\306 \307&\207" [emms-player-mpd-queue emms-player-mpd-status-regexp emms-player-mpd-ensure-process -1 nil "\n" tq-enqueue t] 10 (#$ . 6993)]) #@105 Turn FILE into something that MusicPD can understand. This usually means removing a prefix. (fn FILE) (defalias 'emms-player-mpd-get-mpd-filename #[257 "\203\211\301H\302=\203\303\304\"\203\207\305\"\207" [emms-player-mpd-music-directory 0 47 string-match "\\`http://" file-relative-name] 4 (#$ . 7361)]) #@100 Turn FILE into something that EMMS can understand. This usually means adding a prefix. (fn FILE) (defalias 'emms-player-mpd-get-emms-filename #[257 "\203\211\301H\302=\204\303\304\"\203\207\305\"\207" [emms-player-mpd-music-directory 0 47 string-match "\\`http://" expand-file-name] 4 (#$ . 7685)]) #@251 Convert the given MusicPD response into a list. The car of the list is special: If an error has occurred, it will contain a cons cell whose car is an error number and whose cdr is the corresponding message. Otherwise, it will be nil. (fn RESPONSE) (defalias 'emms-player-mpd-parse-response #[257 "\211;\205^\300 \301\302\"\216\303\304\"\305\306\"\211A@\307\230\203!\211@\202$\211A@\310\241\210@;\203:\311\312@\"\203:A\262\211;\203V\311\313\"\203V\314\315\"\314\316\"BB\266\203\202[\310B\266\203)\262\207" [match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] split-string "\n" last 3 "" nil string-match "^OK\\( MPD \\)?" "^ACK \\[\\([0-9]+\\)@[0-9]+\\] \\(.+\\)" match-string 1 2] 9 (#$ . 8003)]) #@106 Turn the given LINE from MusicPD into a cons cell. The format of the cell is (name . value). (fn LINE) (defalias 'emms-player-mpd-parse-line #[257 "\300\301\"\205 \302\303\"\302\304\"\205\211\205\227\262B\266\202\207" [string-match "\\`\\([^:\n]+\\):\\s-*\\(.+\\)" match-string 1 2] 5 (#$ . 8761)]) #@67 Turn the given parsed INFO from MusicPD into an alist. (fn INFO) (defalias 'emms-player-mpd-get-alist #[257 "\211\205G\211@?\205G\211A\205G\300\211\211A\211\203C\211@\301!\211\262\203<\302@\"\211\262\2037A\241\210\202<B\262A\266\202\202\210\266\203\207" [nil emms-player-mpd-parse-line assoc] 9 (#$ . 9081)]) #@112 Turn the given parsed INFO from MusicPD into an list of alists. The list will be in reverse order. (fn INFO) (defalias 'emms-player-mpd-get-alists #[257 "\211\205P\211@?\205P\211A\205P\300\211\211A\211\203C\211@\301!\211\262\203<\302@\"\2037B\262C\262\202<B\262A\266\202\202\210\203MB\262\266\203\207" [nil emms-player-mpd-parse-line assoc] 9 (#$ . 9421)]) #@25 (fn CLOSURE RESPONSE) (defalias 'emms-player-mpd-get-tracks-1 #[514 "\300\301!!\302\203J\211\203I\211@\303\304\"A\211\203A\305!\262\306\307\"\203*\310\202+\311\312\"\313\"\210\314\315\"\210\211B\262\266\210A\266\202\202 \210@A\"\207" [emms-player-mpd-get-alists emms-player-mpd-parse-response nil assoc "file" emms-player-mpd-get-emms-filename string-match "\\`http://" url file emms-track emms-info-mpd run-hook-with-args emms-track-info-filters] 12 (#$ . 9815)]) #@168 Get the current playlist from MusicPD in the form of a list of EMMS tracks. Call CALLBACK with CLOSURE and result when the request is complete. (fn CLOSURE CALLBACK) (defalias 'emms-player-mpd-get-tracks #[514 "\300\301B\302#\207" [emms-player-mpd-send "playlistinfo" emms-player-mpd-get-tracks-1] 6 (#$ . 10315)]) #@25 (fn CLOSURE RESPONSE) (defalias 'emms-player-mpd-get-status-1 #[514 "@A\300\301!!\"\207" [emms-player-mpd-get-alist emms-player-mpd-parse-response] 7 (#$ . 10639)]) #@191 Get status information from MusicPD. It will be returned in the form of an alist by calling CALLBACK with CLOSURE as its first argument, and the status as the second. (fn CLOSURE CALLBACK) (defalias 'emms-player-mpd-get-status #[514 "\300\301B\302#\207" [emms-player-mpd-send "status" emms-player-mpd-get-status-1] 6 (#$ . 10816)]) #@239 Get ITEM from the current MusicPD status. Call CALLBACK with CLOSURE and result when the request is complete. If INFO is specified, use that instead of acquiring the necessary info from MusicPD. (fn CLOSURE CALLBACK ITEM &optional INFO) (defalias 'emms-player-mpd-get-status-part #[1027 "\211\203 \300\"A\"\207\301BB\302\"\207" [assoc emms-player-mpd-get-status #[514 "@A@AA\300\"A\"\207" [assoc] 10 "\n\n(fn CLOSURE INFO)"]] 9 (#$ . 11158)]) #@234 Get the current playlist ID from MusicPD. Call CALLBACK with CLOSURE and result when the request is complete. If INFO is specified, use that instead of acquiring the necessary info from MusicPD. (fn CLOSURE CALLBACK &optional INFO) (defalias 'emms-player-mpd-get-playlist-id #[770 "\211\203\300\262\301\302$\207" [#[514 "\207" [] 3 "\n\n(fn CLOSURE ID)"] emms-player-mpd-get-status-part "playlist"] 8 (#$ . 11625)]) #@229 Get the current volume from MusicPD. Call CALLBACK with CLOSURE and result when the request is complete. If INFO is specified, use that instead of acquiring the necessary info from MusicPD. (fn CLOSURE CALLBACK &optional INFO) (defalias 'emms-player-mpd-get-volume #[770 "\211\203\300\262\301\302$\207" [#[514 "\207" [] 3 "\n\n(fn CLOSURE VOLUME)"] emms-player-mpd-get-status-part "volume"] 8 (#$ . 12055)]) #@325 Get the current song from MusicPD. This is in the form of a number that indicates the position of the song on the current playlist. Call CALLBACK with CLOSURE and result when the request is complete. If INFO is specified, use that instead of acquiring the necessary info from MusicPD. (fn CLOSURE CALLBACK &optional INFO) (defalias 'emms-player-mpd-get-current-song #[770 "\211\203\300\262\301\302$\207" [#[514 "\207" [] 3 "\n\n(fn CLOSURE ID)"] emms-player-mpd-get-status-part "song"] 8 (#$ . 12477)]) #@281 Get the current state of the MusicPD server. This is either "play", "stop", or "pause". Call CALLBACK with CLOSURE and result when the request is complete. If INFO is specified, use that instead of acquiring the necessary info from MusicPD. (fn CLOSURE CALLBACK &optional INFO) (defalias 'emms-player-mpd-get-mpd-state #[770 "\211\203\300\262\301\302$\207" [#[514 "\207" [] 3 "\n\n(fn CLOSURE ID)"] emms-player-mpd-get-status-part "state"] 8 (#$ . 12995)]) #@304 Get the number of seconds that the current song has been playing, or nil if we cannot obtain this information. Call CALLBACK with CLOSURE and result when the request is complete. If INFO is specified, use that instead of acquiring the necessary info from MusicPD. (fn CLOSURE CALLBACK &optional INFO) (defalias 'emms-player-mpd-get-playing-time #[770 "\211\203 \300\301\302\303$\207\300B\304\303$\207" [emms-player-mpd-get-status-part nil #[514 "\211\205\300\301\"\205\302\303\304\"!\207" [string-match "\\`\\([0-9]+\\):" string-to-number match-string 1] 6 "\n\n(fn CLOSURE TIME)"] "time" #[514 "@A\205\300\301\"\205\302\303\304\"!\"\207" [string-match "\\`\\([0-9]+\\):" string-to-number match-string 1] 8 "\n\n(fn CLOSURE TIME)"]] 8 (#$ . 13467)]) #@339 Move to the given song position. The amount to move is the number difference between PREV-SONG and NEW-SONG. NEW-SONG should be a string containing a number. PREV-SONG may be either a string containing a number or nil, which indicates that we should start from the beginning of the buffer and move to NEW-SONG. (fn PREV-SONG NEW-SONG) (defalias 'emms-player-mpd-select-song #[514 "\203\n\304!\204 \305 \210 \206prq\210\306;\203, \203,\307 !\203, \202-eb\210;\203>\310!\310!Z\202A\310!\3111\201\211\312V\203T\313`!\204T\314 \210\211\312V\203d\314 \210\211S\262\202T\211\312W\203t\315 \210\211T\262\202d\316 ?\205}\317`!0\202\205\210\320P\262+\207" [emms-playlist-buffer emms-source-old-buffer inhibit-read-only emms-playlist-selected-marker buffer-live-p emms-playlist-current-clear t marker-position string-to-number (error) 0 emms-playlist-track-at emms-playlist-next emms-playlist-previous emms-playlist-selected-track-at-p emms-playlist-select "Could not move to position "] 5 (#$ . 14246)]) #@16 (fn CLOSURE) (defalias 'emms-player-mpd-sync-from-emms-1 #[257 "\300\301\"\207" [emms-player-mpd-get-playlist-id #[514 "@A\300!\205\211\"\207" [functionp] 7 "\n\n(fn CLOSURE ID)"]] 4 (#$ . 15283)]) #@246 Synchronize the MusicPD playlist with the contents of the current EMMS playlist. If CALLBACK is provided, call it with the current EMMS playlist buffer and MusicPD playlist ID when we are done, if there were no errors. (fn &optional CALLBACK) (defalias 'emms-player-mpd-sync-from-emms #[256 "\303 \210\203 \304!\204\305 \210 \206prq\210\306\307\212\310ed\"\237\262)\311pB\312#\262+\207" [emms-playlist-buffer emms-source-old-buffer inhibit-read-only emms-player-mpd-clear buffer-live-p emms-playlist-current-clear t nil emms-playlist-tracks-in-region emms-player-mpd-add-several-tracks emms-player-mpd-sync-from-emms-1] 6 (#$ . 15498)]) #@21 (fn CLOSURE INFO) (defalias 'emms-player-mpd-sync-from-mpd-2 #[514 "@A@AA\304\305\306#\307\305\306#\310!\205V\211\203&\310!\204)\311 \210 \206.prq\210\312\313\305!\210\211\203G\314\305\"\210\202Jeb\210,\315!\205V\"\207" [emms-playlist-buffer emms-source-old-buffer inhibit-read-only emms-player-mpd-playlist-id emms-player-mpd-get-playlist-id nil ignore emms-player-mpd-get-current-song buffer-live-p emms-playlist-current-clear t set-buffer-modified-p emms-player-mpd-select-song functionp] 11 (#$ . 16157)]) #@23 (fn CLOSURE TRACKS) (defalias 'emms-player-mpd-sync-from-mpd-1 #[514 "@\2054\303!\2054\211\211\203\303!\204\304 \210 \206 prq\210\305\306 \210\307\310\"\210,\311\312\"\207" [emms-playlist-buffer emms-source-old-buffer inhibit-read-only buffer-live-p emms-playlist-current-clear t emms-playlist-clear mapc emms-playlist-insert-track emms-player-mpd-get-status emms-player-mpd-sync-from-mpd-2] 6 (#$ . 16704)]) #@308 Synchronize the EMMS playlist with the contents of the current MusicPD playlist. Namely, clear the EMMS playlist buffer and add tracks to it that are present in the MusicPD playlist. If the current buffer is an EMMS playlist buffer, make it the main EMMS playlist buffer. (fn &optional CLOSURE CALLBACK) (defalias 'emms-player-mpd-sync-from-mpd #[512 "\203p =\204\304p!\210 \203\305 !\204\306 \210\n\206 pr q\210\307\310 BB\311\"+\207" [emms-playlist-buffer-p emms-playlist-buffer emms-source-old-buffer inhibit-read-only emms-playlist-set-playlist-buffer buffer-live-p emms-playlist-current-clear t emms-player-mpd-get-tracks emms-player-mpd-sync-from-mpd-1] 6 (#$ . 17139)]) #@71 Perform post-sync tasks after returning from a stop. (fn STATE INFO) (defalias 'emms-player-mpd-detect-song-change-2 #[514 "\303\304\305\230\203\f\306\307!\207" [emms-player-mpd-current-song emms-player-playing-p emms-player-paused-p nil emms-player-mpd "pause" t emms-player-mpd-detect-song-change] 4 (#$ . 17839)]) #@21 (fn CLOSURE INFO) (defalias 'emms-player-mpd-detect-song-change-1 #[514 "\303\304\305#\306\304\305#\307\304\305#\310\311\"A\211;\203$\312\313\"\210\314\315\304\305#\207\316\230\203B\2036\317\316\320 )\207 \316\230?\205\215\316\320 \207 \203S \316\230\203S\304\321\322\"\207\323\230\203[\304\207\324\230\205\215\324?\206p\n;\205p\n\230?\205\215\317\320 \210)\325\n\"\210\326\327!\210\205\215\330\331\"\207" [emms-player-stopped-p emms-player-mpd-last-state emms-player-mpd-current-song emms-player-mpd-get-current-song nil ignore emms-player-mpd-get-mpd-state emms-player-mpd-get-playing-time assoc "error" message "MusicPD error: %s" emms-player-mpd-send "clearerror" "stop" t emms-player-stopped emms-player-mpd-sync-from-mpd emms-player-mpd-detect-song-change-2 "pause" "play" emms-player-mpd-select-song emms-player-started emms-player-mpd run-hook-with-args emms-player-time-set-functions] 10 (#$ . 18169)]) #@186 Detect whether a song change has occurred. This is usually called by a timer. If INFO is specified, use that instead of acquiring the necessary info from MusicPD. (fn &optional INFO) (defalias 'emms-player-mpd-detect-song-change #[256 "\211\203 \300\301\"\207\302\301\300\"\207" [emms-player-mpd-detect-song-change-1 nil emms-player-mpd-get-status] 4 (#$ . 19125)]) #@77 Escape special characters in FILE and surround in double-quotes. (fn FILE) (defalias 'emms-player-mpd-quote-file #[257 "\300\301\300\302\301\303\304##\300Q\207" ["\"" emms-replace-regexp-in-string "\\\\\"" "\\\\" "\\\\\\\\"] 9 (#$ . 19501)]) #@29 Clear the MusicPD playlist. (defalias 'emms-player-mpd-clear #[0 "\203\n\303!\210\304\304\305\306\304\307#\210\310\311 )\207" [emms-player-mpd-status-timer emms-player-mpd-last-state emms-player-stopped-p emms-cancel-timer nil emms-player-mpd-send "clear" ignore t emms-player-stopped] 4 (#$ . 19752) nil]) #@183 Add FILE to the current MusicPD playlist. Execute CALLBACK with CLOSURE as its first argument when done. If an error occurs, display a relevant message. (fn FILE CLOSURE CALLBACK) (defalias 'emms-player-mpd-add-file #[771 "\300!\262\301\302\303!PBB\304#\207" [emms-player-mpd-get-mpd-filename emms-player-mpd-send "add " emms-player-mpd-quote-file #[514 "\300!@A@AA@\203\301\302@A#\207\303!\205\"!\207" [emms-player-mpd-parse-response message "MusicPD error: %s: %s" functionp] 10 "\n\n(fn CLOSURE RESPONSE)"]] 8 (#$ . 20072)]) #@199 Load contents of BUFFER into MusicPD by adding each line. Execute CALLBACK with CLOSURE as its first argument when done. This handles both m3u and pls type playlists. (fn BUFFER CLOSURE CALLBACK) (defalias 'emms-player-mpd-add-buffer-contents #[771 "rq\210eb\210\300 \211\205\301\302!#\262)\207" [emms-source-playlist-determine-format emms-player-mpd-add-several-files emms-source-playlist-files] 8 (#$ . 20629)]) #@203 Load contents of PLAYLIST into MusicPD by adding each line. Execute CALLBACK with CLOSURE as its first argument when done. This handles both m3u and pls type playlists. (fn PLAYLIST CLOSURE CALLBACK) (defalias 'emms-player-mpd-add-playlist #[771 "\300\301\302\"r\211q\210\303\304\"\216\305!\210\306p#*\207" [generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] emms-insert-file-contents emms-player-mpd-add-buffer-contents] 8 (#$ . 21059)]) #@153 Download contents of URL and then add its feeds into MusicPD. Execute CALLBACK with CLOSURE as its first argument when done. (fn URL CLOSURE CALLBACK) (defalias 'emms-player-mpd-add-streamlist #[771 "\300\301!\203(\302\303!\210\304\305\306\"r\211q\210\307\310\"\216\301\311!!\210\312p!\210\313p#*\207\314\315\316!!\207" [fboundp url-insert-file-contents require emms-url generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] emms-url-quote-entire emms-http-decode-buffer emms-player-mpd-add-buffer-contents error message "You need to install url.el so that Emms can retrieve this stream"] 8 (#$ . 21572)]) #@128 Add TRACK to the MusicPD playlist. Execute CALLBACK with CLOSURE as its first argument when done. (fn TRACK CLOSURE CALLBACK) (defalias 'emms-player-mpd-add #[771 "\301\302\"\301\303\"\211\304\267\202\305#\207\306#\207\211\307=\204'\310\311\"\203-\312#\207\211\313=\205?\310\"\205?\305#\207" [emms-player-mpd-supported-regexp emms-track-get name type #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (url 14 streamlist 20)) emms-player-mpd-add-file emms-player-mpd-add-streamlist playlist string-match "\\.\\(m3u\\|pls\\)\\'" emms-player-mpd-add-playlist file] 9 (#$ . 22249)]) #@130 Add TRACKS to the MusicPD playlist. Execute CALLBACK with CLOSURE as its first argument when done. (fn TRACKS CLOSURE CALLBACK) (defalias 'emms-player-mpd-add-several-tracks #[771 ":\205A\203\300@\301\302#\210A\262\202\300@#\207" [emms-player-mpd-add nil ignore] 7 (#$ . 22894)]) #@128 Add FILES to the MusicPD playlist. Execute CALLBACK with CLOSURE as its first argument when done. (fn FILES CLOSURE CALLBACK) (defalias 'emms-player-mpd-add-several-files #[771 ":\205A\203\300@\301\302#\210A\262\202\300@#\207" [emms-player-mpd-add-file nil ignore] 7 (#$ . 23196)]) #@57 Return non-nil when we can play this track. (fn TRACK) (defalias 'emms-player-mpd-playable-p #[257 "\301!\302>\205 \303\304\305\"\306!\"\205 \3071\310 \210\3110\207\210\312\207" [emms-player-mpd emms-track-type (file url playlist streamlist) string-match emms-player-get regex emms-track-name (error) emms-player-mpd-ensure-process t nil] 5 (#$ . 23499)]) #@146 Play whatever is in the current MusicPD playlist. If ID is specified, play the song at that position in the MusicPD playlist. (fn &optional ID) (defalias 'emms-player-mpd-play #[256 "\211\203\211;\204\300!\262\301\302P\303\304#\207\301\305\303\306#\207" [number-to-string emms-player-mpd-send "play " nil #[514 "\303 \203\304\305 \306#\211\207\306 \207" [emms-player-mpd-current-song emms-player-mpd-check-interval emms-player-mpd-status-timer nil run-at-time t emms-player-mpd-detect-song-change] 6 "\n\n(fn CLOSURE RESPONSE)"] "play" #[514 "\300\301!\207" [emms-player-started emms-player-mpd] 4 "\n\n(fn CLOSURE RESPONSE)"]] 5 (#$ . 23870) nil]) #@18 (fn BUFFER ID) (defalias 'emms-player-mpd-start-and-sync-2 #[514 "\305!\205P\211\203\305!\204\306 \210 \206prq\210\307\211\310\311!\210\312\212\f\2037\313\f!\2037\f\2028eb\210\3141H\315 \210\211T\262\202>\210)\316!\262,\207" [emms-playlist-buffer emms-source-old-buffer inhibit-read-only emms-player-mpd-playlist-id emms-playlist-selected-marker buffer-live-p emms-playlist-current-clear t set-buffer-modified-p nil 0 marker-position (error) emms-playlist-previous emms-player-mpd-play] 6 (#$ . 24537)]) #@19 (fn CLOSURE ID) (defalias 'emms-player-mpd-start-and-sync-1 #[514 "\203\n\304!\204 \305 \210 \206prq\210\306 +\307!\2041\211;\2031\211\230\2031\310\"\207\311\310!\207" [emms-playlist-buffer emms-source-old-buffer inhibit-read-only emms-player-mpd-playlist-id buffer-live-p emms-playlist-current-clear t buffer-modified-p emms-player-mpd-start-and-sync-2 emms-player-mpd-sync-from-emms] 6 (#$ . 25072)]) #@164 Ensure that MusicPD's playlist is up-to-date with EMMS's playlist, and then play the current track. This is called if `emms-player-mpd-sync-playlist' is non-nil. (defalias 'emms-player-mpd-start-and-sync #[0 "\203\n\301!\210\302\303\304\302\305#\207" [emms-player-mpd-status-timer emms-cancel-timer nil emms-player-mpd-send "clearerror" #[514 "\300\301\302\"\207" [emms-player-mpd-get-playlist-id nil emms-player-mpd-start-and-sync-1] 5 "\n\n(fn CLOSURE RESPONSE)"]] 4 (#$ . 25500)]) #@21 (fn CLOSURE INFO) (defalias 'emms-player-mpd-connect-1 #[514 "\305\306\305\307#\211\310\230\204\311\211\312\230\203\313\211\310\230?\205-\314!\210 \205-\315\313 \314#\211\207" [emms-player-mpd-current-song emms-player-playing-p emms-player-paused-p emms-player-mpd-check-interval emms-player-mpd-status-timer nil emms-player-mpd-get-mpd-state ignore "stop" emms-player-mpd "pause" t emms-player-mpd-detect-song-change run-at-time] 7 (#$ . 25995)]) #@334 Connect to MusicPD and retrieve its current playlist. Afterward, the status of MusicPD will be tracked. This also has the effect of changing the current EMMS playlist to be the same as the current MusicPD playlist. Thus, this function is useful to call if the contents of the EMMS playlist buffer get out-of-sync for some reason. (defalias 'emms-player-mpd-connect #[0 "\203\n\301!\210\302\303\302\304\"\207" [emms-player-mpd-status-timer emms-cancel-timer nil emms-player-mpd-sync-from-mpd emms-player-mpd-connect-1] 3 (#$ . 26464) nil]) #@45 Starts a process playing TRACK. (fn TRACK) (defalias 'emms-player-mpd-start #[257 "\203\301\302\"\303>\204\304 \207\305 \210\306\307\310#\207" [emms-player-mpd-sync-playlist emms-track-get type (streamlist playlist) emms-player-mpd-start-and-sync emms-player-mpd-clear emms-player-mpd-add nil emms-player-mpd-play] 5 (#$ . 27016) nil]) #@235 Terminate the MusicPD client process and disconnect from MusicPD. If NO-STOP is non-nil, do not indicate to EMMS that we are stopped. This argument is meant to be used when calling this from other functions. (fn &optional NO-STOP) (defalias 'emms-player-mpd-disconnect #[256 "\304!\210\305\211\305\306 \210\211?\205\307\310 )\207" [emms-player-mpd-status-timer emms-player-mpd-current-song emms-player-mpd-last-state emms-player-stopped-p emms-cancel-timer nil emms-player-mpd-close-process t emms-player-stopped] 4 (#$ . 27367) nil]) #@34 Stop the currently playing song. (defalias 'emms-player-mpd-stop #[0 "\3011\302\303\304\305#0\210\202\210\306\307!\210\307\310 )\207" [emms-player-stopped-p (error) emms-player-mpd-send "stop" nil ignore emms-player-mpd-disconnect t emms-player-stopped] 4 (#$ . 27918) nil]) #@35 Pause the currently playing song. (defalias 'emms-player-mpd-pause #[0 "\300\301\302\303#\207" [emms-player-mpd-send "pause" nil ignore] 4 (#$ . 28204) nil]) #@87 Seek backward or forward by AMOUNT seconds, depending on sign of AMOUNT. (fn AMOUNT) (defalias 'emms-player-mpd-seek #[257 "\300\301\"\207" [emms-player-mpd-get-status #[514 "\300\301\302#\303\301\302#\205#\211\205#\304\305\306\307\310\n\\!!R\301\302#\207" [emms-player-mpd-get-current-song nil ignore emms-player-mpd-get-playing-time emms-player-mpd-send "seek " " " number-to-string round] 12 "\n\n(fn AMOUNT INFO)"]] 4 (#$ . 28368) nil]) #@68 Seek to POS seconds from the start of the current track. (fn POS) (defalias 'emms-player-mpd-seek-to #[257 "\300\301\"\207" [emms-player-mpd-get-current-song #[514 "\211\205\205\300\301\302\303\304!!R\305\306#\207" [emms-player-mpd-send "seek " " " number-to-string round nil ignore] 9 "\n\n(fn POS SONG)"]] 4 (#$ . 28826) nil]) #@59 Move forward by one track in MusicPD's internal playlist. (defalias 'emms-player-mpd-next #[0 "\300\301\302\303#\207" [emms-player-mpd-send "next" nil ignore] 4 (#$ . 29171) nil]) #@60 Move backward by one track in MusicPD's internal playlist. (defalias 'emms-player-mpd-previous #[0 "\300\301\302\303#\207" [emms-player-mpd-send "previous" nil ignore] 4 (#$ . 29357) nil]) #@99 Change volume up or down by AMOUNT, depending on whether it is positive or negative. (fn AMOUNT) (defalias 'emms-volume-mpd-change #[257 "\300\301\"\207" [emms-player-mpd-get-volume #[514 "\300!\\\301\302\303!\304Q\305\306#\207" [string-to-number emms-player-mpd-send "setvol \"" number-to-string "\"" nil ignore] 7 "\n\n(fn CHANGE VOLUME)"]] 4 (#$ . 29552) "MVolume change amount (+ increase, - decrease): "]) #@25 (fn CLOSURE RESPONSE) (defalias 'emms-player-mpd-show-1 #[514 "\302\303!!@A@AA\304\305\"A\304\306\"A\307\310\300!\203<;\203<\230\203<rq\210\311\312!\205:\312\")\207\203\232\203H\262\203\232\313\211C\262\307\314\315\"\203b\316\317\320#\210\202h\316\317\321#\210\316\322#\210\323\n\"\210\324\325\"\210\326!\262\211;\203\230\211\327\230\204\230\203\225\330Q\202\226\211\262\266\211\204\251\331!?\205\320\332\333!\207\334 \"\262\331!\203\272\"\207\203\314\335!\205\320rq\210\211c)\207\332\336\"\207" [emms-lastfm-radio-stream-url emms-show-format emms-player-mpd-get-alist emms-player-mpd-parse-response assoc "name" "file" nil boundp fboundp emms-lastfm-np *track* string-match "\\`http://" emms-track-set type url file name emms-info-mpd run-hook-with-args emms-track-info-filters emms-track-description "" ": " functionp message "Nothing playing right now" format buffer-live-p "%s"] 15 (#$ . 29974)]) #@470 Describe the current EMMS track in the minibuffer. If INSERTP is non-nil, insert the description into the current buffer instead. If CALLBACK is a function, call it with the current buffer and description as arguments instead of displaying the description or inserting it. This function uses `emms-show-format' to format the current track. It differs from `emms-show' in that it asks MusicPD for the current track, rather than EMMS. (fn &optional INSERTP CALLBACK) (defalias 'emms-player-mpd-show #[512 "\300\301pBB\302#\207" [emms-player-mpd-send "currentsong" emms-player-mpd-show-1] 7 (#$ . 30951) "P"]) #@19 (fn TRACK INFO) (defalias 'emms-info-mpd-process #[514 "\211\211\205\213\211@\211@A\300\230\203\301\202u\302\230\203\303\202u\304\230\203)\305\202u\306\230\2033\307\202u\310\230\203=\311\202u\312\230\203G\313\202u\314\230\203Q\315\202u\316\230\203[\317\202u\320\230\203e\321\202u\322\230\203t\323!\262\324\202u\325\262\203\202\326#\210\266A\266\202\202\207" ["artist" info-artist "composer" info-composer "performer" info-performer "title" info-title "album" info-album "track" info-tracknumber "disc" info-discnumber "date" info-year "genre" info-genre "time" string-to-number info-playing-time nil emms-track-set] 10 (#$ . 31570)]) #@23 (fn TRACK RESPONSE) (defalias 'emms-info-mpd-1 #[514 "\300\301!!\211\205\302\"\210\303!\207" [emms-player-mpd-get-alist emms-player-mpd-parse-response emms-info-mpd-process emms-track-updated] 6 (#$ . 32259)]) #@198 Add track information to TRACK. If INFO is specified, use that instead of acquiring the necessary info from MusicPD. This is a useful addition to `emms-info-functions'. (fn TRACK &optional INFO) (defalias 'emms-info-mpd #[513 "\211\203 \302\"\207\303!\205B\304\305\306!\"?\205B\307\306!!\204-\211\205@\304 \"\205@\3101>\311\312\313!P\314#0\202@\210\315\262\207" [emms-player-mpd-music-directory emms-player-mpd-supported-regexp emms-info-mpd-process emms-track-file-p string-match "\\`http://" emms-track-name emms-player-mpd-get-mpd-filename (error) emms-player-mpd-send "find filename " emms-player-mpd-quote-file emms-info-mpd-1 nil] 7 (#$ . 32484)]) #@121 Dump TRACK-INFO into the EMMS cache. The track should be an alist as per `emms-player-mpd-get-alist'. (fn TRACK-INFO) (defalias 'emms-cache-set-from-mpd-track #[257 "\205/\301\211C\262\302\303\"A\211\205-\304!\262\305\306\307#\210\305\310#\210\311\"\210\307#\266\202\207" [emms-cache-set-function *track* assoc "file" emms-player-mpd-get-emms-filename emms-track-set type file name emms-info-mpd-process] 7 (#$ . 33165)]) #@13 (fn INFO) (defalias 'emms-cache--info-cleanup #[257 "\300\301\"\302\303\302\"B\207" [mapcar #[257 "\211;\205\301\302\303\304#)\266\203?\205\211\207" [inhibit-changing-match-data "\\`\\(Last-\\|direct\\)" nil t string-match] 8 "\n\n(fn X)"] nil delq] 6 (#$ . 33610)]) #@128 Dump all MusicPD data from DIR into the EMMS cache. This is useful to do when you have recently acquired new music. (fn DIR) (defalias 'emms-cache-set-from-mpd-directory #[257 "\211\301\230\204 \302!\262\203\303\304!\210\305\306P\307\310#\207\311\312!\207" [emms-cache-set-function "" emms-player-mpd-get-mpd-filename message "Dumping MusicPD data to cache..." emms-player-mpd-send "listallinfo " nil #[514 "\300\301!\210\302!\211@?\2059\303!\304!\305G\211\2032\211@\300\306#\210\307!\210T\262A\266\202\202\210\300\310\"\266\204\207" [message "Dumping MusicPD data to cache...processing" emms-player-mpd-parse-response emms-cache--info-cleanup emms-player-mpd-get-alists 1 "Dumping MusicPD data to cache...%d/%d" emms-cache-set-from-mpd-track "Dumping MusicPD data to cache... %d tracks processed"] 13 "\n\n(fn CLOSURE RESPONSE)"] error "Caching is not enabled"] 5 (#$ . 33897) (byte-code "\203 \301\302\"\202\303\302!C\207" [emms-player-mpd-music-directory emms-read-directory-name "Directory: " read-string] 3)]) #@136 Dump all MusicPD data into the EMMS cache. This is useful to do once, just before using emms-browser.el, in order to prime the cache. (defalias 'emms-cache-set-from-mpd-all #[0 "\300\301!\207" [emms-cache-set-from-mpd-directory ""] 2 (#$ . 34949) nil]) #@74 Cause the tracks in DIR to be updated in the MusicPD database. (fn DIR) (defalias 'emms-player-mpd-update-directory #[257 "\211\300\230\204 \301!\262\302\303\304!P\305\306#\207" ["" emms-player-mpd-get-mpd-filename emms-player-mpd-send "update " emms-player-mpd-quote-file nil #[514 "\300\301\302\303!!\"A\211\203\304\305\"\207\304\306!\207" [assoc "updating_db" emms-player-mpd-get-alist emms-player-mpd-parse-response message "Updating DB with ID %s" "Could not update the DB"] 7 "\n\n(fn CLOSURE RESPONSE)"]] 5 (#$ . 35209) (byte-code "\203 \301\302\"\202\303\302!C\207" [emms-player-mpd-music-directory emms-read-directory-name "Directory: " read-string] 3)]) #@88 Cause all tracks in the MusicPD music directory to be updated in the MusicPD database. (defalias 'emms-player-mpd-update-all #[0 "\300\301!\207" [emms-player-mpd-update-directory ""] 2 (#$ . 35893) nil]) #@53 Timer object when waiting for MPD update to finish. (defvar emms-player-mpd-waiting-for-update-timer nil (#$ . 36103)) #@174 Update all tracks in the MusicPD music directory. When update finishes, clear the EMMS cache and call `emms-cache-set-from-mpd-all' to dump the MusicPD data into the cache. (defalias 'emms-player-mpd-update-all-reset-cache #[0 "\203\301\302!\207\303\304\305\306#\207" [emms-player-mpd-waiting-for-update-timer message "Already waiting for an update to finish." emms-player-mpd-send "update" nil emms-player-mpd-wait-for-update] 4 (#$ . 36229) nil]) #@158 Wait for a currently running mpd update to finish. Afterwards, clear the EMMS cache and call `emms-cache-set-from-mpd-all'. (fn &optional CLOSURE RESPONSE) (defalias 'emms-player-mpd-wait-for-update #[512 "\211\203\"\301\302\303\304!!\"A\211\203\305\306\"\210\307\310\311\312#\211\207\305\313!\207\314\311\315\302#\207" [emms-player-mpd-waiting-for-update-timer assoc "updating_db" emms-player-mpd-get-alist emms-player-mpd-parse-response message "Updating DB with ID %s. Waiting for the update to finish..." run-at-time 1 nil emms-player-mpd-wait-for-update "Could not update the DB" emms-player-mpd-get-status-part #[514 "\211\203\n\302\303\304\305#\207\304\306\307!\210\310\303!\210\311 !\210\312 \207" [emms-player-mpd-waiting-for-update-timer emms-cache-db run-at-time 1 nil emms-player-mpd-wait-for-update message "MPD update finished." sit-for clrhash emms-cache-set-from-mpd-all] 6 "\n\n(fn CLOSURE UPDATING)"]] 7 (#$ . 36688)]) (provide 'emms-player-mpd)