Add progress bars to sync #10

Open
r2d2-bot wants to merge 3 commits from 4-progress-bars into 3-sync-command
Collaborator

Closes #4

Wraps sync's four phases (scanning, deleting, copying, writing playlists) in lib/sync.ts with cli-progress bars. Scanning uses a live-incrementing counter bar (unknown total up front, via a new optional onFileFound callback on walkExisting); deleting/copying/writing use determinate bars, each skipped in favor of a short Nothing to ... log line when the phase has zero items. Adds types/cli-progress.d.ts (ambient module declaration) since cli-progress ships no types, matching the types/m3u.d.ts pattern from #1.

Purely additive/visual: no change to syncToTarget's diff logic, guards, or the stale-playlist confirmation gate. Re-verified with a throwaway scratch script (not committed): guards (missing target, empty metadata), first sync, idempotent second sync (Nothing to delete/copy lines), stale-playlist confirmation gate accept/decline, and sanitized-filename collision handling all still behave as before.

Targets 3-sync-command (PR #9) per the stacked-PR rule in CONTRIBUTING.md, since #7/#8/#9 are all still open.

Closes #4 Wraps sync's four phases (scanning, deleting, copying, writing playlists) in lib/sync.ts with cli-progress bars. Scanning uses a live-incrementing counter bar (unknown total up front, via a new optional onFileFound callback on walkExisting); deleting/copying/writing use determinate bars, each skipped in favor of a short Nothing to ... log line when the phase has zero items. Adds types/cli-progress.d.ts (ambient module declaration) since cli-progress ships no types, matching the types/m3u.d.ts pattern from #1. Purely additive/visual: no change to syncToTarget's diff logic, guards, or the stale-playlist confirmation gate. Re-verified with a throwaway scratch script (not committed): guards (missing target, empty metadata), first sync, idempotent second sync (Nothing to delete/copy lines), stale-playlist confirmation gate accept/decline, and sanitized-filename collision handling all still behave as before. Targets 3-sync-command (PR #9) per the stacked-PR rule in CONTRIBUTING.md, since #7/#8/#9 are all still open.
Wraps scanning, deleting, copying, and playlist-writing in lib/sync.ts
with cli-progress bars for visibility on large libraries. Scanning uses
a live-incrementing counter (unknown total up front); the other three
phases use determinate bars and are skipped in favor of a short log
line when there's nothing to do. Adds types/cli-progress.d.ts (ambient
module declaration, same pattern as types/m3u.d.ts) since cli-progress
ships no types. Purely additive/visual — no change to syncToTarget's
diff logic, guards, or the stale-playlist confirmation gate.

Closes #4
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EncvBjUkvZfEutPhyYJHeB
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 4-progress-bars:4-progress-bars
git switch 4-progress-bars

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 3-sync-command
git merge --no-ff 4-progress-bars
git switch 4-progress-bars
git rebase 3-sync-command
git switch 3-sync-command
git merge --ff-only 4-progress-bars
git switch 4-progress-bars
git rebase 3-sync-command
git switch 3-sync-command
git merge --no-ff 4-progress-bars
git switch 3-sync-command
git merge --squash 4-progress-bars
git switch 3-sync-command
git merge --ff-only 4-progress-bars
git switch 3-sync-command
git merge 4-progress-bars
git push origin 3-sync-command
Sign in to join this conversation.
No reviewers
No labels
m3u_files
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jshaver/jellyfin-to-m3u!10
No description provided.