Skip to content

Commit

Permalink
Ignore Apple ._* files
Browse files Browse the repository at this point in the history
  • Loading branch information
Vegz78 authored Jun 4, 2022
1 parent 7640428 commit 38ab12d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gruvi.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
$CAPTIONS = True; //True = Captions ON, False = Captions OFF
$GRUVI_LOGO = True; //True = GRUVI logo as first image = ON, False = GRUVI logo OFF
$IMG_SOURCE = array("/mnt/Path_to_image_folder1", "/mnt/Path_to_image_folder2"); //Path to one or more image folders
$SOURCE_WEIGHT = array(0.3, 0.7); //Relative weights between the above chosen image folders
$SOURCE_WEIGHT = array(0.3, 0.7); //Relative weights between the above chosen image folders, must be as many weights as the
//number of folders above and add up to 1

$URL_ROOT = 'http://192.168.x.y:9000/html/'; //Host web server address on internal LMS web server
//$URL_ROOT = 'http://192.168.x.y/'; //Host web server address on most independent web serversr
Expand Down Expand Up @@ -186,7 +187,7 @@
$fileNameArray = array();
$Directory = new RecursiveDirectoryIterator($IMG_SOURCE[$x]);
$Iterator = new RecursiveIteratorIterator($Directory);
$Regex = new RegexIterator($Iterator, '/^.+(.jpe?g)$/i', RecursiveRegexIterator::GET_MATCH);
$Regex = new RegexIterator($Iterator, '/^(?!._).+(.jpe?g)$/i', RecursiveRegexIterator::GET_MATCH);

foreach($Regex as $name => $Regex) {
$fileNameArray[] = $name;
Expand Down

0 comments on commit 38ab12d

Please sign in to comment.