diff --git a/README.md b/README.md index 5d53294..1a16a8c 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,14 @@ **Yuba** generates a web-browsable SQLite database from an HFS+ filesystem. Its client application gathers forensic-quality data about a locally attached disk, properly interpreting bundles, reading Spotlight data, Finder flags, labels, and other contextual information. It can generate hashes, thumbnails, and gather 3rd party metadata with exiftool and mediainfo. Yuba's filesystem catalogues are comprehensive, lightweight, optimized for massive (1 million+) trees, and reflect incremental changes to contents and metadata. A server-side PHP script is provided, which allows familiar, Finder-style browsing of a catalogue. -* **⇩ [Download Yuba 0.7.12.2](http://www.profiteroles.org/downloads/Yuba_0.7.12.2.zip)** +* **⇩ [Download Yuba 0.7.12.3](http://www.profiteroles.org/downloads/Yuba_0.7.12.3.zip)** ## Features -* Recursive directory scanning -* Properly interprets bundles -* Uses native macOS methods -* Spotlight metadata and icons +* Scans with RecursiveDirectoryIterator +* Uses native macOS methods and CLI tools * Caches assets for re-scans -* Optional file hashes +* Identifies the most useful information about a file * Tested with large filesystems ## Screenshots diff --git a/Yuba.php b/Yuba.php index cd51c8e..2b22f12 100755 --- a/Yuba.php +++ b/Yuba.php @@ -596,6 +596,8 @@ if ($p['thumbs']) { $cmd['ffmpeg'] = $bin_ffmpeg." -ss $(( $(".$bin_mediainfo." --Inform='Video;%Duration%' ".$shellpath." | cut -d'.' -f1) / 10000 )) -i ".$shellpath." -vframes 1 -filter:v scale='400:-1' -q:v 3 ".$tfile; $cmd['ql-thumbnail'] = $bin_qlthumb." ".$shellpath." ".$tfile." public.jpeg ".$p['thumb_size']." ".$p['thumb_size']." .8"; $cmd['qltool'] = $bin_qltool." di ".$shellpath." ".$p['thumb_size']." ".$p['thumb_size']." | base64 --decode | ".$bin_magick." convert - -resize 50% -strip -trim +repage -define png:compression-level=9 ".$tpfile; + // qltool thumbs are double size with half the pixels + // repage crops thumbs to edge (match sips/ffmpeg thumbs) $cmd['qlmanage'] = "qlmanage -ti -f ".floor($p['thumb_size']/128)." -o /tmp/ ".$shellpath."; mv ".$tmp_path." ".$tpfile; $cmd['vips'] = $bin_vips." ".$shellpath." -o ".$tfile."[Q=90,optimize_coding] --size=".$p['thumb_size']; @@ -627,23 +629,26 @@ if ($p['thumbs']) { break; } + $stmt->BindValue(":fid",$fid); + $stmt->BindValue(":created",time()); + // store the attempt in the DB so we don't try to generate thumbs for the same fid multiple times + foreach ($priority as $tool) { if (@$cmd[$tool]) { + $stmt->BindValue(":tool",$tool); shell_exec($cmd[$tool]." 2>&1"); msg($cmd[$tool]); if (is_file($fmt[$tool]) && @filesize($fmt[$tool])) { - $stmt->BindValue(":fid",$fid); - $stmt->BindValue(":created",time()); - $stmt->BindValue(":tool",$tool); $stmt->BindValue(":relative_path",substr($fmt[$tool], strlen($bpath))); list($width, $height) = getimagesize($fmt[$tool]); $stmt->BindValue(":width",$width); $stmt->BindValue(":height",$height); - $stmt->execute(); break; } } } + + $stmt->execute(); } diff --git a/version.txt b/version.txt index b8b4527..42060ce 100755 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.7.12.2 \ No newline at end of file +0.7.12.3 \ No newline at end of file