changeset 157:2c1cec3c5d64

out put BS channel instead of SID and "transponder_slot(BS1_1)"
author Naoya OYAMA <naoya.oyama@gmail.com>
date Mon, 10 Sep 2012 15:55:40 +0900
parents 159a729b90eb
children 6fab243c91ab
files src/epgdump_xml_parse.pl
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/epgdump_xml_parse.pl	Mon Sep 10 14:16:44 2012 +0900
+++ b/src/epgdump_xml_parse.pl	Mon Sep 10 15:55:40 2012 +0900
@@ -34,13 +34,14 @@
 	my @si         = ();
 	my %sih        = ();
 	my $tp         = "";
+	my $slot       = "";
 
 	if (defined($channel{satelliteinfo})) {
 		@si    = @{$channel{satelliteinfo}};
 		%sih   = %{$si[0]};
 		$tp    = $sih{TP}[0];
-		if($tp =~ m/^BS\d+$/) {
-			$tp = $service_id;
+		if ($tp =~ /BS/) {
+			$slot  = $sih{SLOT}[0];
 		}
 	} else {
 		$tp    = $ARGV[0];
@@ -51,13 +52,17 @@
 
 	$channel_info_list{$service_id}{SID}  = $service_id;
 	$channel_info_list{$service_id}{TP}   = $tp;
+	if ($slot =~ /\d/) {
+		$channel_info_list{$service_id}{SLOT} = "_" . $slot;
+	}
 	$channel_info_list{$service_id}{NAME} = $dpnh{content};
 	push(@service_id_list, $service_id);
 }
 
 foreach my $service_id (sort {$a <=> $b} @service_id_list) {
 	print $channel_info_list{$service_id}{SID}  . ",";
-	print $channel_info_list{$service_id}{TP}   . ",";
+	print $channel_info_list{$service_id}{TP}        ;
+	print $channel_info_list{$service_id}{SLOT} . ",";
 	print $channel_info_list{$service_id}{NAME} . "\n";
 }
 1;