summaryrefslogtreecommitdiff
path: root/PLUGINS
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2013-05-23 10:00:23 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2013-05-23 10:00:23 +0200
commit5b76eec1afbe435b5d1dfabaaa9546f8e400cba7 (patch)
tree6e091e9bd4d72bd31de18971c71651f7af18d4b5 /PLUGINS
parentf55aee0fc14b8085ab8fedaa9b5492eb01880014 (diff)
downloadvdr-5b76eec1afbe435b5d1dfabaaa9546f8e400cba7.tar.gz
vdr-5b76eec1afbe435b5d1dfabaaa9546f8e400cba7.tar.bz2
Added option -x to pic2mpg
Diffstat (limited to 'PLUGINS')
-rw-r--r--PLUGINS/src/pictures/HISTORY4
-rwxr-xr-xPLUGINS/src/pictures/pic2mpg10
2 files changed, 12 insertions, 2 deletions
diff --git a/PLUGINS/src/pictures/HISTORY b/PLUGINS/src/pictures/HISTORY
index 7308927e..db566301 100644
--- a/PLUGINS/src/pictures/HISTORY
+++ b/PLUGINS/src/pictures/HISTORY
@@ -87,3 +87,7 @@ VDR Plugin 'pictures' Revision History
2013-03-31: Version 2.0.0
- Official release.
+
+2013-07-01:
+
+- Added option -x to pic2mpg.
diff --git a/PLUGINS/src/pictures/pic2mpg b/PLUGINS/src/pictures/pic2mpg
index 2ba8de78..f29ef1e5 100755
--- a/PLUGINS/src/pictures/pic2mpg
+++ b/PLUGINS/src/pictures/pic2mpg
@@ -7,7 +7,7 @@
#
# See the README file for copyright information and how to reach the author.
#
-# $Id: pic2mpg 2.5 2013/02/17 13:17:13 kls Exp $
+# $Id: pic2mpg 3.1 2013/05/23 10:00:23 kls Exp $
use File::Path;
use File::Spec;
@@ -23,9 +23,10 @@ Options: -f Force conversion
-o percent overscan in percent
-s size Screen size (WIDTHxHEIGHT, default is 1920x1080)
-v num Verbose (0=none, 1=list files, 2=detailed)
+ -x dir[,...] eXclude the given directories
};
-getopts("fho:s:v:") || die $Usage;
+getopts("fho:s:v:x:") || die $Usage;
die $Usage if $opt_h;
@@ -33,6 +34,7 @@ $Force = $opt_f;
$Overscan = $opt_o || 0;
$Size = $opt_s || "1920x1080";
$Verbose = $opt_v;
+@Exclude = split(',', $opt_x || "");
$ListFiles = $Verbose >= 1;
$Detailed = $Verbose >= 2;
@@ -85,7 +87,11 @@ chdir($PICDIR) || die "$PICDIR: $!\n";
@Pictures = `find -type f | sort`;
chomp(@Pictures);
+PIC:
for $pic (@Pictures) {
+ for (@Exclude) {
+ next PIC if ($pic =~ /\/$_\//);
+ }
my $mpg = "$MPGDIR/$pic.mpg";
if ($Force || !-e $mpg || -M $mpg > -M $pic) {
(my $dir = $mpg) =~ s/\/[^\/]*$//;