diff --git a/README.md b/README.md
index 88c4589..5d53294 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
**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.1](http://www.profiteroles.org/downloads/Yuba_0.7.12.1.zip)**
+* **⇩ [Download Yuba 0.7.12.2](http://www.profiteroles.org/downloads/Yuba_0.7.12.2.zip)**
## Features
diff --git a/Yuba.php b/Yuba.php
index 6f659f7..cd51c8e 100755
--- a/Yuba.php
+++ b/Yuba.php
@@ -83,6 +83,8 @@ $bin_exiftool = __DIR__."/bin/exiftool";
$bin_ffmpeg = __DIR__."/bin/ffmpeg";
$bin_qlthumb = __DIR__."/bin/ql-thumbnail";
$bin_qltool = __DIR__."/bin/qltool";
+$bin_magick = __DIR__."/bin/magick";
+$bin_pngcrush = __DIR__."/bin/pngcrush";
$bin_vips = "vipsthumbnail";
// Logfile
@@ -593,7 +595,7 @@ if ($p['thumbs']) {
$cmd['sips'] = "sips -s format jpeg -s formatOptions 80 --resampleHeightWidthMax ".$p['thumb_size']." ".$shellpath." --out ".$tfile;
$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']/2)." ".($p['thumb_size']/2)." | base64 --decode > ".$tpfile;
+ $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;
$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'];
diff --git a/bin/liblibpng.dylib b/bin/liblibpng.dylib
new file mode 100755
index 0000000..5c3dd22
Binary files /dev/null and b/bin/liblibpng.dylib differ
diff --git a/bin/magick b/bin/magick
new file mode 100755
index 0000000..be3c64a
Binary files /dev/null and b/bin/magick differ
diff --git a/bin/pngcrush b/bin/pngcrush
new file mode 100755
index 0000000..11a2430
Binary files /dev/null and b/bin/pngcrush differ
diff --git a/version.txt b/version.txt
index 76645e5..b8b4527 100755
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-0.7.12.1
\ No newline at end of file
+0.7.12.2
\ No newline at end of file
diff --git a/web/rtc.php b/web/rtc.php
index a4f4974..392ed3a 100644
--- a/web/rtc.php
+++ b/web/rtc.php
@@ -4,7 +4,7 @@
// Yuba RTC Browser
/////////////////////////////////////////////////////////////////
-$browser_version = "0.7.10.5";
+$browser_version = "0.7.12";
require "togggle.php";
require "lib/ref/ref.php";
@@ -286,11 +286,22 @@ function breadcrumbs($zpath, $pathname) {
}
function shortlabel($filename, $max = 40) {
+ if (strlen($filename) > $max) {
+ $prefix = substr($filename, 0, floor($max*.66));
+ $suffix = substr($filename, -floor($max*.33));
+ $return = $prefix."...".$suffix;
+ } else {
+ $return = $filename;
+ }
+ return $return;
+ }
+
+function mb_shortlabel($filename, $max = 40) {
if (mb_strlen($filename, mb_detect_encoding($filename)) > $max) {
// more work is needed to figure out what is going on with non EN chars
//echo "(-) ";
$prefix = mb_substr($filename, 0, floor($max*.66), mb_detect_encoding($filename));
- $suffix = substr($filename, -floor($max*.33));
+ $suffix = mb_substr($filename, -floor($max*.33));
$return = $prefix."...".$suffix;
} else {
$return = $filename;
@@ -338,21 +349,20 @@ if ($db_file) {
$pid = $dbo->query("SELECT pid FROM family WHERE (rowid=2)")->fetch()['pid'];
// handle special strings
$view['opts'] = unserialize($view['opts']);
- $view['qlmanage'] = "hidden"; //array($view['qlmanage']);
- $view['profile'] = "hidden"; //array($view['profile']);
+ $view['qlmanage'] = array($view['qlmanage']);
+ $view['profile'] = array($view['profile']);
if ($view['details']) {
$view['details'] = unserialize($view['details']);
}
if (substr($view['disks'],0,5) == "parseString(utf8_for_xml($view['disks']));
- $view['disks'] = "hidden";
+ $view['disks'] = $parser->parseString(utf8_for_xml($view['disks']));
} else {
- $view['disks'] = "hidden";
+ $view['disks'] = $view['disks'];
}
if (substr($view['diskutil'],0,5) == "parseString(utf8_for_xml($view['diskutil']));
} else {
- $view['diskutil'] = "hidden";
+ $view['diskutil'] = $view['diskutil'];
}
if ($view['vdisks']) {
$view['vdisks'] = $parser->parseString(utf8_for_xml($view['vdisks']));
@@ -466,7 +476,17 @@ if ($db_file) {
$width = $row_a['thumb_width'];
$height = $row_a['thumb_height'];
$realfile = dirname($db_file).$row_a['thumb_filename'];
- $icon = "";
+ if (array_key_exists("thumb_tool",$row_a)) {
+ if ($row_a['thumb_tool'] == "sips" || $row_a['thumb_tool'] == "ffmpeg" || $row_a['thumb_tool'] == "ql-thumbnail") {
+ // put a border around images that are not icons
+ $border = "id='thumb'";
+ } else {
+ $border = "";
+ }
+ } else {
+ $border = "id='thumb'";
+ }
+ $icon = "
";
} elseif ($row_a['Type'] == "dir") {
$icon = "
";
} else {
@@ -562,8 +582,13 @@ if ($db_file) {
ref::config('expLvl', 2);
if ($row_d) {
- r(json_decode(json_encode(simplexml_load_string(utf8_encode($row_d['info']))))->File->track);
- }
+
+ if (substr($row_d['info'],0,5) == "File->track);
+ } else {
+ r(json_decode(utf8_encode($row_d['info']), true)['media']['track']);
+ }
+ }
echo "";
@@ -627,7 +652,17 @@ if ($db_file) {
$height = $icon_size;
}
$realfile = dirname($db_file).$item['thumb_filename'];
- $icon = "";
+ if (array_key_exists("thumb_tool",$item)) {
+ if ($item['thumb_tool'] == "sips" || $item['thumb_tool'] == "ffmpeg" || $item['thumb_tool'] == "ql-thumbnail") {
+ // put a border around images that are not icons
+ $border = "id='thumb'";
+ } else {
+ $border = "";
+ }
+ } else {
+ $border = "id='thumb'";
+ }
+ $icon = "
";
} elseif ($item['Type'] == "dir") {
$icon = "
";
} else {
@@ -646,7 +681,7 @@ if ($db_file) {
echo " ";
}
- echo htmlentities(shortlabel($item['Filename']));
+ echo htmlentities(mb_shortlabel($item['Filename']));
echo "";
@@ -720,8 +755,7 @@ if ($db_file) {
foreach ($sorted_bundles as $key => $bundle) {
echo "