This commit is contained in:
2019-10-19 07:49:11 -07:00
parent 6edb46cc86
commit 4c161b0526
6 changed files with 31 additions and 18 deletions

View File

@@ -2,10 +2,11 @@
All notable changes to this project will be documented in this file. Older changes are summarized on individual commits.
## [0.8.0.2]
- Tweaks to directory icons
- Tweaks to directory and bundle icons
- Output redirection fixes
- Thumbnail bindings
- "Add to existing" prefs option
- Fixed a fid bug introduced in 0.8.0.0
## [0.8.0.1]
- Move batchfile generation to Prescan

Binary file not shown.

Binary file not shown.

View File

@@ -461,8 +461,6 @@ foreach ($files as $splFileInfo) {
if ($p['thumbs'] || $p['icons'] || $p['meta'] || $p['hash'] || $p['contents'] || $p['spotlight']) {
$parts = array();
$parts[] = $bin_php;
$parts[] = escapeshellarg(realpath("helper.php"));
@@ -765,18 +763,8 @@ foreach ($files as $splFileInfo) {
// Pool
if ($type == "dir") {
if ($type == "file") {
unset($fetch_icon);
$fetch_icon = @$dbp->query("SELECT * FROM icons WHERE fid='".$pid."'")->fetch();
if (@$fetch_icon['relative_path']) {
$stmt->BindValue(":icon_filename",$fetch_icon['relative_path']);
$stmt->BindValue(":icon_tool",$fetch_icon['tool']);
}
} elseif ($type == "file") {
$fetch_icon = @$dbp->query("SELECT * FROM icons WHERE fid='".$fid."'")->fetch();
if (@$fetch_icon['relative_path']) {
$stmt->BindValue(":icon_filename",$fetch_icon['relative_path']);
@@ -808,6 +796,27 @@ foreach ($files as $splFileInfo) {
$stmt->BindValue(":thumb_filename",null);
}
} else {
unset($fetch_icon, $fetch_thumb);
$fetch_icon = @$dbp->query("SELECT * FROM icons WHERE fid='".$pid."'")->fetch();
if (@$fetch_icon['relative_path']) {
$stmt->BindValue(":icon_filename",$fetch_icon['relative_path']);
$stmt->BindValue(":icon_tool",$fetch_icon['tool']);
}
$fetch_thumb = $dbp->query("SELECT * FROM thumbs WHERE fid='".$pid."'")->fetch();
if (@$fetch_thumb['relative_path']) {
$stmt->BindValue(":thumb_filename",$fetch_thumb['relative_path']);
$stmt->BindValue(":thumb_width",$fetch_thumb['width']);
$stmt->BindValue(":thumb_height",$fetch_thumb['height']);
$stmt->BindValue(":thumb_tool",$fetch_thumb['tool']);
} else {
$stmt->BindValue(":thumb_filename",null);
}
}
// ------------------------------------------------ //

View File

@@ -128,6 +128,8 @@ $p['t_b']['m4a'] = array("sox","ql-thumbnail");
$p['t_b']['m4b'] = array("sox","ql-thumbnail");
$p['t_b']['ogg'] = array("sox","ql-thumbnail");
foreach ($p['bundles'] as $bundle) { $p['t_b'][$bundle] = array("qltool"); }
$p['t_b']['*'] = "ql-thumbnail";
// Don't make icons for these files
@@ -303,7 +305,7 @@ foreach (array_merge($mb['t'],$mb['a']) as $item) {
$ibuild[] = ":".$item;
}
unset($item);
unset($item, $bundle, $ext, $file);
// Album dirs //////////////////////////////////////////

View File

@@ -90,7 +90,7 @@ dfm("BATCH INIT ".$file.":".print_r($argv,true),2);
// Thumbs //////////////////////////////////////////
thumbs:
if ($p['thumbs'] && $btype == "file" && $ext != "DS_Store") {
if ($p['thumbs'] && $ext && $ext != "DS_Store") {
dfm("THUMBS",1);
@@ -162,6 +162,7 @@ if ($p['thumbs'] && $btype == "file" && $ext != "DS_Store") {
$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;
$cmd['qltool'] = $bin_qltool." dp ".$shellpath." ".$p['thumb_size']." ".$p['thumb_size']." | base64 --decode | ".$bin_convert." - -scale 50% ".$tfile;
switch ($p['thumb_mode']) {
case 0: // most files
@@ -307,8 +308,8 @@ if ($p['icons'] && $ext != "DS_Store") {
if ($btype == "dir") {
dfm($pathname." is a dir, proceeding with directory check");
$stmt->BindValue(":fid",$fid);
if (file_exists($pathname."/Icon\r")) {
dfm("Custom icon found, processing ".$pathname." with qltool");
if ($ext || file_exists($pathname."/Icon\r")) {
dfm("Ext or custom icon found, processing ".$pathname." with qltool");
$tools = array("qltool");
} elseif (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");