diff --git a/README.md b/README.md index 38494b6..f9fcbb5 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **Yuba** generates web-browsable catalogues from locally attached HFS+ filesystems. Its client application gathers forensic-quality data about a volume, 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 SQLite 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.8.0.2](https://www.profiteroles.org/git/p/Yuba/raw/master/Yuba.app.zip) ([Changelog](CHANGELOG.md)) +####[⇩ Download Yuba 0.8.1.0](https://www.profiteroles.org/git/p/Yuba/raw/master/Yuba.app.zip) ([Changelog](CHANGELOG.md)) ## Features diff --git a/Tester.zip b/Tester.zip index 5ae2816..b778102 100644 Binary files a/Tester.zip and b/Tester.zip differ diff --git a/Tester/Tester.php b/Tester/Tester.php index a280a2a..bdd1364 100644 --- a/Tester/Tester.php +++ b/Tester/Tester.php @@ -12,15 +12,15 @@ $bin_mediainfo = __DIR__."/bin/mediainfo"; $bin_exiftool = __DIR__."/bin/exiftool"; $bin_ffmpeg = __DIR__."/bin/ffmpeg"; $bin_qlthumb = __DIR__."/bin/ql-thumbnail"; -$bin_qlicon = __DIR__."/bin/ql-icon"; +$bin_qlicon = __DIR__."/bin/ql-icon_old"; $bin_qltool = __DIR__."/bin/qltool"; $bin_sox = __DIR__."/bin/sox"; $bin_pngquant = __DIR__."/bin/pngquant"; $bin_parallel = __DIR__."/bin/parallel"; $bin_convert = __DIR__."/bin/convert"; -$bin_zqlicon = __DIR__."/bin/zql-icon"; -$bin_zicon = __DIR__."/bin/zicon"; +$bin_zqlicon = __DIR__."/bin/ql-icon"; +$bin_zicon = __DIR__."/bin/iff"; // System tools $bin_php = "php"; @@ -100,6 +100,9 @@ if ($mode == "thumb") { $cmd['zql-icon'][] = $bin_zqlicon." --input=".$shellpath." --width=".$p['icon_size']." --height=".$p['icon_size']." --output=".$tprefix."zql-icon.png"; $cmd['zql-icon'][] = $tprefix."zql-icon.png"; + $cmd['zql-iconj'][] = $bin_zqlicon." --input=".$shellpath." --type=public.jpeg --width=".$p['icon_size']." --height=".$p['icon_size']." --output=".$tprefix."zql-iconj.jpg"; + $cmd['zql-iconj'][] = $tprefix."zql-iconj.jpg"; + $cmd['ql-icon'][] = $bin_qlicon." --input=".$shellpath." --width=".$p['icon_size']." --height=".$p['icon_size']." --output=".$tprefix."ql-icon.png"; $cmd['ql-icon'][] = $tprefix."ql-icon.png"; diff --git a/Yuba.app.zip b/Yuba.app.zip index f4b50b4..0efcac9 100644 Binary files a/Yuba.app.zip and b/Yuba.app.zip differ diff --git a/Yuba.php b/Yuba.php index c20c2f9..c54d235 100755 --- a/Yuba.php +++ b/Yuba.php @@ -127,6 +127,21 @@ if (!empty($generators)) { } } +// Parallel check +////////////////////////////////////////// + +$physicalcpu = trim(shell_exec("sysctl -n hw.physicalcpu")); + +if ($p['parallel'] > $physicalcpu) { + alert("Parallel hardware mismatch"); + echo "QUITAPP\n"; + } +if ($p['parallel'] == 1) { + $wopt_parallelmsg = "max"; + } else { + $wopt_parallelmsg = $p['parallel']; + } + // Banner ////////////////////////////////////////// @@ -138,6 +153,7 @@ echo msg($banner."\n".str_repeat("-", strlen($banner))); // System Info ////////////////////////////////////////// +echo msg("Using ".$wopt_parallelmsg." cores"); echo msg("Gathering system info..."); // Disks @@ -606,10 +622,12 @@ $dbp->exec("CREATE TABLE IF NOT EXISTS contents (fid TEXT, created INTEGER, rela if (file_exists($batchfile)) { echo ProgressBar::start($passed_file,"Running batch (".stepString().")"); - if ($p['parallel']) { + if ($p['parallel'] === 0) { + passthru("bash ".$batchfile); + } elseif ($p['parallel'] === 1) { passthru($bin_parallel." < ".$batchfile); } else { - passthru("bash ".$batchfile); + passthru($bin_parallel." -j ".$p['parallel']." < ".$batchfile); } echo ProgressBar::finish($wopt_clear); diff --git a/YubaPrefs.php b/YubaPrefs.php index efce623..1ed9a50 100644 --- a/YubaPrefs.php +++ b/YubaPrefs.php @@ -6,7 +6,7 @@ // Functions -function makeWindowString($p, $strings) { +function makeWindowString($p, $strings, $pstrings) { $conf = " # Set window title @@ -42,16 +42,23 @@ function makeWindowString($p, $strings) { hr0.path = ".__DIR__."/hr.png"." hr0.width = 380 hr0.height = 2 + + parallel.type = popup + parallel.width = 180 + parallel.default = ".$pstrings[$p['parallel']]." + "; + + foreach ($pstrings as $pstring) { + $conf .= "parallel.option = ".$pstring."\n"; + } - parallel.type = checkbox - parallel.label = Use parallel - parallel.default = ".$p['parallel']." + $conf .= " debug.type = checkbox debug.label = Verbose logging debug.default = ".$p['debug']." debug.x = 200 - debug.y = 439 + debug.y = 443 hr1.type = image hr1.path = ".__DIR__."/hr.png"." @@ -216,10 +223,19 @@ $strings[] = array("Skip","Generate","Rebuild"); $strings[] = array("Most files","Some files"); $strings[] = array("All files","Most files","Some files"); +// Parallel strings + +$physicalcpu = trim(shell_exec("sysctl -n hw.physicalcpu")); + +$pstrings = array("Sequential","Max (Not advised)"); +foreach(range(2, $physicalcpu-1) as $index) { + $pstrings[] = $index." Cores"; + } + // Launch Pashua and parse results $path = __DIR__."/bin/Pashua.app/Contents/MacOS/Pashua"; -$raw = shell_exec("echo ".escapeshellarg(makeWindowString($p, $strings))." | ".escapeshellarg($path)." - "); +$raw = shell_exec("echo ".escapeshellarg(makeWindowString($p, $strings, $pstrings))." | ".escapeshellarg($path)." - "); $result = array(); foreach (explode("\n", $raw) as $line) { preg_match('/^(\w+)=(.*)$/', $line, $matches); @@ -244,6 +260,7 @@ $result['thumbs'] = array_search($result['thumbs'],$strings[2]); $result['thumb_mode'] = array_search($result['thumb_mode'],$strings[3]); $result['icons'] = array_search($result['icons'],$strings[2]); $result['icon_mode'] = array_search($result['icon_mode'],$strings[4]); +$result['parallel'] = array_search($result['parallel'],$pstrings); // If the user didn't specify a destpath, set to default diff --git a/current_version.txt b/current_version.txt index e76123f..6b784f6 100755 --- a/current_version.txt +++ b/current_version.txt @@ -1 +1 @@ -0.8.0.2 \ No newline at end of file +0.8.1.0 \ No newline at end of file diff --git a/filetypes.php b/filetypes.php index 85b2459..85a66cc 100755 --- a/filetypes.php +++ b/filetypes.php @@ -130,11 +130,13 @@ $p['t_b']['wv'] = array("sox"); $p['t_b']['snd'] = array("sox"); $p['t_b']['voc'] = array("sox"); -$p['t_b']['mp3'] = array("sox","ql-thumbnail"); $p['t_b']['m4a'] = array("sox","ql-thumbnail"); $p['t_b']['m4b'] = array("sox","ql-thumbnail"); $p['t_b']['ogg'] = array("sox","ql-thumbnail"); +$p['t_b']['mp3'] = array(); +$p['t_b']['DS_Store'] = array(); + foreach ($p['bundles'] as $bundle) { $p['t_b'][$bundle] = array("qltool"); } $p['t_b']['*'] = "ql-thumbnail"; diff --git a/helper.php b/helper.php index 89031b9..9c79173 100755 --- a/helper.php +++ b/helper.php @@ -111,7 +111,7 @@ if ($p['thumbs'] && $ext && $ext != "DS_Store") { if (!is_dir(dirname($tfile))) { @mkdir(dirname($tfile),0777,true); dfm("mkdir ".dirname($tfile)); } - if ($ext == "DS_Store") { + if (empty($p['t_b'][$ext])) { // file extension is in the skip list $estring .= " ->t_skip"; dfm("skipping ds_store"); @@ -312,7 +312,7 @@ if ($p['icons'] && $ext != "DS_Store") { if ($ext || file_exists($pathname."/Icon\r")) { dfm("Ext or custom icon found, processing ".$pathname." with iff"); $tools = array("iff"); - } elseif (glob($globsafe."/".globstring($p['album_files']),GLOB_BRACE) && $test = glob($globsafe."/".globstring($p['cover_exts'],$p['cover_files']),GLOB_BRACE)) { + } elseif (( glob($globsafe."/".globstring($p['album_files']),GLOB_BRACE) || glob($globsafe."/*/".globstring($p['album_files']),GLOB_BRACE)) && $test = glob($globsafe."/".globstring($p['cover_exts'],$p['cover_files']),GLOB_BRACE)) { dfm("Album files and cover found, processing ".$pathname." with flacdiricon"); $cmd['flacdiricon'] = $bin_flacdiricon." ".$shellpath." ".$p['icon_size']." ".escapeshellarg(array_shift($test))." ".$tfile; $tools = array("flacdiricon"); diff --git a/web/rtc.php b/web/rtc.php index fc3e920..7062b7a 100644 --- a/web/rtc.php +++ b/web/rtc.php @@ -121,6 +121,8 @@ iframe { width: 425px; height: 550px; padding: 6px; border: 1px solid black; } div.dblist { display: none; } +.ui-slider-handle { outline: 0 none !important; } +