From 998245fb2e6f025dc4307ff9ebb6f4a195ee17e1 Mon Sep 17 00:00:00 2001 From: lucas Date: Sun, 18 Sep 2005 12:30:00 +0000 Subject: Renaming the "playlist" source to "streamlist". Things might be broken. darcs-hash:20050918123045-4f952-54c6f999429e0e9204c4407f29dc13c5729fa023.gz --- emms-source-file.el | 5 ++--- emms-stream-info.el | 50 +++++++++++++++++++++++++------------------------- emms-streams.el | 46 +++++++++++++++++++++++----------------------- 3 files changed, 50 insertions(+), 51 deletions(-) diff --git a/emms-source-file.el b/emms-source-file.el index f4599f7..1329c71 100644 --- a/emms-source-file.el +++ b/emms-source-file.el @@ -269,11 +269,10 @@ files) can play." (interactive "sPlay URL: ") (emms-playlist-insert-track (emms-track 'url url))) -;; FIXME-PLS -(define-emms-source playlist (playlist) +(define-emms-source streamlist (streamlist) "An EMMS source for streaming playlists (usually URLs ending in .pls." (interactive "sPlay URL: ") - (emms-playlist-insert-track (emms-track 'playlist playlist))) + (emms-playlist-insert-track (emms-track 'streamlist streamlist))) (provide 'emms-source-file) diff --git a/emms-stream-info.el b/emms-stream-info.el index 46fafc0..e4b7439 100644 --- a/emms-stream-info.el +++ b/emms-stream-info.el @@ -114,9 +114,9 @@ (concat emms-stream-info-char-alter-regexp "+") "Regular expression for metainformation headers.") -(defconst emms-stream-info-playlist-regexp +(defconst emms-stream-info-streamlist-regexp "\\(^http://.*\\)\\|^File.=\\(http://.*\\)" - "Regular expression for playlist URLs.") + "Regular expression for streamlist URLs.") ;; When t output debugging info (defconst emms-stream-info-debugging nil @@ -158,10 +158,10 @@ and songtitle information. This string specifies an alternate format for those stations.") (defconst emms-stream-info-pls-regexp ".*\.pls" - "Regular expression for a .pls playlist file.") + "Regular expression for a .pls streamlist file.") (defconst emms-stream-info-m3u-regexp ".*\.m3u" - "Regular expression for a .m3u playlist file.") + "Regular expression for a .m3u streamlist file.") (defvar emms-stream-info-url nil "Server URL.") @@ -172,8 +172,8 @@ format for those stations.") (defvar emms-stream-info-found nil "Results of our search.") -(defvar emms-stream-info-playlist-found nil - "Results of our playlist search.") +(defvar emms-stream-info-streamlist-found nil + "Results of our streamlist search.") (defvar emms-stream-info-procname "emms-stream-info-process" "Name of network connection process.") @@ -198,8 +198,8 @@ functions use 'emms-stream-info-return-hook'.") (defvar emms-stream-info-title-flag nil "Non-nil means title information has been captured.") -(defvar emms-stream-info-playlist-flag nil - "Non-nil means playlist information has been captured.") +(defvar emms-stream-info-streamlist-flag nil + "Non-nil means streamlist information has been captured.") (defvar emms-stream-info-request-string nil "String sent to streaming audio server.") @@ -270,7 +270,7 @@ trye at index 2 means continue to next connection.") (defun emms-stream-info-continue-p () (aref emms-stream-info-state-bv 2)) -(defun emms-stream-info-playlist-type (str) +(defun emms-stream-info-streamlist-type (str) (if (stringp str) (cond ((string-match emms-stream-info-pls-regexp str) 'pls) @@ -335,12 +335,12 @@ not output a message and only return a string." (defun emms-stream-info-continue () (emms-stream-info-unset-continue) - (if emms-stream-info-playlist-found - (emms-stream-info-get emms-stream-info-playlist-found + (if emms-stream-info-streamlist-found + (emms-stream-info-get emms-stream-info-streamlist-found (emms-stream-info-message-p) (emms-stream-info-insert-p) nil) - (error "No playlist found at URL"))) + (error "No streamlist found at URL"))) ;; Useful (defun list-to-string (l) @@ -480,16 +480,16 @@ Argument STR Quanta of data." ;; Too many nested conditions (if (emms-stream-info-set-continue) - (unless emms-stream-info-playlist-flag + (unless emms-stream-info-streamlist-flag (goto-char (point-min)) (if (re-search-forward - emms-stream-info-playlist-regexp + emms-stream-info-streamlist-regexp (point-max) t) (progn - (setq emms-stream-info-playlist-found + (setq emms-stream-info-streamlist-found (or (match-string-no-properties 1) (match-string-no-properties 2))) - (setq emms-stream-info-playlist-flag t)))))) + (setq emms-stream-info-streamlist-flag t)))))) ;; Be chatty at the user (if emms-stream-info-verbose @@ -502,8 +502,8 @@ Argument STR Quanta of data." (if (or (> emms-stream-info-downloaded emms-stream-info-max) ; maxed out? ;; Captured header and title info? (and emms-stream-info-header-flag emms-stream-info-title-flag) - ;; Captured playlist info? - emms-stream-info-playlist-flag) + ;; Captured streamlist info? + emms-stream-info-streamlist-flag) (emms-stream-info-kill-process proc))) ;; Closing the connection proves to be the most difficult part of the @@ -590,8 +590,8 @@ server at URLSTRING." (setq emms-stream-info-title-flag nil) ; forget title flag (setq emms-stream-info-header-flag nil) ; forget header flag (setq emms-stream-info-found nil) ; forget output - (setq emms-stream-info-playlist-found nil) ; forget playlist - (setq emms-stream-info-playlist-flag nil) ; forget playlist + (setq emms-stream-info-streamlist-found nil) ; forget streamlist + (setq emms-stream-info-streamlist-flag nil) ; forget streamlist (setq emms-stream-info-read-inhibit t) ; do not read output ;; Reset state machine @@ -693,7 +693,7 @@ Optional argument CONT boolean." (defun emms-stream-info-input-sanity (&optional urlstring) (let ((type (emms-track-type (emms-playlist-selected-track)))) (cond ((null urlstring) - (if (or (equal type 'playlist) ;; FIXME-PLS + (if (or (equal type 'streamlist) (equal type 'url)) (emms-track-name (emms-playlist-selected-track)))) ((not (stringp urlstring)) @@ -706,9 +706,9 @@ Return a formatted message. URLSTRING should be a string." (interactive) (let ((url (emms-stream-info-input-sanity urlstring))) - (cond ((equal (emms-stream-info-playlist-type url) 'pls) + (cond ((equal (emms-stream-info-streamlist-type url) 'pls) (emms-stream-info-get url t nil t)) - ((equal (emms-stream-info-playlist-type url) 'm3u) + ((equal (emms-stream-info-streamlist-type url) 'm3u) (emms-stream-info-get url t nil t)) (t (emms-stream-info-get url t))))) @@ -719,9 +719,9 @@ Insert a formatted message at point. URLSTRING should be a string." (interactive) (let ((url (emms-stream-info-input-sanity urlstring))) - (cond ((equal (emms-stream-info-playlist-type url) 'pls) + (cond ((equal (emms-stream-info-streamlist-type url) 'pls) (emms-stream-info-get url nil t t)) - ((equal (emms-stream-info-playlist-type url) 'm3u) + ((equal (emms-stream-info-streamlist-type url) 'm3u) (emms-stream-info-get url nil t t)) (t (emms-stream-info-get url nil t))))) diff --git a/emms-streams.el b/emms-streams.el index f238672..0ecf15d 100644 --- a/emms-streams.el +++ b/emms-streams.el @@ -59,29 +59,29 @@ Can be either \"add\" or \"play\". The default is \"add\".") ;; direct IP, otherwite it's a stream playlist (defvar emms-stream-default-list '(("SomaFM: Beatblender" - "http://www.somafm.com/beatblender.pls" 1 playlist) ;; FIXME-PLS + "http://www.somafm.com/beatblender.pls" 1 streamlist) ("SomaFM: Secret Agent" - "http://www.somafm.com/secretagent.pls" 1 playlist) ;; FIXME-PLS + "http://www.somafm.com/secretagent.pls" 1 streamlist) ("SomaFM: Groove Salad" - "http://www.somafm.com/groovesalad.pls" 1 playlist) ;; FIXME-PLS + "http://www.somafm.com/groovesalad.pls" 1 streamlist) ("SomaFM: Drone Zone" - "http://www.somafm.com/dronezone.pls" 1 playlist) ;; FIXME-PLS + "http://www.somafm.com/dronezone.pls" 1 streamlist) ("SomaFM: Tag's Trance" - "http://www.somafm.com/tagstrance.pls" 1 playlist) ;; FIXME-PLS + "http://www.somafm.com/tagstrance.pls" 1 streamlist) ("Digitally Imported, Trance" - "http://www.digitallyimported.com/mp3/trance.pls" 1 playlist) ;; FIXME-PLS + "http://www.digitallyimported.com/mp3/trance.pls" 1 streamlist) ("Digitally Imported, Deephouse" - "http://www.digitallyimported.com/mp3/deephouse.pls" 1 playlist) ;; FIXME-PLS + "http://www.digitallyimported.com/mp3/deephouse.pls" 1 streamlist) ("Digitally Imported, Mostly Classical" - "http://www.digitallyimported.com/mp3/classical.pls" 1 playlist) ;; FIXME-PLS + "http://www.digitallyimported.com/mp3/classical.pls" 1 streamlist) ("Digitally Imported, Chillout" - "http://www.digitallyimported.com/mp3/chillout.pls" 1 playlist) ;; FIXME-PLS + "http://www.digitallyimported.com/mp3/chillout.pls" 1 streamlist) ("Digitally Imported, Drum and Bass" - "http://www.digitallyimported.com/mp3/drumandbass.pls" 1 playlist) ;; FIXME-PLS + "http://www.digitallyimported.com/mp3/drumandbass.pls" 1 streamlist) ("Philosomatika, Goa-Trance" - "http://www.philosomatika.com/Philosomatika.pls" 1 playlist) ;; FIXME-PLS + "http://www.philosomatika.com/Philosomatika.pls" 1 streamlist) ("Drum and Bass Radio, BassDrive" - "http://www.bassdrive.com/BassDrive.m3u" 1 playlist) ;; FIXME-PLS + "http://www.bassdrive.com/BassDrive.m3u" 1 streamlist) ("Flaresound, Jazzmusique" "http://64.236.34.196:80/stream/1016" 1 url) ("Flaresound, Jazzmusique" @@ -89,17 +89,17 @@ Can be either \"add\" or \"play\". The default is \"add\".") ("Flaresound, L'Electric" "http://www.bp6.com:8002" 1 url) ("Stangs Garage, Eclectic" - "http://www.stangsgarage.com/listen.pls" 1 playlist) ;; FIXME-PLS + "http://www.stangsgarage.com/listen.pls" 1 streamlist) ("DNA Lounge, Live" - "http://www.dnalounge.com/audio/128.m3u" 1 playlist) ;; FIXME-PLS + "http://www.dnalounge.com/audio/128.m3u" 1 streamlist) ("Virgin Radio, The Groove" - "http://www.smgradio.com/core/audio/ogg/live.pls?service=grbb" 1 playlist) ;; FIXME-PLS + "http://www.smgradio.com/core/audio/ogg/live.pls?service=grbb" 1 streamlist) ("Virgin Radio, Virgin Classic" - "http://www.smgradio.com/core/audio/ogg/live.pls?service=vcbb" 1 playlist) ;; FIXME-PLS + "http://www.smgradio.com/core/audio/ogg/live.pls?service=vcbb" 1 streamlist) ("Virgin Radio, Virgin 1215AM" - "http://www.smgradio.com/core/audio/ogg/live.pls?service=vrbb" 1 playlist) ;; FIXME-PLS + "http://www.smgradio.com/core/audio/ogg/live.pls?service=vrbb" 1 streamlist) ("WCPE, Classical Music" - "http://www.ibiblio.org/wcpe/wcpe.pls" 1 playlist))) ;; FIXME-PLS + "http://www.ibiblio.org/wcpe/wcpe.pls" 1 streamlist))) (defvar emms-stream-mode-map (let ((map (make-keymap))) @@ -288,7 +288,7 @@ Don't forget to run `emms-stream-save-bookmarks-file' after !" (interactive "sName of the bookmark: sURL: nFeed descriptor: -SType (url or playlist): ") ;; FIXME-PLS ? +SType (url or streamlist): ") (let* ((line (emms-stream-line-number-at-pos (point))) (index (+ (/ line 2) 1))) (setq emms-stream-list (insert-at index (list name url fd type) emms-stream-list)) @@ -316,7 +316,7 @@ Don't forget to save your modifications !" (emms-stream-url bookmark))) (fd (read-from-minibuffer "Feed Descriptor: " (int-to-string (emms-stream-fd bookmark)))) - (type (read-from-minibuffer "Type (url or playlist): " ;; FIXME-PLS ? + (type (read-from-minibuffer "Type (url or streamlist): " (format "%s" (emms-stream-type bookmark))))) (emms-stream-delete-bookmark) (emms-stream-add-bookmark name url (string-to-int fd) type))) @@ -435,11 +435,11 @@ about it, use this. Otherwise returns the name alone." (eval-when-compile (require 'emms-info)) ; appease byte-compiler (add-to-list 'emms-info-methods-list 'emms-info-playlist) (defun emms-info-playlist-providep (track) - (if (eq (emms-track-type track) 'playlist) ;; FIXME-PLS + (if (eq (emms-track-type track) 'streamlist) t nil)) - (define-emms-info-method emms-info-playlist ;; FIXME-PLS ? - :providep 'emms-info-playlist-providep ;; FIXME-PLS ? + (define-emms-info-method emms-info-streamlist ;; FIXME-PLS ? + :providep 'emms-info-streamlist-providep ;; FIXME-PLS ? :get 'emms-info-url-get)) (provide 'emms-streams) -- cgit v1.2.3