| line |
true |
false |
branch |
|
77
|
0 |
0 |
unless defined $$self{$_} |
|
86
|
0 |
0 |
if (defined $$self{'listsDir'}) |
|
138
|
0 |
0 |
if (defined $$self{'logfd'}) { } |
|
151
|
0 |
0 |
if ($$self{'verbose'}) |
|
172
|
0 |
0 |
if ($file =~ /\.gz$/) { } |
|
195
|
0 |
0 |
if ($file =~ /\.gz$/) { } |
|
221
|
0 |
0 |
if ($dbkey =~ s/\s*\{([^\}]+)\}//o) |
|
223
|
0 |
0 |
if ($s =~ s/\s*\(\#(\d+)\.(\d+)\)$//) { } |
|
|
0 |
0 |
elsif ($s =~ s/^\((\d\d\d\d)\-(\d\d)\-(\d\d)\)$//) { } |
|
254
|
0 |
0 |
if (defined $$self{'seriesKeys'}{$parentKey}) |
|
261
|
0 |
0 |
if ($dbkey =~ s/^\"//o and $dbkey =~ s/\" \(/ (/o) { } |
|
|
0 |
0 |
elsif ($dbkey =~ s/\s+\(TV\)$//o) { } |
|
|
0 |
0 |
elsif ($dbkey =~ s/\s+\(V\)$//o) { } |
|
|
0 |
0 |
elsif ($dbkey =~ s/\s+\(VG\)$//o) { } |
|
262
|
0 |
0 |
if ($dbkey =~ s/\s+\(mini\)$//o) { } |
|
263
|
0 |
0 |
if ($hash{'parentId'} == 0) { } |
|
272
|
0 |
0 |
if ($hash{'parentId'} == 0) { } |
|
304
|
0 |
0 |
if ($title =~ /^\"/o and $title =~ /\"\s*\(/o) |
|
309
|
0 |
0 |
if ($title =~ s/\s+\((\d\d\d\d)\)$//o or $title =~ s[\s+\((\d\d\d\d)/[IVXL]+\)$][]o) { } |
|
|
0 |
0 |
elsif ($title =~ s/\s+\((\?\?\?\?)\)$//o or $title =~ s[\s+\((\?\?\?\?)/[IVXL]+\)$][]o) { } |
|
312
|
0 |
0 |
if (not defined $year) { } |
|
322
|
0 |
0 |
if (not defined $year) { } |
|
333
|
0 |
0 |
if (not defined $year) { } |
|
343
|
0 |
0 |
if ($hash{'series'} != 0 or $hash{'airdate'} != 0) { } |
|
347
|
0 |
0 |
if (not defined $hash{'title'}) { } |
|
375
|
0 |
0 |
if (/^MOVIES LIST/o) { } |
|
|
0 |
0 |
elsif ($lineCount > 1000) { } |
|
376
|
0 |
0 |
unless ($_ = <$fh> and /^===========/o) |
|
381
|
0 |
0 |
unless ($_ = <$fh> and /^\s*$/o) |
|
395
|
0 |
0 |
if $$self{'showProgressBar'} |
|
400
|
0 |
0 |
if $$self{'showProgressBar'} |
|
401
|
0 |
0 |
if $$self{'showProgressBar'} |
|
419
|
0 |
0 |
if $line =~ /^\-\-\-\-\-\-\-+/o |
|
421
|
0 |
0 |
if $line =~ /\{\{SUSPENDED\}\}/o |
|
430
|
0 |
0 |
if ($tab != -1) { } |
|
432
|
0 |
0 |
if ($ykey = /\s+(\d\d\d\d)$/) { } |
|
|
0 |
0 |
elsif ($ykey = /\s+(\?\?\?\?)$/) { } |
|
|
0 |
0 |
elsif ($ykey = /\s+(\d\d\d\d)\-(\?\?\?\?)$/) { } |
|
|
0 |
0 |
elsif ($ykey = /\s+(\d\d\d\d)\-(\d\d\d\d)$/) { } |
|
475
|
0 |
0 |
if ($$self{'showProgressBar'}) |
|
477
|
0 |
0 |
if ($count > $countEstimate) { } |
|
|
0 |
0 |
elsif ($count > $next_update) { } |
|
492
|
0 |
0 |
if $$self{'showProgressBar'} |
|
511
|
0 |
0 |
if (/^8: THE GENRES LIST/o) { } |
|
|
0 |
0 |
elsif ($lineCount > 1000) { } |
|
512
|
0 |
0 |
unless ($_ = <$fh> and /^===========/o) |
|
517
|
0 |
0 |
unless ($_ = <$fh> and /^\s*$/o) |
|
531
|
0 |
0 |
if $$self{'showProgressBar'} |
|
536
|
0 |
0 |
if $$self{'showProgressBar'} |
|
537
|
0 |
0 |
if $$self{'showProgressBar'} |
|
555
|
0 |
0 |
if $line =~ /^\-\-\-\-\-\-\-+/o |
|
556
|
0 |
0 |
if $line =~ /\s*\{\{SUSPENDED\}\}/o |
|
563
|
0 |
0 |
if ($tab != -1) { } |
|
578
|
0 |
0 |
if ($$self{'imdbMovie2DBKey'}{$mkey}) |
|
580
|
0 |
0 |
unless (defined $$self{'GenreID'}{$genre}) |
|
589
|
0 |
0 |
if ($count % 50000 == 0) |
|
594
|
0 |
0 |
if ($$self{'showProgressBar'}) |
|
596
|
0 |
0 |
if ($count > $countEstimate) { } |
|
|
0 |
0 |
elsif ($count > $next_update) { } |
|
611
|
0 |
0 |
if $$self{'showProgressBar'} |
|
626
|
0 |
0 |
if ($whichCastType eq 'Actors') |
|
627
|
0 |
0 |
if ($DB->table_row_count('Actors') > 0 or $DB->table_row_count('Titles2Actors') > 0 or $DB->table_row_count('Titles2Hosts') > 0 or $DB->table_row_count('Titles2Narrators') > 0) |
|
643
|
0 |
0 |
if ($whichCastType eq 'Actors') { } |
|
|
0 |
0 |
elsif ($whichCastType eq 'Actresses') { } |
|
656
|
0 |
0 |
if $$self{'showProgressBar'} |
|
660
|
0 |
0 |
if $$self{'showProgressBar'} |
|
661
|
0 |
0 |
if $$self{'showProgressBar'} |
|
666
|
0 |
0 |
if (/^$header/) { } |
|
|
0 |
0 |
elsif ($lineCount > 1000) { } |
|
667
|
0 |
0 |
unless ($_ = <$fh> and /^===========/o) |
|
672
|
0 |
0 |
unless ($_ = <$fh> and /^\s*$/o) |
|
677
|
0 |
0 |
unless ($_ = <$fh> and /^Name\s+Titles\s*$/o) |
|
682
|
0 |
0 |
unless ($_ = <$fh> and /^[\s\-]+$/o) |
|
705
|
0 |
0 |
unless (defined $cur_actorId) |
|
717
|
0 |
0 |
if $line =~ /^\-\-\-\-\-\-\-+/o |
|
719
|
0 |
0 |
if length $line == 0 |
|
722
|
0 |
0 |
if $line =~ /\s*\{\{SUSPENDED\}\}/o |
|
728
|
0 |
0 |
if ($line =~ s/\s*<(\d+)>//o) |
|
730
|
0 |
0 |
if $billing > 3 |
|
733
|
0 |
0 |
if ($line =~ s/^([^\t]+)\t+//o) |
|
743
|
0 |
0 |
if ($$self{'showProgressBar'}) |
|
745
|
0 |
0 |
if ($castNames > $castCountEstimate) { } |
|
|
0 |
0 |
elsif ($castNames > $next_update) { } |
|
757
|
0 |
0 |
if ((my $start = index($line, ' [')) != -1) |
|
761
|
0 |
0 |
if ($ex =~ s/Host//o) |
|
764
|
0 |
0 |
if ($ex =~ s/Narrator//o) |
|
772
|
0 |
0 |
if ($line =~ s/\s*\(aka ([^\)]+)\).*$//o) |
|
777
|
0 |
0 |
if ($line =~ s/ (\(.*)$//o) |
|
784
|
0 |
0 |
if ($line =~ s/\s+Narrator$//o) |
|
794
|
0 |
0 |
if ($titleID) { } |
|
795
|
0 |
0 |
if ($isHost) |
|
798
|
0 |
0 |
if ($isNarrator) |
|
801
|
0 |
0 |
unless ($isHost or $isNarrator) |
|
806
|
0 |
0 |
if ($count % 50000 == 0) |
|
814
|
0 |
0 |
if $$self{'showProgressBar'} |
|
832
|
0 |
0 |
if ($DB->table_row_count('Directors') > 0 or $DB->table_row_count('Titles2Directors') > 0) |
|
840
|
0 |
0 |
if $$self{'showProgressBar'} |
|
844
|
0 |
0 |
if $$self{'showProgressBar'} |
|
845
|
0 |
0 |
if $$self{'showProgressBar'} |
|
849
|
0 |
0 |
if (/^THE DIRECTORS LIST/) { } |
|
|
0 |
0 |
elsif ($lineCount > 1000) { } |
|
850
|
0 |
0 |
unless ($_ = <$fh> and /^===========/o) |
|
855
|
0 |
0 |
unless ($_ = <$fh> and /^\s*$/o) |
|
860
|
0 |
0 |
unless ($_ = <$fh> and /^Name\s+Titles\s*$/o) |
|
865
|
0 |
0 |
unless ($_ = <$fh> and /^[\s\-]+$/o) |
|
897
|
0 |
0 |
if $line =~ /^\-\-\-\-\-\-\-+/o |
|
898
|
0 |
0 |
if length $line == 0 |
|
901
|
0 |
0 |
if $line =~ /\s*\{\{SUSPENDED\}\}/o |
|
905
|
0 |
0 |
if ($line =~ s/^([^\t]+)\t+//o) |
|
909
|
0 |
0 |
if ($$self{'showProgressBar'}) |
|
911
|
0 |
0 |
if ($castNames > $castCountEstimate) { } |
|
|
0 |
0 |
elsif ($castNames > $next_update) { } |
|
932
|
0 |
0 |
if ($line =~ s/ (\(.*)$//o) |
|
939
|
0 |
0 |
if ($$self{'imdbMovie2DBKey'}{$line}) { } |
|
941
|
0 |
0 |
unless (defined $found{$cur_name}) |
|
952
|
0 |
0 |
if ($count % 50000 == 0) |
|
960
|
0 |
0 |
if $$self{'showProgressBar'} |
|
977
|
0 |
0 |
if ($DB->table_row_count('Ratings') > 0) |
|
985
|
0 |
0 |
if (/^MOVIE RATINGS REPORT/o) { } |
|
|
0 |
0 |
elsif ($lineCount > 1000) { } |
|
986
|
0 |
0 |
unless ($_ = <$fh> and /^\s*$/o) |
|
991
|
0 |
0 |
unless ($_ = <$fh> and /^New Distribution Votes Rank Title/o) |
|
1005
|
0 |
0 |
if $$self{'showProgressBar'} |
|
1010
|
0 |
0 |
if $$self{'showProgressBar'} |
|
1011
|
0 |
0 |
if $$self{'showProgressBar'} |
|
1026
|
0 |
0 |
if $line =~ /^\s*$/o |
|
1028
|
0 |
0 |
if $line =~ /^\-\-\-\-\-\-\-+/o |
|
1034
|
0 |
0 |
if ($line =~ /^\s+([\.|\*|\d]+)\s+(\d+)\s+(\d+\.\d+)\s+(.+)$/o) { } |
|
1036
|
0 |
0 |
if ($$self{'imdbMovie2DBKey'}{$4}) |
|
1039
|
0 |
0 |
if ($countImported % 50000 == 0) |
|
1047
|
0 |
0 |
if ($$self{'showProgressBar'}) |
|
1049
|
0 |
0 |
if ($count > $countEstimate) { } |
|
|
0 |
0 |
elsif ($count > $next_update) { } |
|
1062
|
0 |
0 |
if $$self{'showProgressBar'} |
|
1079
|
0 |
0 |
if ($DB->table_row_count('Keywords') > 0) |
|
1088
|
0 |
0 |
if (/THE KEYWORDS LIST/) { } |
|
|
0 |
0 |
elsif ($lineCount > 200000) { } |
|
1089
|
0 |
0 |
unless ($_ = <$fh> and /^===========/o) |
|
1094
|
0 |
0 |
unless ($_ = <$fh> and /^\s*$/o) |
|
1108
|
0 |
0 |
if $$self{'showProgressBar'} |
|
1113
|
0 |
0 |
if $$self{'showProgressBar'} |
|
1114
|
0 |
0 |
if $$self{'showProgressBar'} |
|
1129
|
0 |
0 |
if $line =~ /^\s*$/ |
|
1134
|
0 |
0 |
if (defined $title and defined $keyword) { } |
|
1138
|
0 |
0 |
if ($$self{'imdbMovie2DBKey'}{$title}) |
|
1139
|
0 |
0 |
unless (defined $found{$keyword}) |
|
1150
|
0 |
0 |
if ($countImported % 50000 == 0) |
|
1155
|
0 |
0 |
if ($$self{'showProgressBar'}) |
|
1157
|
0 |
0 |
if ($count > $countEstimate) { } |
|
|
0 |
0 |
elsif ($count > $next_update) { } |
|
1170
|
0 |
0 |
if $$self{'showProgressBar'} |
|
1186
|
0 |
0 |
if ($DB->table_row_count('Plots') > 0) |
|
1195
|
0 |
0 |
if (/PLOT SUMMARIES LIST/) { } |
|
|
0 |
0 |
elsif ($lineCount > 500) { } |
|
1196
|
0 |
0 |
unless ($_ = <$fh> and /^===========/o) |
|
1201
|
0 |
0 |
unless ($_ = <$fh> and /^-----------/o) |
|
1215
|
0 |
0 |
if $$self{'showProgressBar'} |
|
1220
|
0 |
0 |
if $$self{'showProgressBar'} |
|
1221
|
0 |
0 |
if $$self{'showProgressBar'} |
|
1231
|
0 |
0 |
if $line =~ /^\s*$/ |
|
1232
|
0 |
0 |
if $line =~ /\s*\{\{SUSPENDED\}\}/o |
|
1237
|
0 |
0 |
if (defined $title) { } |
|
1248
|
0 |
0 |
if $l =~ /^\s*$/ |
|
1250
|
0 |
0 |
if ($l =~ /PL:\s(.*)$/) |
|
1251
|
0 |
0 |
$plot ne '' ? : |
|
1254
|
0 |
0 |
if ($l =~ /BY:\s(.*)$/ or $l =~ /^(\-\-\-\-\-\-\-\-)/o) |
|
1258
|
0 |
0 |
if ($token eq '--------') |
|
1259
|
0 |
0 |
if ($plot eq '') |
|
1265
|
0 |
0 |
if ($$self{'imdbMovie2DBKey'}{$line}) { } |
|
1269
|
0 |
0 |
if ($count % 50000 == 0) |
|
1280
|
0 |
0 |
if ($token eq '--------') |
|
1286
|
0 |
0 |
if (length $plot) |
|
1290
|
0 |
0 |
if ($$self{'showProgressBar'}) |
|
1292
|
0 |
0 |
if ($count > $countEstimate) { } |
|
|
0 |
0 |
elsif ($count > $next_update) { } |
|
1302
|
0 |
0 |
unless ($line =~ /^(---|PL:|BY:)/) |
|
1306
|
0 |
0 |
if ($count > $next_update) |
|
1307
|
0 |
0 |
if ($$self{'showProgressBar'}) |
|
1314
|
0 |
0 |
if $$self{'showProgressBar'} |
|
1329
|
0 |
0 |
unless open INFO, "< $file" |
|
1332
|
0 |
0 |
if (s/^([^:]+)://o) |
|
1345
|
0 |
0 |
if (ref $info ne 'HASH') |
|
1361
|
0 |
0 |
if (defined $$self{'dbinfo'}{$key}) |
|
1370
|
0 |
0 |
unless open INFO, "> $$self{'moviedbInfo'}" |
|
1383
|
0 |
0 |
unless (defined $$self{'listFiles'}->paths_isset($key)) |
|
1387
|
0 |
0 |
unless (-f $filePath) |
|
1394
|
0 |
0 |
if ($filePath =~ /.gz$/) |
|
1395
|
0 |
0 |
if (open my $fd, "gzip -l $filePath |") { } |
|
1400
|
0 |
0 |
if (/^\s*\d+\s+(\d+)/) |
|
1418
|
0 |
0 |
if (defined $file) { } |
|
1419
|
0 |
0 |
unless (open $$self{'logfd'}, "> $file") |
|
1442
|
0 |
0 |
if (-f "$$self{'imdbDir'}/stage-$type.log") |
|
1455
|
0 |
0 |
if ($type eq 'movies') |
|
1465
|
0 |
0 |
unless ($self->_redirect(sprintf("%s/stage-$type.log", $$self{'imdbDir'}))) |
|
1469
|
0 |
0 |
unless ($DB->connect) |
|
1493
|
0 |
0 |
unless (grep /^$type$/, $self->listTypes) |
|
1528
|
0 |
0 |
unless (-f $$self{'listFiles'}->paths_index($type)) |
|
1533
|
0 |
0 |
if ($type eq 'movies') |
|
1540
|
0 |
0 |
if ($num < 0) { } |
|
|
0 |
0 |
elsif (abs $num - $countEstimate > $countEstimate * 0.1) { } |
|
1541
|
0 |
0 |
if ($num == -2) |
|
1551
|
0 |
0 |
unless open OUT, "> $$self{'imdbDir'}/titles.tsv" |
|
1566
|
0 |
0 |
unless (defined $$self{'imdbMovie2DBKey'}) |
|
1570
|
0 |
0 |
unless open IN, "< $$self{'imdbDir'}/titles.tsv" |
|
1573
|
0 |
0 |
if (/^(\d+)\t(.+)/o) |
|
1582
|
0 |
0 |
if ($type eq 'directors') |
|
1589
|
0 |
0 |
if ($num < 0) { } |
|
|
0 |
0 |
elsif (abs $num - $countEstimate > $countEstimate * 0.1) { } |
|
1590
|
0 |
0 |
if ($num == -2) |
|
1607
|
0 |
0 |
if ($type eq 'actors') |
|
1615
|
0 |
0 |
if ($num < 0) { } |
|
|
0 |
0 |
elsif (abs $num - $countEstimate > $countEstimate * 0.1) { } |
|
1616
|
0 |
0 |
if ($num == -2) |
|
1629
|
0 |
0 |
if ($type eq 'actresses') |
|
1633
|
0 |
0 |
if ($num < 0) { } |
|
|
0 |
0 |
elsif (abs $num - $countEstimate > $countEstimate * 0.1) { } |
|
1634
|
0 |
0 |
if ($num == -2) |
|
1651
|
0 |
0 |
if ($type eq 'genres') |
|
1657
|
0 |
0 |
if ($num < 0) { } |
|
|
0 |
0 |
elsif (abs $num - $countEstimate > $countEstimate * 0.1) { } |
|
1658
|
0 |
0 |
if ($num == -2) |
|
1675
|
0 |
0 |
if ($type eq 'ratings') |
|
1681
|
0 |
0 |
if ($num < 0) { } |
|
|
0 |
0 |
elsif (abs $num - $countEstimate > $countEstimate * 0.1) { } |
|
1682
|
0 |
0 |
if ($num == -2) |
|
1699
|
0 |
0 |
if ($type eq 'keywords') |
|
1706
|
0 |
0 |
if ($num < 0) { } |
|
|
0 |
0 |
elsif (abs $num - $countEstimate > $countEstimate * 0.05) { } |
|
1707
|
0 |
0 |
if ($num == -2) |
|
1725
|
0 |
0 |
if ($type eq 'plot') |
|
1730
|
0 |
0 |
if ($num < 0) { } |
|
|
0 |
0 |
elsif (abs $num - $countEstimate > $countEstimate * 0.05) { } |
|
1731
|
0 |
0 |
if ($num == -2) |
|
1770
|
0 |
0 |
if ($self->_importListFile($DB, $type) != 0) |
|
1795
|
0 |
0 |
if ($self->importList($type) != 0) |
|
1814
|
0 |
0 |
unless ($DB->connect) |
|
1829
|
0 |
0 |
if ($self->dbinfoSave) |
|
1838
|
0 |
0 |
if (-e "$$self{'moviedbOffline'}") |
|
1842
|
0 |
0 |
if (my $errline = $imdb->sanityCheckDatabase) |
|
1843
|
0 |
0 |
unless open OFF, "> $$self{'moviedbOffline'}" |
|
1849
|
0 |
0 |
if (ref $info eq 'HASH') { } |
|
1860
|
0 |
0 |
unless open OFF, "< $$self{'moviedbOffline'}" |