Skip to content

feat: guard library against wrong mounts - #1055

Merged
dialmaster merged 1 commit into
devfrom
feat/1054-library-remap-protection
Nov 21, 2026
Merged

dialmaster merged 1 commit into
devfrom
feat/1054-library-remap-protection

Conversation

@dialmaster

Copy link
Copy Markdown
Collaborator

When the downloads folder points somewhere other than the library (for example after the library was moved on the host but the volume line was not), the empty-folder check stopped protecting it once a single download landed in that folder. After that, rescans could mark every video missing and Empty trash offered to forget them. On slow shares, rescans could also stop at the 5-minute limit right after the disk walk, so each run started over and never finished.

  • Rescans always finish the walk and the row check; the time limit now covers only resolution probing and starts after the walk
  • Rescans log walk progress and hold back missing marks in a folder where fewer than half of its videos (and at least 25) were found
  • Other writers also sample 20 stored paths and treat the folder as unavailable ("not-found") when most of them are gone
  • Downloads pause while the downloads folder looks unavailable; that check is cached, runs one at a time and has a timeout
  • Rescan anyway shows how many videos it would mark missing and needs a checkbox; Empty trash no longer preselects Missing, and both trash actions ask again when most of the library is missing
  • Maintenance shows live rescan progress, files found next to videos in the database, run length and the missing count
  • Settings no longer says YOUTUBE_OUTPUT_DIR sets the volume

Refs: #1054

When the downloads folder points somewhere other than the library (for
example after the library was moved on the host but the volume line
was not), the empty-folder check stopped protecting it once a single
download landed in that folder. After that, rescans could mark every
video missing and Empty trash offered to forget them. On slow shares,
rescans could also stop at the 5-minute limit right after the disk
walk, so each run started over and never finished.

- Rescans always finish the walk and the row check; the time limit
  now covers only resolution probing and starts after the walk
- Rescans log walk progress and hold back missing marks in a folder
  where fewer than half of its videos (and at least 25) were found
- Other writers also sample 20 stored paths and treat the folder as
  unavailable ("not-found") when most of them are gone
- Downloads pause while the downloads folder looks unavailable; that
  check is cached, runs one at a time and has a timeout
- Rescan anyway shows how many videos it would mark missing and needs
  a checkbox; Empty trash no longer preselects Missing, and both trash
  actions ask again when most of the library is missing
- Maintenance shows live rescan progress, files found next to videos
  in the database, run length and the missing count
- Settings no longer says YOUTUBE_OUTPUT_DIR sets the volume

Refs: #1054
@github-actions

Copy link
Copy Markdown
Contributor

📊 Test Coverage Report

Backend Coverage

Type Coverage Status
Lines 90.92% 🟢
Statements 90.56% 🟢
Functions 89.98% 🟢
Branches 86.01% 🟢

Frontend Coverage

Type Coverage Status
Lines 90.86% 🟢
Statements 89.29% 🟢
Functions 83.87% 🟢
Branches 83.98% 🟢

Coverage Requirements

  • Minimum threshold: 70% line coverage
  • Backend: ✅ Passes
  • Frontend: ✅ Passes

Coverage report generated for commit 5a97254

@dialmaster
dialmaster merged commit b328019 into dev Nov 21, 2026
13 checks passed
@dialmaster
dialmaster deleted the feat/1054-library-remap-protection branch November 21, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant