0.8.0.0
This commit is contained in:
@@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. Older chang
|
||||
- Move more operations into helper
|
||||
- "Open in browser" postflight
|
||||
- Clean up prefs
|
||||
- Better logic for external tools (sips can be disabled manually)
|
||||
|
||||
## [0.7.13.2]
|
||||
- Added PHP extension checks
|
||||
|
||||
2
MainMenu.nib/designable.nib
generated
2
MainMenu.nib/designable.nib
generated
@@ -548,7 +548,7 @@ Gw
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="Hk1-72-Owa">
|
||||
<rect key="frame" x="1" y="1" width="559" height="365"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textView editable="NO" importsGraphics="NO" richText="NO" verticallyResizable="YES" usesFontPanel="YES" findStyle="panel" allowsDocumentBackgroundColorChange="YES" linkDetection="YES" id="225">
|
||||
<rect key="frame" x="0.0" y="0.0" width="559" height="365"/>
|
||||
|
||||
BIN
Tester.zip
BIN
Tester.zip
Binary file not shown.
BIN
Yuba.app.zip
BIN
Yuba.app.zip
Binary file not shown.
2
Yuba.php
2
Yuba.php
@@ -889,7 +889,7 @@ foreach ($files as $splFileInfo) {
|
||||
|
||||
} elseif ($type == "dir") {
|
||||
|
||||
if (is_array($dpreview) && @$dpreview[$pathname]) {
|
||||
if (is_array(@$dpreview) && @$dpreview[$pathname]) {
|
||||
$fetch_thumb = $dbp->query("SELECT * FROM thumbs WHERE fid='".$dpreview[$pathname]."'")->fetch();
|
||||
if (@$fetch_thumb['relative_path']) {
|
||||
$stmt->BindValue(":thumb_filename",$fetch_thumb['relative_path']);
|
||||
|
||||
@@ -94,20 +94,22 @@ $p['t_files']['ffmpeg'] = array( "mkv",
|
||||
"webm" );
|
||||
|
||||
// Use sips to generate thumbnails for these files
|
||||
$p['t_files']['sips'] = array( "jpg",
|
||||
"jpeg",
|
||||
"tif",
|
||||
"tiff",
|
||||
"gif",
|
||||
"psd",
|
||||
"png",
|
||||
"heic",
|
||||
"pdf",
|
||||
"ai",
|
||||
"ps",
|
||||
"bmp",
|
||||
"pict",
|
||||
"jp2" );
|
||||
// SIPS does not currently support JPEG Orientation EXIF Tag,
|
||||
// so images will sometimes appear sideways
|
||||
//$p['t_files']['sips'] = array( "jpg",
|
||||
// "jpeg",
|
||||
// "tif",
|
||||
// "tiff",
|
||||
// "gif",
|
||||
// "psd",
|
||||
// "png",
|
||||
// "heic",
|
||||
// "pdf",
|
||||
// "ai",
|
||||
// "ps",
|
||||
// "bmp",
|
||||
// "pict",
|
||||
// "jp2" );
|
||||
|
||||
// Use sox to generate thumbnails for these files
|
||||
$p['t_files']['sox'] = array( "flac",
|
||||
@@ -238,7 +240,7 @@ foreach ($p['c_files'] as $ext) { $p['c_files'][] = strtoupper($ext); }
|
||||
foreach ($p['e_files'] as $ext) { $p['e_files'][] = strtoupper($ext); }
|
||||
foreach ($p['m_files'] as $ext) { $p['m_files'][] = strtoupper($ext); }
|
||||
foreach ($p['t_files']['ffmpeg'] as $ext) { $p['t_files']['ffmpeg'][] = strtoupper($ext); }
|
||||
foreach ($p['t_files']['sips'] as $ext) { $p['t_files']['sips'][] = strtoupper($ext); }
|
||||
//foreach ($p['t_files']['sips'] as $ext) { $p['t_files']['sips'][] = strtoupper($ext); }
|
||||
foreach ($p['t_skip'] as $ext) { $p['t_skip'][] = strtoupper($ext); }
|
||||
foreach ($p['i_skip'] as $ext) { $p['i_skip'][] = strtoupper($ext); }
|
||||
foreach ($p['p_files'] as $file) { $p['p_files'][] = strtoupper($file); }
|
||||
|
||||
32
helper.php
32
helper.php
@@ -10,12 +10,15 @@ $p = unserialize(file_get_contents($prefs_file));
|
||||
require("functions.php");
|
||||
require("filetypes.php");
|
||||
|
||||
$redirect = "2>&1";
|
||||
//$redirect = "2> /tmp/yuba/debug.log";
|
||||
|
||||
$dm = "";
|
||||
function dfm ($string, $flag = 0) {
|
||||
// dumb workaround for debug messages appearing out of order
|
||||
// bypass for single-thread to observe hangs
|
||||
//dm($string);
|
||||
//return
|
||||
// uncomment next line to revert to instant message printing
|
||||
dm($string); return;
|
||||
|
||||
global $dm;
|
||||
if ($flag == 1) {
|
||||
$dm .= str_repeat("-",33)."\n".$string."\n".str_repeat("-",33)."\n";
|
||||
@@ -52,7 +55,7 @@ $dbp->query("PRAGMA journal_mode = WAL");
|
||||
|
||||
$sbatch = array();
|
||||
|
||||
$estring = "\nBATCH: ".shortlabel(basename($pathname),20);
|
||||
$estring = "\n[BATCH] ".shortlabel(basename($pathname),20);
|
||||
|
||||
dfm("BATCH INIT ".$file.":".print_r($argv,true),2);
|
||||
|
||||
@@ -131,14 +134,11 @@ if ($p['thumbs']) {
|
||||
$cmd['ql-thumbnail'] = $bin_qlthumb." ".$shellpath." ".$tfile." public.jpeg ".$p['thumb_size']." ".$p['thumb_size']." .8";
|
||||
$cmd['qlmanage'] = $bin_qlmanage." -t -s ".$p['thumb_size']." -o ".dirname($tpfile)." ".$shellpath."; ".$bin_sips." -s format jpeg -s formatOptions 80 ".escapeshellarg($tpfile)." --out ".$tfile;
|
||||
|
||||
if (in_array($ext, $p['t_files']['sips'])) {
|
||||
$external_tool = "sips";
|
||||
} elseif (in_array($ext, $p['t_files']['ffmpeg'])) {
|
||||
$external_tool = "ffmpeg";
|
||||
} elseif (in_array($ext, $p['t_files']['sox'])) {
|
||||
$external_tool = "sox";
|
||||
} else {
|
||||
$external_tool = null;
|
||||
$external_tool = null;
|
||||
foreach ($p['t_files'] as $tool => $whitelist) {
|
||||
if (in_array($ext, $whitelist)) {
|
||||
$external_tool = $tool;
|
||||
}
|
||||
}
|
||||
dfm("external tool for ".$ext." = ".$external_tool);
|
||||
switch ($p['thumb_mode']) {
|
||||
@@ -157,7 +157,7 @@ if ($p['thumbs']) {
|
||||
if (empty($cmd[$tool])) { continue; }
|
||||
|
||||
dfm($cmd[$tool]);
|
||||
shell_exec($cmd[$tool]." 2>&1");
|
||||
shell_exec($cmd[$tool]." 2>1");
|
||||
$estring .= " ->".$tool;
|
||||
|
||||
$checksize = @filesize($tfile);
|
||||
@@ -244,7 +244,7 @@ if ($p['icons']) {
|
||||
|
||||
dfm("icon mode 2, bypassing hash check");
|
||||
$tool = "ql-icon";
|
||||
shell_exec($cmd[$tool]." 2>&1");
|
||||
shell_exec($cmd[$tool]." ".$redirect);
|
||||
$stmt->BindValue(":tool",$tool);
|
||||
dfm($cmd[$tool]);
|
||||
$estring .= " ->".$tool;
|
||||
@@ -274,7 +274,7 @@ if ($p['icons']) {
|
||||
}
|
||||
foreach ($tools as $tool) {
|
||||
if (!@filesize($tfile)) {
|
||||
shell_exec($cmd[$tool]." 2>&1");
|
||||
shell_exec($cmd[$tool]." ".$redirect);
|
||||
dfm($cmd[$tool]);
|
||||
$estring .= " ->".$tool;
|
||||
}
|
||||
@@ -375,7 +375,7 @@ if ($p['meta']) {
|
||||
dfm("creating mediainfo dump");
|
||||
$stmt = $dbp->prepare("INSERT INTO mediainfo VALUES (:fid, :info)");
|
||||
$stmt->BindValue(":fid",$fid);
|
||||
$stmt->BindValue(":info",shell_exec($bin_mediainfo." --Output=JSON ".$shellpath." 2>&1"));
|
||||
$stmt->BindValue(":info",shell_exec($bin_mediainfo." --Output=JSON ".$shellpath." ".$redirect));
|
||||
$sbatch[] = $stmt;
|
||||
$estring .= " ->minfo";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user