ok, I've got it working, but it only plays the last segment of the show.
The smil playlist is now a set of rtsp links to the segments of the
show, which the real player plays in order.
has anyone previously worked out the problem of building a playlist
based upon these?
At any rate, my ugly-ass top of get_stream in
AlienNPRWaitWaitPlayableItem.pm looks like:
sub get_stream
{
my $self = shift;
my ($smilurl,$stream);
#
# Wait Wait HTNK code has changed - this is the url
#
$self->{rooturl} =
"http://www.npr.org/templates/rundowns/rundown.php?prgId=35";
my $content = Plugins::Alien::AlienCommon::get($self->{rooturl});
return undef unless defined ($content);
# print "Content = $content";
# The following code has been supsercede by the change in URL to a JS
with the URL info.
# my $p = HTML::PullParser->new(api_version => 3, doc => $content,
start => "event,tagname,attr", report_tags => [qw ( a )]);
# while ( my $token = $p->get_token ) {
#
# next unless $token->[1] eq "a";
# next unless exists $token->[2]->{class};
# next unless $token->[2]->{class} eq "redcollink";
#
# my $href = $token->[2]->{href};
# if( $href =~
m/\Ajavascript:getStaticMedia\(\'(.+?)\',\'(.+?)\'/) {
# my $progcode =$1;
# $::d_plugins && msg("NPR Menu Wait Wait: returning "
.$self->{text} ." code $progcode \n");
# $smilurl =
"http://www.npr.org/dmg/dmg.php?mediaURL=$progcode&mediaType=RM";
# last;
# }
#
#http://www.npr.org/templates/dmg/dmg.php?prgCode=WAITWAIT&showDate=30-Dec-2006&segNum=&mediaPref=RM&getUnderwriting=1
# we want to match: href="javascript:getMedia('WAITWAIT',
'30-Dec-2006', 'ALL', 'RM,WM')
print "Testing content match...";
# if( $content =~ m/javascript:getMedia\(\\\'WAITWAIT\\\',
\\\'(.+?)\\\'/) {
if ($content =~
m/javascript:getMedia.+?(WAITWAIT).+?,\s*\'(.+?)\'/){
print " we got a winner!";
my $progcode = $1;
my $datecode = $2;
print "progcode = $progcode datecode = $datecode\n";
$::d_plugins && msg("NPR Menu Wait Wait: returning "
.$self->{text} ." code $progcode \n");
$smilurl =
"http://www.npr.org/templates/dmg/dmg.php?prgCode=$progcode&showDate=$2&mediaPref=RM&segNum=";
print "smilurl = $smilurl\n";
}
else
{
print " no match.";
}
--
bennyTHEshap
------------------------------------------------------------------------
bennyTHEshap's Profile: http://forums.slimdevices.com/member.php?userid=9432
View this thread: http://forums.slimdevices.com/showthread.php?t=31326
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins