This release moves channel management from a flat file to the database (with an enabled flag), makes video discovery more reliable by using canonical channel IDs and explicit “Videos” tab selection, adds a storage status indicator in the UI, and introduces a daily job to backfill metadata from your download archive. It also adds GitHub Actions CI and expands both backend and frontend tests, improving reliability and visibility.
Changes
- Database/migrations
- Add enabled BOOLEAN NOT NULL DEFAULT false to channels.
- Migration seeds enabled=true using config/channels.list, trims URL CRs, and backups the list file; marked irreversible.
- server/models/channel.js: add enabled field.
- Backend
- New server/modules/archiveModule.js to read config/complete.list.
- Channel pipeline refactor in channelModule.js:
- Canonicalize channel URLs from channel_id (UU→UC), normalize handle URLs.
- Prefer “Videos” tab entries; exclude Shorts; dynamic fetch size based on recency.
- Upsert channels by channel_id, backfill legacy rows found by URL.
- Generate temp channels file from DB for yt-dlp auto-downloads.
- Better caching, error handling, and thumbnail processing.
- downloadModule.js: use DB-generated channel list, cleanup temp files, add --extractor-args youtubetab:tab=videos;sort=dd.
- jobModule.js: daily scheduled backfill from complete.list + jobs/info/*.info.json; upsert to channelvideos when saving jobs.
- videosModule.js: use LEFT JOIN and COALESCE to sort items without job rows.
- configModule.js: add getStorageStatus() via df -B 1 on /usr/src/app/data.
- server.js routes:
- GET /getchannels -> reads enabled channels from DB.
- POST /updatechannels -> enables/disables channels.
- POST /addchannelinfo -> normalizes + stores new channel.
- GET /storage-status -> returns disk usage.
- GET /getchannelvideos/:channelId -> returns richer response with cache/yt_dlp source, lastFetched.
- Frontend
- New StorageStatus chip in App.tsx header; mobile/desktop behavior with tooltip/snackbar.
- Channel Manager: confirm deletes, scrolling, non-mutating sorts, normalized URL handling, better testability (ids), and layout improvements.
- Channel Videos: remove client-side Shorts filter (now server-side), freshness chip, clearer loading state, “Download Selected” label.
- Videos Page: error alert on fetch failure; filter menu test ids; stable behavior in mobile/desktop.
- Remove unused PLexAuth.tsx.
- CI and testing
- Add .github/workflows/ci.yml: lint, backend/frontend tests, coverage artifacts, PR comment.
- Jest config/setup at root for backend; CRA tests for client; scripts for npm test, split runs, and coverage.
- Add server module tests (channel, archive, config) and client tests (ChannelManager, LocalLogin, VideosPage).
- Add client testing libs and root dev deps (jest, supertest, types).