From 88486511d43b6eb82d33332cdb9de4e1572b590d Mon Sep 17 00:00:00 2001 From: yonirabkin Date: Sun, 18 Sep 2005 19:39:00 +0000 Subject: include streaming into emms-default and fix streaming info from within the *EMMS Streams* buffer darcs-hash:20050918193906-be80e-b8b8921427703df27d9053bb07b6bcbcf451bd1a.gz --- emms-default.el | 6 ++++++ emms-stream-info.el | 35 ++++++++++++++++++++--------------- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/emms-default.el b/emms-default.el index 17d10b8..19435a1 100644 --- a/emms-default.el +++ b/emms-default.el @@ -109,6 +109,12 @@ always work, unless you get very unlucky with a CVS-build." ;; (lambda () ;; (setnu-mode 1))))))))) + ;; streaming audio interface + (require 'emms-streams) + + ;; streaming audio information + (require 'emms-stream-info) + ;; display lyrics (require 'emms-lyrics) diff --git a/emms-stream-info.el b/emms-stream-info.el index e4b7439..7101963 100644 --- a/emms-stream-info.el +++ b/emms-stream-info.el @@ -1,11 +1,11 @@ ;;; emms-stream-info.el --- Show what is currently playing on a ;;; streaming audio station. -;; Copyright (C) 2004 Yoni Rabkin Katzenell +;; Copyright (C) 2004, 2005 Yoni Rabkin Katzenell ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License -;; as published by the Free Software Foundation; either version 2 -;; of the License, or (at your option) any later version. +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2 of the +;; License, or (at your option) any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -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-streamlist-found nil) ; forget streamlist - (setq emms-stream-info-streamlist-flag nil) ; forget streamlist + (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 @@ -689,16 +689,21 @@ Optional argument CONT boolean." (unless (process-sentinel proc) (error "No process sentinel"))))) -;; Users. You can never tell what they are going to use as input. +;; Should be phased out. +;; (defun emms-stream-info-input-sanity (&optional urlstring) +;; (let ((type (emms-track-type (emms-playlist-selected-track)))) +;; (cond ((null urlstring) +;; (if (or (equal type 'streamlist) +;; (equal type 'url)) +;; (emms-track-name (emms-playlist-selected-track)))) +;; ((not (stringp urlstring)) +;; (error "URL must be in string format")) +;; ((stringp url) urlstring)))) + (defun emms-stream-info-input-sanity (&optional urlstring) - (let ((type (emms-track-type (emms-playlist-selected-track)))) - (cond ((null urlstring) - (if (or (equal type 'streamlist) - (equal type 'url)) - (emms-track-name (emms-playlist-selected-track)))) - ((not (stringp urlstring)) - (error "URL must be in string format")) - ((stringp url) urlstring)))) + (if (stringp urlstring) + urlstring + (error "URL must be in string format"))) (defun emms-stream-info-message (&optional urlstring) "Get information from streaming audio server at URLSTRING. -- cgit v1.2.3