Patch to tag all BBC HD programs as category HD

fs ck fsckemail at gmail.com
Fri Dec 17 19:53:38 EST 2010


Here's a very small patch for the latest in git. Hopefully you can get
this in before you work out how to do that release ;-) It fixes the
bug where programs on BBC HD only were not getting the HD category.
(e.g. QI XL). See attached patch file.
-------------- next part --------------
--- get_iplayer.latest	2010-12-16 16:08:33.282742425 +0000
+++ get_iplayer	2010-12-16 16:07:05.916187268 +0000
@@ -6619,6 +6619,8 @@
 
 			# Extract channel
 			$channel = $channels{$_};
+			# Add HD as category
+			push @category, 'HD' if $channel eq 'BBC HD';
 
 			main::logger "DEBUG: '$pid, $name - $episode, $channel'\n" if $opt->{debug};
 
@@ -6638,7 +6640,6 @@
 				$cats{$_} = 1 for ( @category, split /,/, $prog->{$pid}->{categories} );
 				$cats{Popular} = 1 if $channel eq 'Popular';
 				$cats{Highlights} = 1 if $channel eq 'Highlights';
-				$cats{HD} = 1 if $channel eq 'BBC HD';
 				$prog->{$pid}->{categories} = join(',', sort keys %cats);
 
 				# If this is a dupicate pid and the channel is now Signed then both versions are available


More information about the get_iplayer mailing list