;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\207" [require xml emms-playlist-mode emms-librefm-scrobbler] 2) #@28 URL for the streaming host (defvar emms-librefm-stream-host-url "alpha.libre.fm" (#$ . 199)) #@38 URL for the streaming host base path (defvar emms-librefm-stream-host-base-path "" (#$ . 298)) #@23 Session ID for radio. (defvar emms-librefm-stream-session-id "" (#$ . 399)) #@30 Temporary debug information. (defvar emms-librefm-stream-debug "" (#$ . 481)) #@29 Last station name tuned to. (defvar emms-librefm-stream-station-name "" (#$ . 565)) #@31 List of tracks for streaming. (defvar emms-librefm-stream-emms-tracklist "" (#$ . 655)) #@46 Name for non-interactive Emms GNU FM buffer. (defvar emms-librefm-stream-playlist-buffer-name "*Emms GNU FM*" (#$ . 749)) #@37 Non-interactive Emms GNU FM buffer. (defvar emms-librefm-stream-playlist-buffer nil (#$ . 877)) #@33 Method of connecting to server. (defvar emms-librefm-stream-connect-method "https://" (#$ . 979)) #@141 Assert a sane HTTP response from the server. This function must be called inside the response buffer. Leaves point after the HTTP headers. (defalias 'emms-librefm-stream-assert-http #[0 "eb\210\300\301\302 \303#\204\304\305!\210\300\306d\303#?\205\304\307!\207" [re-search-forward "^.*200 OK$" point-at-eol t error "bad HTTP server response" "\n\n" "bad FM server response"] 4 (#$ . 1084)]) #@35 Create the tune handshake string. (defalias 'emms-librefm-stream-tune-handshake-string #[0 "\302 \303  \304\305!\306\307!\310\260\207" [emms-librefm-stream-connect-method emms-librefm-stream-host-url emms-librefm-scrobbler--username emms-librefm-scrobbler--password "/radio/handshake.php?version=1.3.0.58&platform=linux&username=" url-encode-url "&passwordmd5=" md5 "&language=en"] 9 (#$ . 1486)]) #@31 Make the tune handshake call. (defalias 'emms-librefm-stream-tune-handshake-call #[0 "\302\303\304 !r\211q\210\305ed\")\211\262)\207" [url-request-method emms-librefm-stream-debug "POST" url-retrieve-synchronously emms-librefm-stream-tune-handshake-string buffer-substring-no-properties] 4 (#$ . 1895)]) #@57 Handle the tune handshake server response. (fn RESBUF) (defalias 'emms-librefm-stream-handle-tune-handshake-response #[257 "\303!\204\n\304\305!\210r\211q\210\306 \210\307\211\211`\310\311d\312#\203%\313\314!\262\202)\304\315!\210\211b\210\310\316d\312#\203<\313\314!\262\202@\304\317!\210\211b\210\310\320d\312#\203S\313\314!\262\202W\304\321!\210\266\322\323!)\207" [emms-librefm-stream-session-id emms-librefm-stream-host-url emms-librefm-stream-host-base-path bufferp error "response not a buffer" emms-librefm-stream-assert-http nil re-search-forward "^session=\\(.*\\)$" t match-string-no-properties 1 "no radio session ID from server" "^base_url=\\(.*\\)$" "no base url from server" "^base_path=\\(.*\\)$" "no base path from server" message "radio handshake successful"] 9 (#$ . 2208)]) #@37 Make and handle the tune handshake. (defalias 'emms-librefm-stream-tune-handshake #[0 "\300\301 !\207" [emms-librefm-stream-handle-tune-handshake-response emms-librefm-stream-tune-handshake-call] 2 (#$ . 3027)]) #@50 Create the tune string. (fn SESSION-ID STATION) (defalias 'emms-librefm-stream-tune-string #[514 "\204\303\304!\210\211\204\303\305!\210 \n\306\307\310!\260\207" [emms-librefm-stream-connect-method emms-librefm-stream-host-url emms-librefm-stream-host-base-path error "null session id" "null station" "/adjust.php?session=" "&url=" url-encode-url] 10 (#$ . 3245)]) #@46 Make the tune call. (fn SESSION-ID STATION) (defalias 'emms-librefm-stream-tune-call #[514 "\302\303\304\"!r\211q\210\305ed\")\211\262)\207" [url-request-method emms-librefm-stream-debug "POST" url-retrieve-synchronously emms-librefm-stream-tune-string buffer-substring-no-properties] 6 (#$ . 3627)]) #@47 Handle the tune server response. (fn RESBUF) (defalias 'emms-librefm-stream-handle-tune-response #[257 "\301!\204\n\302\303!\210r\211q\210\304 \210\305\211`\306\307d\310#\203$\311\312!\262\202(\302\313!\210\314\230\2042\302\315!\210\211b\210\306\316d\310#\203E\311\312!\262\202I\302\317!\210\320\321\"\266\203)\207" [emms-librefm-stream-station-name bufferp error "response not a buffer" emms-librefm-stream-assert-http nil re-search-forward "^response=\\(.*\\)$" t match-string-no-properties 1 "no response status code" "OK" "tune response not OK" "^stationname=\\(.*\\)$" "no stationname from server" message "successfully tuned to: %s"] 8 (#$ . 3940)]) #@42 Make and handle tune call. (fn STATION) (defalias 'emms-librefm-stream-tune #[257 "\301\302\"!\207" [emms-librefm-stream-session-id emms-librefm-stream-handle-tune-response emms-librefm-stream-tune-call] 5 (#$ . 4616)]) #@55 Create the getplaylist string. (fn RADIO-SESSION-ID) (defalias 'emms-librefm-stream-getplaylist-string #[257 "\211\204\303\304!\210 \n\305\306\260\207" [emms-librefm-stream-connect-method emms-librefm-stream-host-url emms-librefm-stream-host-base-path error "null radio session id" "/xspf.php?sk=" "&discovery=0&desktop=1.3.0.58"] 7 (#$ . 4845)]) #@45 Make the getplaylist call. (fn SESSION-ID) (defalias 'emms-librefm-stream-getplaylist-call #[257 "\302\303\304!!r\211q\210\305ed\")\211\262)\207" [url-request-method emms-librefm-stream-debug "POST" url-retrieve-synchronously emms-librefm-stream-getplaylist-string buffer-substring-no-properties] 5 (#$ . 5204)]) #@54 Handle the getplaylist server response. (fn RESBUF) (defalias 'emms-librefm-stream-handle-getplaylist-response #[257 "\300!\204\n\301\302!\210r\211q\210\303 \210\304`d\")\207" [bufferp error "response not a buffer" emms-librefm-stream-assert-http xml-parse-region] 4 (#$ . 5528)]) #@36 Make and handle radio.getPlaylist. (defalias 'emms-librefm-stream-getplaylist #[0 "\301\302!!\207" [emms-librefm-stream-session-id emms-librefm-stream-handle-getplaylist-response emms-librefm-stream-getplaylist-call] 3 (#$ . 5818)]) #@65 Return the tracklist portion of PLAYLIST or nil. (fn TAG DATA) (defalias 'emms-librefm-stream-xspf-find #[514 "\300!\301\203%\211\204%@\211<\203\211@=\203\211\262\210A\262\202\207" [copy-tree nil] 7 (#$ . 6058)]) #@65 Return the tracklist portion of PLAYLIST or nil. (fn PLAYLIST) (defalias 'emms-librefm-stream-xspf-tracklist #[257 "\300\301@\"\207" [emms-librefm-stream-xspf-find trackList] 4 (#$ . 6293)]) #@63 Return the data associated with TAG in TRACK. (fn TAG TRACK) (defalias 'emms-librefm-stream-xspf-get #[514 "\300\301\"8\207" [2 emms-librefm-stream-xspf-find] 6 (#$ . 6492)]) #@45 Convert TRACK to an Emms track. (fn TRACK) (defalias 'emms-librefm-stream-xspf-convert-track #[257 "\300\301\"\300\302\"\300\303\"\300\304\"\300\305\"\306\211C\262\307\310#\210\307\311#\210\307\312#\210\307\313#\210\307\314\315!\316\245#\210\307\317\320#\210\207" [emms-librefm-stream-xspf-get location title album creator duration *track* emms-track-set name info-artist info-title info-album info-playing-time string-to-number 1000 type url] 12 (#$ . 6676)]) #@61 Convert TRACKLIST to a list of Emms tracks. (fn TRACKLIST) (defalias 'emms-librefm-stream-xspf-convert-tracklist #[257 "\300C\301\302\303\"\"\210\211\242\207" [nil mapc make-closure #[257 "\211<\205\211@\301=\205\300\302\300\242\303!C\"\240\207" [V0 track append emms-librefm-stream-xspf-convert-track] 6 "\n\n(fn E)"]] 6 (#$ . 7165)]) #@61 Setup the GNU FM buffer and make it `emms-playlist-buffer'. (defalias 'emms-librefm-stream-set-librefm-playlist-buffer #[0 "\303!\204\n\304 !\211\207" [emms-librefm-stream-playlist-buffer emms-librefm-stream-playlist-buffer-name emms-playlist-buffer buffer-live-p emms-playlist-new] 2 (#$ . 7515)]) #@25 Queue streaming tracks. (defalias 'emms-librefm-stream-queue #[0 "\304\305 !\211\204\306\307\310!\210\311!\312 \210 \203\313 !\204\"\314 \210\n\206'pr q\210\315db\210\212\316\317\",\207" [emms-librefm-stream-emms-tracklist emms-playlist-buffer emms-source-old-buffer inhibit-read-only emms-librefm-stream-xspf-tracklist emms-librefm-stream-getplaylist nil error "could not find tracklist" emms-librefm-stream-xspf-convert-tracklist emms-librefm-stream-set-librefm-playlist-buffer buffer-live-p emms-playlist-current-clear t mapc #[257 "\300!\207" [emms-playlist-insert-track] 3 "\n\n(fn TRACK)"]] 4 (#$ . 7825)]) #@39 Queue more streaming music if needed. (defalias 'emms-librefm-stream-queue-loader #[0 "\203\n\305!\204 \306 \210 \206prq\210\307 \203#\310 !\202$eb\210p\f=\2057\311\312 \313\"?\2057\314 +\207" [emms-playlist-buffer emms-source-old-buffer inhibit-read-only emms-playlist-mode-selected-overlay emms-librefm-stream-playlist-buffer buffer-live-p emms-playlist-current-clear t overlay-start next-single-property-change point-at-eol emms-track emms-librefm-stream-queue] 3 (#$ . 8457)]) #@52 Stream STATION from a GNU FM server. (fn STATION) (defalias 'emms-librefm-stream #[257 "\211;\204 \304\305!\210\306\307\310\"\210\311 \210\312!\210\313\314\"\210\315 \210 \203'\316 !\204*\317 \210\n\206/pr q\210\320\321 +\207" [emms-librefm-stream-station-name emms-playlist-buffer emms-source-old-buffer inhibit-read-only error "bad argument" add-hook emms-player-finished-hook emms-librefm-stream-queue-loader emms-librefm-stream-tune-handshake emms-librefm-stream-tune message "tuned to %s, getting playlist..." emms-librefm-stream-queue buffer-live-p emms-playlist-current-clear t emms-playlist-mode-play-current-track] 4 (#$ . 8957) "sEnter station URL: "]) (provide 'emms-librefm-stream)