diff --git a/fhem/contrib/DS_Starter/50_SSFile.pm b/fhem/contrib/DS_Starter/50_SSFile.pm index ee2569aaa..c88ac5810 100644 --- a/fhem/contrib/DS_Starter/50_SSFile.pm +++ b/fhem/contrib/DS_Starter/50_SSFile.pm @@ -142,7 +142,7 @@ BEGIN { # Versions History intern my %vNotesIntern = ( - "0.6.0" => "30.10.2020 Upload files may contain ", + "0.6.0" => "30.10.2020 Upload files may contain wildcards *. ", "0.5.0" => "26.10.2020 new Setter Upload and fillup upload queue asynchronously, some more improvements around Upload ", "0.4.0" => "18.10.2020 add reqtype to addSendqueue, new Setter prepareDownload ", "0.3.0" => "16.10.2020 create Reading Hash instead of Array ", @@ -187,17 +187,23 @@ my %hmodep = ( # Ha # Versions History extern my %vNotesExtern = ( + "0.6.0" => "30.10.2020 A new Set command Upload is integrated and the fillup upload queue routine is running asynchronously.
". + "Some more improvements around Upload were done, e.g. Upload files may contain wildcards *.", "0.1.0" => "12.10.2020 initial " ); # Hints EN my %vHintsExt_en = ( - "1" => "The module integrates Synology File Station with FHEM. " + "2" => "When defining the upload target paths POSIX %-Wildcards can be used as part of the target path. ". + "This way changing upload targets can be created depending on the current timestamp.", + "1" => "The module integrates Synology File Station with FHEM. " ); # Hints DE my %vHintsExt_de = ( - "1" => "Das Modul integriert die Synology File Station in FHEM. " + "2" => encode ("utf8", "Bei der Definition der Upload Zielpfade könnnen POSIX %-Wildcards als Bestandteil des Zielpfads verwendet werden. ". + "Damit können wechselnde Uploadziele in Abhängigkeit des aktuellen Timestamps erzeugt werden."), + "1" => "Das Modul integriert die Synology File Station in FHEM. " ); # Standardvariablen @@ -1953,21 +1959,25 @@ sub exploreFiles { my $crt = time; # current runtime - ($mode, my $wait) = split ":", $mode; + ($mode, my $d) = split ":", $mode; # $d = Anzahl Tage bei Mode= nth:X my $found; for my $obj (@$allref) { # Objekte und Inhalte der Ordner auslesen für add Queue find ( { wanted => sub { my $file = $File::Find::name; my $dir = $File::Find::dir; - if("$file" =~ m/^$excl$/xs) { # File excludiert from Upload + if("$file" =~ m/^$excl$/xs) { # File excludiert from Upload Log3 ($name, 3, qq{$name - Object "$file" is excluded from Upload}); return; } - if($mode ne "full" && $data{$type}{$name}{uploaded}{"$file"}{done}) { + if($mode eq "inc" && $data{$type}{$name}{uploaded}{"$file"}{done}) { my $elapsed = ($crt - $data{$type}{$name}{uploaded}{"$file"}{ts}) / 86400; # verstrichene Zeit seit dem letzten Upload des Files in Tagen - return if($mode eq "inc" && $elapsed < -M $file); + return if($elapsed < -M $file); + } + + if($mode eq "nth") { + return if(-M $file > $d); } if(-f $file && -r $file) { @@ -2306,7 +2316,7 @@ return $out; Unterverzeichnisse werden im Standard in der Destination angelegt wenn sie nicht vorhanden sind.
Alle angegebenen Objekte sind insgesamt in " einzuschließen.

- Argumente: + Pflichtargumente:
+
+ + Optionale Argumente: +
+ +