Changeset 103

Show
Ignore:
Timestamp:
10/19/06 07:09:40 (7 years ago)
Author:
lincoln
Message:

first pass at HDTV support in shepherd --configure

Files:
9 modified

Legend:

Unmodified
Added
Removed
  • grabbers/abc2_website

    r102 r103  
    3434my $script_start_time = [gettimeofday]; 
    3535my %stats; 
    36 my $channels; 
     36my $channels, my $opt_channels; 
    3737my $tv_guide; 
    3838my $data_cache; 
  • grabbers/abc_website

    r102 r103  
    3434my $script_start_time = [gettimeofday]; 
    3535my %stats; 
    36 my $channels; 
     36my $channels, my $opt_channels; 
    3737my $tv_guide; 
    3838my $data_cache; 
  • grabbers/d1

    r48 r103  
    278278 
    279279  # populate channels 
    280   my $channels; 
     280  my $channels, my $opt_channels; 
    281281  if (-r $opt_channels_file) { 
    282282        local (@ARGV, $/) = ($opt_channels_file); 
  • grabbers/jrobbo

    r69 r103  
    4040# default settings 
    4141my $opt = { }; 
    42 my $channels; 
     42my $channels, my $opt_channels; 
    4343$opt->{channels_file} =         ""; 
    4444$opt->{outputfile} =            cwd() . "/output.xmltv"; 
  • grabbers/oztivo

    r101 r103  
    3232my $output_file = cwd() . "/output.xmltv"; 
    3333my $channels_file; 
    34 my $channels; 
     34my $channels, $opt_channels; 
    3535my @clist; 
    3636my $ver; 
  • grabbers/rex

    r95 r103  
    108108my $opt; 
    109109my $channels = {}; 
     110my $opt_channels = {}; 
    110111my %chanid; 
    111112my $cached; 
  • grabbers/yahoo7widget

    r73 r103  
    3535my $script_start_time = [gettimeofday]; 
    3636my %stats; 
    37 my $channels; 
     37my $channels, my $opt_channels; 
    3838my $tv_guide; 
    3939 
  • shepherd

    r100 r103  
    33# "Shepherd" 
    44 
    5 my $version = '0.2.15'; 
     5my $version = '0.2.16'; 
    66 
    77# A wrapper for various Aussie TV guide data grabbers 
     
    3030# 0.2.14  : Changed online status file format 
    3131# 0.2.15  : Intelli-random grabber ordering now kinda works 
    32  
    33 #BEGIN { *CORE::GLOBAL::die = \&my_die; } 
     32# 0.2.16  : config logic for HD channels 
     33 
     34BEGIN { *CORE::GLOBAL::die = \&my_die; } 
    3435 
    3536use strict; 
     
    9192my $region; 
    9293my $channels; 
     94my $opt_channels; 
    9395my $config_file =   "$CWD/$progname.conf"; 
    9496my $channels_file = "$CWD/channels.conf"; 
     
    12361238    return unless (fetch_file($rfile, $newfile)); 
    12371239 
    1238     if ($progtype ne "shepherd") {     
     1240    if ($progtype eq "grabber") {     
    12391241        # Fetch grabber config file 
    12401242        $rfile .= ".conf"; 
     
    13881390        printf " #%d. %s%s\n",$components->{$proggy}->{order},$proggy,($components->{$proggy}->{disabled} ? " [disabled]" : "") unless $quiet; 
    13891391    } 
    1390  
     1392    printf "\n" unless $quiet; 
    13911393    $made_changes = 1; 
    13921394} 
     
    15421544sub write_channels_file 
    15431545{ 
    1544     write_file($channels_file, 'channels', [ $channels ], [ 'channels' ]); 
     1546    write_file($channels_file, 'channels', 
     1547        [ $channels,  $opt_channels ], 
     1548        [ 'channels', 'opt_channels' ]); 
    15451549} 
    15461550 
     
    16511655    } 
    16521656 
    1653  
    1654     print "\nRandomly selecting grabber order.\n\n"; 
    1655     set_order(0); 
     1657    print "\nHigh Definition TV (HDTV)\n". 
     1658          "Most Australian TV networks broadcast at least some\n". 
     1659          "programmes in HDTV each week, but for the most part\n". 
     1660          "either upsample SD to HD or play a rolling demonstration\n". 
     1661          "HD clip when they don't have the programme in HD format.\n\n". 
     1662          "If you have a HDTV capable system and are interested in\n". 
     1663          "having Shepherd's postprocessors populate HDTV content\n". 
     1664          "then Shepherd will need to know the XMLTV IDs for the HD\n". 
     1665          "channels also.\n"; 
     1666    if (ask_boolean("\nDo you wish to include HDTV channels?")) { 
     1667        print "\nFor each channel you want guide data for, enter an XMLTV id\n" . 
     1668              "of your choice (e.g. \"sevenhd.free.au\"). If you don't need\n" . 
     1669              "guide data for this channel, just press Enter.\n\n"; 
     1670 
     1671        $opt_channels = {}; 
     1672        foreach (@channellist) 
     1673        { 
     1674            next if (($_ =~ /ABC2/i) || ($_ =~ /SBS News/i) || ($_ =~ /31/)); 
     1675            $_ .= "HD"; 
     1676            $line = ask(" \"$_\"? "); 
     1677            $opt_channels->{$_} = $line if ($line); 
     1678        } 
     1679    } 
     1680 
     1681 
     1682    print "\nHave you been running a grabber previously?\n\n". 
     1683          "Some data sources show the programme \"Spicks & Specks\"\n". 
     1684          "with an '&', some show it as \"Spicks and Specks\" with 'and'.\n". 
     1685          "It doesn't matter which way it is - other than if you have an existing\n". 
     1686          "recording policy set one way or the other, it would be preferable\n". 
     1687          "to not have to go and re-enter recording schedules.\n\n". 
     1688          "Shepherd's \"reconciler\" is smart enough to work out many subtle\n". 
     1689          "differences in title names and will automatically rename programmes\n". 
     1690          "to match the same format as previously seen.\n\n". 
     1691          "If you have been using a grabber in the past, if you let Shepherd\n". 
     1692          "know what it is, it can use that to ask the reconciler to 'learn'\n". 
     1693          "the subtle programme name changes between different grabbers,\n". 
     1694          "hopefully resulting in consistent programme names, regardless of\n". 
     1695          "the data source.\n\n". 
     1696          "Were you using one of the following data sources previously?\n". 
     1697          "If so, list it (or them) in order of preference.\n\n". 
     1698          "Choose from: "; 
     1699    print join(", ",query_grabbers()); 
     1700    print "\nProvide a comma-seperated list (in preference order) or leave blank\n". 
     1701          "if you have no order preference.\n"; 
     1702    my $order = ask("Order? "); 
     1703    set_order(1,$order); 
    16561704 
    16571705    show_channels(); 
     
    17231771  print "Subscribed channels:\n"; 
    17241772  print "    $_ -> $channels->{$_}\n" for sort keys %$channels; 
     1773  print "Optional (HDTV) channels:\n"; 
     1774  print "    $_ -> $opt_channels->{$_}\n" for sort keys %$opt_channels; 
    17251775} 
    17261776 
  • status

    r101 r103  
    1 shepherd:0.2.15:shepherd 
    2 grabber:rex:3.3.4 
    3 grabber:oztivo:0.7 
    4 grabber:abc_website:1.55-r3 
    5 grabber:abc2_website:1.55-r3 
    6 grabber:yahoo7widget:1.54-r3 
    7 grabber:jrobbo:0.03-r3 
    8 grabber:d1:0.6.2.3-r3 
     1shepherd:0.2.16:shepherd 
     2grabber:rex:3.3.4-r2 
     3grabber:oztivo:0.7-r2 
     4grabber:abc_website:1.55-r4 
     5grabber:abc2_website:1.55-r4 
     6grabber:yahoo7widget:1.54-r4 
     7grabber:jrobbo:0.03-r4 
     8grabber:d1:0.6.2.3-r4 
    99reconciler:reconciler_mk2:0.07 
    1010postprocessor:imdb_augment_data:0.03