From 3a27d6cf70acbb2a26e3e8b85dc6f0c8e6cc8666 Mon Sep 17 00:00:00 2001 From: Morgan Blackthorne Date: Tue, 19 May 2026 15:22:15 -0700 Subject: [PATCH 1/2] Skip multi-location videos in list renames --script mode Previously, --script mode would silently emit a mv command for locations[0] only when a video had multiple file locations, ignoring the rest. Since the right action for multi-location entries is ambiguous, skip them entirely in script mode so the generated commands are always safe to run as-is. Output mode already shows a WARNING for these entries. Co-Authored-By: Claude Sonnet 4.6 --- plexadm/cli.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plexadm/cli.py b/plexadm/cli.py index 9f7e48a..562449f 100644 --- a/plexadm/cli.py +++ b/plexadm/cli.py @@ -514,6 +514,9 @@ def list_renames(args: argparse.Namespace) -> int: if not any(filter_text in entry for entry in haystack): continue + if args.script and len(locations) > 1: + continue + filename = Path(locations[0]).name match_found = any(video.title in location for location in locations) From 17f1f7ae8e78dbe16732dfa8271221881d00b4e1 Mon Sep 17 00:00:00 2001 From: Morgan Blackthorne Date: Tue, 19 May 2026 15:26:40 -0700 Subject: [PATCH 2/2] Skip non-ASCII titles in list renames MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Titles containing non-ASCII characters (e.g. accented letters) cannot be represented safely in filenames on most filesystems; they typically get mangled to '?' on disk. The existing '?' check only catches literal question marks in the Plex title, not this case. Add isascii() to the exclusion guard so titles like 'Ménage á Trois' are skipped rather than generating a mv command that would produce a broken filename. Co-Authored-By: Claude Sonnet 4.6 --- plexadm/cli.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plexadm/cli.py b/plexadm/cli.py index 562449f..56ac5d3 100644 --- a/plexadm/cli.py +++ b/plexadm/cli.py @@ -526,6 +526,7 @@ def list_renames(args: argparse.Namespace) -> int: or "PPV" in filename or " PPV " in locations[0] or "?" in video.title + or not video.title.isascii() ): match_found = True