summaryrefslogtreecommitdiff
path: root/Tools/master-timer/process_summary.pl
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-08-06 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-08-06 18:00:00 +0200
commitf1d1c9849c8e27cccb46cf9c0d0ccb59da3f91f9 (patch)
treeb5a5f73f7b7595c7371cab1fc11f2ea60aa2b392 /Tools/master-timer/process_summary.pl
parent8f9cc68f76c4fd0960f919a77fb16a6455922deb (diff)
downloadvdr-patch-lnbsharing-f1d1c9849c8e27cccb46cf9c0d0ccb59da3f91f9.tar.gz
vdr-patch-lnbsharing-f1d1c9849c8e27cccb46cf9c0d0ccb59da3f91f9.tar.bz2
Version 0.90vdr-0.90
- Modified the display of the channel group separators (thanks to Markus Lang for this suggestion). - Added support for replaying DVDs (thanks to Andreas Schultz). See INSTALL for instructions on how to compile VDR with DVD support. - Fixed replay progress display in case replay is paused while watching an ongoing recording. - Ringbuffer uses semaphores to signal empty/full conditions. - Fixed calculating the timeout value in cFile::FileReady() (thanks to Wolfgang Henselmann-Weiss).
Diffstat (limited to 'Tools/master-timer/process_summary.pl')
-rwxr-xr-xTools/master-timer/process_summary.pl79
1 files changed, 79 insertions, 0 deletions
diff --git a/Tools/master-timer/process_summary.pl b/Tools/master-timer/process_summary.pl
new file mode 100755
index 0000000..ebe6300
--- /dev/null
+++ b/Tools/master-timer/process_summary.pl
@@ -0,0 +1,79 @@
+#!/usr/bin/perl -w
+
+$dir = "/home/ms/.master-timer";
+
+open (FI,"$dir/done") or die "Can't open \"done\"\n";
+while (<FI>)
+ {
+ chomp;
+ if ($_)
+ {
+ ($title,$subtitle) = split (/\|/,$_,2);
+ $Done{$title}{$subtitle}=1;
+ }
+ }
+close (FI);
+
+&traverse('/video');
+
+if ($hit)
+ {
+ rename ("$dir/done","$dir/done.bak");
+ open (FO,">$dir/done");
+ foreach $title (sort keys %Done)
+ {
+ foreach $subtitle (sort keys %{%Done->{$title}})
+ {
+ print FO "$title\|$subtitle\n";
+ }
+ }
+ }
+
+sub traverse
+ {
+ local($dir) = shift;
+ local($path);
+ unless (opendir(DIR, $dir))
+ {
+ warn "Can't open $dir\n";
+ closedir(DIR);
+ return;
+ }
+ foreach (readdir(DIR))
+ {
+ next if $_ eq '.' || $_ eq '..';
+ $path = "$dir/$_";
+ if (-d $path) # a directory
+ {
+ &traverse($path);
+ }
+ if ($_ eq "summary.vdr")
+ {
+ open (FI,"$path") or die "Can't open \"$path\"\n";
+ @lines = <FI>;
+ close (FI);
+ if ($lines[0] =~ /^Title\:\s\"(.*)\"/)
+ {
+ @titles = split (/\~/,$1);
+ if ($lines[2] && $lines[2] =~ /^Subtitle\:\s\"(.*)\"/)
+ {
+ @subtitles = split (/\~/,$1);
+ foreach $num (0 .. $#titles)
+ {
+ if ($titles[$num] && $subtitles[$num])
+ {
+ if (!$Done{$titles[$num]}{$subtitles[$num]})
+ {
+ $Done{$titles[$num]}{$subtitles[$num]}=1;
+ $hit = 1;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ closedir(DIR);
+ }
+
+