[PATCH] Fix live tv streaming broken by live rewind

dinkypumpkin dinkypumpkin at gmail.com
Wed Jun 20 11:42:15 EDT 2012


Instructions for updating to Git HEAD:

https://github.com/dinkypumpkin/get_iplayer/wiki/githead

The live rewind feature added to iPlayer TV broke playlist parsing for live tv
due to the addition of a 'liverewind' attribute to <item> elements.  Parsing has
been fixed.  For example of new format:

http://www.bbc.co.uk/iplayer/playlist/bbc_two
---
 get_iplayer |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/get_iplayer b/get_iplayer
index 9356716..e0cc349 100755
--- a/get_iplayer
+++ b/get_iplayer
@@ -5033,7 +5033,8 @@ sub get_verpids {
 		# Live TV
 		if ( m{\s+simulcast="true"} ) {
 			$version = 'default';
-			$verpid = "http://www.bbc.co.uk/emp/simulcast/".$1.".xml" if m{\s+live="true"\s+identifier="(.+?)"};
+			# <item kind="programme" live="true" liverewind="true" identifier="bbc_two_england" group="bbc_two_england" simulcast="true" availability_class="liverewind">
+			$verpid = "http://www.bbc.co.uk/emp/simulcast/".$2.".xml" if m{\s+live="true"\s+(liverewind="true"\s+)?identifier="(.+?)"};
 			main::logger "INFO: Using Live TV: $verpid\n" if $opt->{verbose} && $verpid;
 
 		# Live/Non-live EMP tv/radio XML URL
-- 
1.7.7.5 (Apple Git-26)




More information about the get_iplayer mailing list