Exclude media-free subtrees from the destination picker too

The previous leaf-item fix only caught a single stray file with no
subfolders - it missed a course whose bundled extras (downloaded
source code, a Python virtualenv/dependency dump, project assets)
have plenty of subfolders but no video/audio anywhere in them, which
still left the course itself, and every one of those subfolders,
selectable as destinations. Add a subtree-wide media check (bounded
depth) so a folder with subfolders but no media anywhere beneath it is
excluded the same way, while a folder that still has a real course's
media somewhere inside it - or is simply empty, e.g. a freshly-created
category - stays pickable.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-24 13:21:39 -04:00
co-authored by Claude Sonnet 5
parent 62bb5e1318
commit 7fbe63e05c
2 changed files with 55 additions and 13 deletions
+9 -6
View File
@@ -107,12 +107,15 @@ silently stay blank instead of erroring.
dropdown and typing just the new folder's own name, with a live "Will
create: X/Y" preview so the resulting path is confirmed before applying -
the same picker Manage Library's Move action uses. The picker excludes
actual course/item folders, not just organizational ones - including a
leaf folder holding a single non-video/audio file (an ebook, an
audiobook in a format this app doesn't play, etc.) that Library
browsing's own course detection wouldn't catch either, since there's no
video/audio file to key off. Nothing on disk moves until you review and
hit Apply. Matching ignores common noise (e-learning
actual course/item folders, not just organizational ones: a leaf folder
holding a single non-video/audio file (an ebook, an audiobook in a
format this app doesn't play, etc.), and a folder whose whole subtree
has no video/audio anywhere in it at all (a course's bundled source
code, a Python virtualenv, project assets, ...) even though it has
plenty of subfolders - both cases Library browsing's own course
detection wouldn't catch either, since there's no video/audio file to
key off. Nothing on disk moves until you review and hit Apply. Matching
ignores common noise (e-learning
platform names, release/distribution-group tags, dates) via a stopword
list, and beyond that treats a match against a folder's own deliberate
name as always stronger evidence than a word only borrowed from a