X-Git-Url: http://christophe.rhodes.io/gitweb/?p=iplayer-el.git;a=blobdiff_plain;f=iplayer.el;h=388a58ef3d29654799f442a70998dbd36a891347;hp=ce773e5e02b24469a69608a25e80770e856d736e;hb=HEAD;hpb=cb26f776337e50e035fb3dff9773fc6f61d66070 diff --git a/iplayer.el b/iplayer.el index ce773e5..388a58e 100644 --- a/iplayer.el +++ b/iplayer.el @@ -1,10 +1,11 @@ ;;; iplayer.el --- Browse and download BBC TV/radio shows -;; Copyright (C) 2012-2013 Christophe Rhodes +;; Copyright (C) 2012-2015 Christophe Rhodes ;; Author: Christophe Rhodes +;; URL: https://github.com/csrhodes/iplayer-el ;; Version: 0.1 -;; Keywords: multimedia +;; Keywords: multimedia, bbc ;; 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 @@ -166,6 +167,8 @@ ("2" . "BBC Two") ("3" . "BBC Three") ("4" . "BBC Four") + ("8" . "CBBC") + ("9" . "CBeebies") ("!" . "BBC Radio 1") ("\"" . "BBC Radio 2") @@ -224,17 +227,20 @@ The presets are defined in the variable `iplayer-presets'." (state (process-get process 'iplayer-state)) (progress (process-get process 'iplayer-progress))) (with-current-buffer (get-buffer-create "*iplayer-progress*") - (goto-char (point-min)) - (let ((found (re-search-forward (format "^%s:" id) nil 'end))) - (unless found - (unless (= (point) (progn (forward-line 0) (point))) - (goto-char (point-max)) - (newline))) - (forward-line 0) - (let ((beg (point))) - (end-of-line) - (delete-region beg (point))) - (insert (format "%s: %s %s%%" id state progress)))))) + (special-mode) + (save-excursion + (goto-char (point-min)) + (let ((found (re-search-forward (format "^%s:" id) nil 'end)) + (inhibit-read-only t)) + (unless found + (unless (= (point) (progn (forward-line 0) (point))) + (goto-char (point-max)) + (newline))) + (forward-line 0) + (let ((beg (point))) + (end-of-line) + (delete-region beg (point))) + (insert (format "%s: %s %s%%" id state progress))))))) (defun iplayer-download-process-filter (process string) (catch 'no-progress