fix: match inventory filters on basename only

This commit is contained in:
Mikei386
2026-08-24 12:04:09 +02:00
parent 2a20426cab
commit d50df78441
4 changed files with 3 additions and 3 deletions
Binary file not shown.
+1 -1
View File
@@ -8,7 +8,7 @@
<!ENTITY pluginLOC "/boot/config/plugins/&name;">
<!ENTITY emhttpLOC "/usr/local/emhttp/plugins/&name;">
<!ENTITY txzURL "http://192.168.1.2:4000/michael/MUA-Mikes-Unraid-Agent/raw/branch/main/dist/mua-2026.08.24.r020-x86_64-1.txz">
<!ENTITY txzSHA256 "0b6ec06c05217942a407308c3271dd4d3ce0771d2ae859f7b4c8742307e7e882">
<!ENTITY txzSHA256 "b56b439af042bd3c3ef978367adacc0723b839058915f01b40cd4b5ddddfc55e">
]>
<PLUGIN name="&name;"
+1 -1
View File
@@ -284,7 +284,7 @@ function files_inventory(
$relative = $directory_relative === '' ? $name : $directory_relative . '/' . $name;
$is_link = is_link($full);
$is_dir = !$is_link && is_dir($full);
$matches = $needle === '' || mb_stripos($relative, $needle) !== false;
$matches = $needle === '' || mb_stripos($name, $needle) !== false;
$selected = $matches;
$scanned++;
if ($scanned > $max_scanned) {
+1 -1
View File
@@ -542,7 +542,7 @@ export const TOOLS: ToolDef[] = [
properties: {
share: str("Exact Unraid share name, for example Audiobooks"),
relative_path: str("Optional path below the share; never use /mnt/user or an absolute path"),
name_contains: str("Optional case-insensitive path fragment, for example 'drei'. It filters returned entries; use a second call on a matched directory to list its descendants"),
name_contains: str("Optional case-insensitive basename fragment, for example 'drei'. It filters returned entries; use a second call on a matched directory to list its descendants"),
max_depth: int("Maximum directory depth below relative_path (1-20, default 10)"),
max_entries: int("Maximum returned entries (1-5000, default 2000)"),
include_files: { type: "boolean", description: "Include files (default true)" },