Remove unreliable duplicate-lesson-file matching
Filename-similarity matching within a folder can't distinguish a real
re-download duplicate from a course that splits one topic across
several numbered files ("...Part 1"/"...Part 2", "-1"/"-2"/"-3") -
both look like near-100% matches by name alone, and the latter is a
common, completely normal pattern. This produced hundreds of false
positives in practice. Removes Duplicate Lesson Files entirely
(detection function, its two API routes, and the File Management UI
section); whole-course-folder matching (Duplicate Courses) is
unaffected and stays the only duplicate scan in the app.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -185,20 +185,17 @@ silently stay blank instead of erroring.
|
||||
difference doesn't hide a real duplicate. Groups by similarity (union of
|
||||
any two courses over the threshold, transitively) rather than showing
|
||||
raw pairs; each course in a group gets a one-click Hide, or a **Delete**
|
||||
that permanently removes it from disk (confirmed with the full path
|
||||
before it runs). A group can also be marked **"Not a duplicate"** if the
|
||||
match is wrong, which excludes that specific pair from future scans
|
||||
without touching anything else that happens to match one of those
|
||||
courses; ignored pairs are listed (and reversible) under "Ignored
|
||||
matches," and persist through backup/restore alongside hidden paths and
|
||||
Next Up.
|
||||
- *Duplicate Lesson Files*: the same idea one level down - media files
|
||||
sitting in the same folder that look like the same lesson downloaded
|
||||
twice (e.g. a re-download that landed alongside the original instead of
|
||||
replacing it). Compares only within a folder, at a higher match
|
||||
threshold than Duplicate Courses, so two different lessons on a similar
|
||||
topic don't get flagged; shares its ignore list with Duplicate Courses.
|
||||
Delete here removes a single file, not a whole course.
|
||||
that permanently removes it from disk (the one destructive action in the
|
||||
whole app - confirmed with the full path before it runs). A group can
|
||||
also be marked **"Not a duplicate"** if the match is wrong, which
|
||||
excludes that specific pair from future scans without touching anything
|
||||
else that happens to match one of those courses; ignored pairs are
|
||||
listed (and reversible) under "Ignored matches," and persist through
|
||||
backup/restore alongside hidden paths and Next Up. (Matching is
|
||||
deliberately scoped to whole course folders, not individual lesson
|
||||
files - courses that split one topic across several numbered files,
|
||||
e.g. "...Part 1"/"...Part 2", look just as similar by name as a genuine
|
||||
re-download, so file-level matching wasn't reliable enough to keep.)
|
||||
- *Clean Up Stale References*: finds entries in the hidden-paths list,
|
||||
Next Up queue, Favorites, or Recently Viewed history that point at a path
|
||||
no longer on disk - normally from renaming/moving/deleting a course
|
||||
|
||||
Reference in New Issue
Block a user