Add full-scan mode, persist password in DB, fix channel re-check URLs, SRT subs, cookie clear, UI fixes

- Full-scan download toggle: omits --break-on-existing so all unarchived
  videos are fetched regardless of order, filling gaps in partial archives
- Filter "Aborting remaining downloads" from job logs (break-on-existing noise)
- Password hash moved from config.toml to SQLite settings table; survives
  git checkouts and rebuilds. config.toml and yt-offline.db added to .gitignore;
  config auto-generated on first run if absent
- Channel re-check URLs derived from folder name (/@handle or /channel/UCxxx)
  instead of info.json's canonical channel_url, preventing duplicate UCxxx folders
- SRT subtitles detected by library scanner and served via /api/sub-vtt/* endpoint
  that converts to WebVTT on the fly; browser <track> element can now play them
- Cookie clear button in both desktop and web UI (DELETE /api/cookies)
- Per-job X close button on finished download jobs in desktop GUI
- Fix widget ID clash when multiple download jobs are shown (push_id per job)
- Watched videos excluded from Continue Watching list and badge count
- settings table added to SQLite schema (key/value store)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Luna 2026-05-21 05:49:55 -07:00
parent 5242b06ee5
commit 1d72069913
10 changed files with 450 additions and 127 deletions

View file

@ -213,8 +213,10 @@ fn collect_raw_videos(entries: impl Iterator<Item = std::fs::DirEntry>) -> Vec<R
if !path.is_file() { continue; }
let file_name = entry.file_name().to_string_lossy().into_owned();
// Subtitles have stems like "Title [id].en.vtt" — strip the .vtt and trailing .lang
if let Some(sub_stem) = file_name.strip_suffix(".vtt") {
// Subtitles: "Title [id].en.vtt" or "Title [id].en.srt" — strip ext then .lang
let sub_stem = file_name.strip_suffix(".vtt")
.or_else(|| file_name.strip_suffix(".srt"));
if let Some(sub_stem) = sub_stem {
if let Some(dot) = sub_stem.rfind('.') {
let lang = sub_stem[dot + 1..].to_string();
let video_stem = sub_stem[..dot].to_string();