summaryrefslogtreecommitdiffstats
path: root/apps/gallery/lib/scanner.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gallery/lib/scanner.php')
-rw-r--r--apps/gallery/lib/scanner.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/gallery/lib/scanner.php b/apps/gallery/lib/scanner.php
index 929f8b7a2e3..c8825c267eb 100644
--- a/apps/gallery/lib/scanner.php
+++ b/apps/gallery/lib/scanner.php
@@ -95,6 +95,15 @@ class OC_Gallery_Scanner {
foreach ($a as $e) {
$p .= ($p == '/'?'':'/').$e;
OC_Gallery_Album::create(OC_User::getUser(), $e, $p);
+ $arr = OC_FileCache::searchByMime('image','', OC_Filesystem::getRoot().$p);
+ $step = floor(count($arr)/10);
+ if ($step == 0) $step = 1;
+ $na = array();
+ for ($j = 0; $j < count($arr); $j+=$step) {
+ $na[] = $p.$arr[$j];
+ }
+ if (count($na))
+ self::createThumbnails($e, $na);
}
}
}