add tag-album and clean-playlist-files tasks, script step support, stop fix, rename fix
- New tag-album task: renames tracks to NNN format, sets ID3 tags via mutagen - New clean-playlist-files task: deletes .cue, .m3u, .nfo and similar junk files - Pipeline executor now supports script-mode steps (runs directly, no agent) - Build discography pipeline: convert-audio → clean-playlist-files → prepare → fetch → tag - Fix stop button: abort signal now kills running agent processes - Fix job manager: broadcast stopped/error events to WebSocket viewers - Fix file browser rename: delay focus to avoid context menu close race, left-align input Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
---
|
||||
name: Clean Playlist Files
|
||||
description: Recursively delete .cue, .m3u, .m3u8, .pls, .wpl, .xspf and other playlist files.
|
||||
version: 1
|
||||
mode: script
|
||||
language: bash
|
||||
triggers:
|
||||
- type: directory
|
||||
inputs:
|
||||
file_path:
|
||||
type: string
|
||||
description: Path to a directory to clean.
|
||||
args: [file_path]
|
||||
---
|
||||
|
||||
# Clean Playlist Files
|
||||
|
||||
Remove playlist and cue sheet files from a directory tree.
|
||||
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
EXTENSIONS="cue|m3u|m3u8|pls|wpl|xspf|nfo|txt|log|accurip|sfv|md5"
|
||||
|
||||
TARGET="${1:-${INPUT_FILE_PATH:-}}"
|
||||
|
||||
if [[ -z "$TARGET" ]]; then
|
||||
echo "Error: No directory path provided" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -d "$TARGET" ]]; then
|
||||
echo "Error: Not a directory: $TARGET" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
deleted=0
|
||||
|
||||
while IFS= read -r -d '' file; do
|
||||
echo "Deleting: $file"
|
||||
rm "$file"
|
||||
deleted=$((deleted + 1))
|
||||
done < <(find "$TARGET" -type f -regextype posix-extended -iregex ".*\.($EXTENSIONS)" -print0 | sort -z)
|
||||
|
||||
if [[ $deleted -eq 0 ]]; then
|
||||
echo "No playlist/cue files found in: $TARGET"
|
||||
else
|
||||
echo ""
|
||||
echo "Summary: $deleted files deleted"
|
||||
fi
|
||||
Reference in New Issue
Block a user