line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::NicoVideo::Content::Flv; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1991
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
51
|
|
4
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
5
|
1
|
|
|
1
|
|
7
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
60
|
|
6
|
|
|
|
|
|
|
$VERSION = '0.28'; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
6
|
use base qw(Net::NicoVideo::Content Class::Accessor::Fast); |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
159
|
|
9
|
1
|
|
|
1
|
|
7
|
use Carp qw(croak); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
72
|
|
10
|
1
|
|
|
1
|
|
1532
|
use CGI::Simple; |
|
1
|
|
|
|
|
18479
|
|
|
1
|
|
|
|
|
9
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
55
|
use vars qw(@Members); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
340
|
|
13
|
|
|
|
|
|
|
@Members = qw( |
14
|
|
|
|
|
|
|
thread_id |
15
|
|
|
|
|
|
|
l |
16
|
|
|
|
|
|
|
url |
17
|
|
|
|
|
|
|
link |
18
|
|
|
|
|
|
|
ms |
19
|
|
|
|
|
|
|
user_id |
20
|
|
|
|
|
|
|
is_premium |
21
|
|
|
|
|
|
|
nickname |
22
|
|
|
|
|
|
|
time |
23
|
|
|
|
|
|
|
done |
24
|
|
|
|
|
|
|
feedrev |
25
|
|
|
|
|
|
|
ng_rv |
26
|
|
|
|
|
|
|
hms |
27
|
|
|
|
|
|
|
hmsp |
28
|
|
|
|
|
|
|
hmst |
29
|
|
|
|
|
|
|
hmstk |
30
|
|
|
|
|
|
|
rpu |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(@Members); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub members { # implement |
36
|
0
|
|
|
0
|
0
|
|
my @copy = @Members; |
37
|
0
|
|
|
|
|
|
@copy; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub parse { # implement |
41
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
42
|
0
|
0
|
|
|
|
|
$self->load($_[0]) if( defined $_[0] ); |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
my $cgi = CGI::Simple->new($self->_decoded_content); |
45
|
0
|
|
|
|
|
|
for my $name ( $cgi->param ){ |
46
|
0
|
0
|
|
|
|
|
$self->$name( $cgi->param($name) ) |
47
|
|
|
|
|
|
|
if( $self->can($name) ); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
# status |
51
|
0
|
|
|
|
|
|
my $url = $self->url; |
52
|
0
|
0
|
0
|
|
|
|
if( defined $url and $url =~ /nicovideo\.jp/ ){ |
53
|
0
|
|
|
|
|
|
$self->set_status_success; |
54
|
|
|
|
|
|
|
}else{ |
55
|
0
|
|
|
|
|
|
$self->set_status_error; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
return $self; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub is_economy { |
62
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
63
|
0
|
0
|
|
|
|
|
my $url = $self->url or croak "url is not set, does not it fetch flv data yet?"; |
64
|
0
|
0
|
|
|
|
|
return $url =~ /low$/ ? 1 : 0; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |
69
|
|
|
|
|
|
|
__END__ |