Merged
Conversation
48f3797 to
9b815ad
Compare
9b815ad to
ad51016
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
podkit v0.6.0
The biggest release since video sync landed — new commands, a reworked sync engine, a pile of bug fixes, and quality of life improvements that make podkit feel more solid day-to-day.
If you're upgrading from 0.5.x, everything is backwards-compatible. No config changes needed.
podkit doctorThis release introduces
podkit doctor— the start of making podkit useful beyond just syncing content. The idea is simple: podkit already knows your iPod inside and out, so it should be able to diagnose and fix problems too.The first check tackles something every iPod user has run into at some point: corrupted album artwork. Wrong covers, glitched images, artwork from a completely different album showing up — the iPod's artwork database is fragile and it doesn't take much to break it.
podkit doctordetects integrity issues and rebuilds the artwork from your source collection automatically. See the artwork repair guide for the full walkthrough.The second check finds orphan files — tracks sitting on the iPod that aren't referenced by the database, quietly eating up space.
--verbosebreaks them down by directory and extension;--format csvexports the full list for inspection.More checks are coming. The goal is for
podkit doctorto be a swiss army knife for iPod maintenance — useful even if you don't use podkit for syncing.Highlights
podkit device scan— Discover connected iPods without guessing mount paths. Shows volume name, UUID, size, and mount status. Especially useful for finding the volume UUID needed to configure multi-device or Docker setups.Graceful shutdown — Ctrl+C during sync now finishes the current operation and saves all completed work to the iPod database before exiting (code 130). Previously, Ctrl+C killed the process immediately, potentially leaving orphaned files and unsaved progress. A second Ctrl+C force-quits if you really need out. The database is also saved every 50 tracks during sync, so even a crash or force-quit loses minimal work.
Unified sync pipeline — Music and video sync now run through the same engine (
SyncDiffer→SyncPlanner→SyncExecutor). This means video sync gets all the reliability features music had — self-healing upgrades, error categorization with configurable retries, and consistent progress reporting. TheContentTypeHandlerpattern makes it straightforward to add new content types down the road.Under the Hood
podkit doctorrepair routine shares the same cache.podkit device ejectnow fully detaches the USB device, not just unmounts the volume. On macOS, the iPod disappears from Disk Utility; on Linux, the USB device is powered off.COPY --chmod=755instead of separateRUN chmodsteps.Bug Fixes
--deleteflag was removing tracks of the wrong content type — syncing music could delete videos and vice versa0was treated as unset (||vs??), causing S01E00 episodes to be deleted and re-added every synctrack.remove()now deletes the file by defaultpodkit doctororphan detection now skips macOS._resource fork files that were inflating the countbun run; Ctrl+C during read-only phases now exits instantlyFull changelog
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
podkit@0.6.0
Minor Changes
4dd7b44Thanks @jvgomg! - Addpodkit device scancommand to discover connected iPod devices. Shows each iPod's volume name, UUID, size, and mount status — useful for finding the volume UUID needed to configure multi-device setups, especially in Docker.d19d6e3Thanks @jvgomg! - Addpodkit doctorcommand for running diagnostic checks on an iPod, andpodkit device reset-artworkfor wiping artwork and clearing sync tags.podkit doctorruns all checks and reports problems;podkit doctor --repair artwork-integrity -c <collection>repairs by check ID using the source collection. @podkit/core exportsresetArtworkDatabaseandrebuildArtworkDatabaseprimitives, and a diagnostic framework in thediagnostics/module built on aDiagnosticCheckinterface (check + repair pattern). Includes a binary ArtworkDB parser and integrity checker.b698a07Thanks @jvgomg! - Add dual progress bars to sync output showing both overall and per-file progress simultaneously. Video sync now displays total file count alongside per-file transcode percentage and speed, so users can see how far along a large sync is. Music sync uses the same layout for consistency.2873f14Thanks @jvgomg! - Add graceful shutdown handling for sync and doctor commandsPressing Ctrl+C during
podkit syncnow triggers a graceful shutdown: the current operation finishes, all completed tracks are saved to the iPod database, and the process exits cleanly with code 130. Previously, Ctrl+C killed the process immediately, potentially leaving orphaned files and unsaved work.podkit doctorcheck: detects orphaned files on the iPod (files not referenced by the database) with optional cleanup via--repair orphan-files7624265Thanks @jvgomg! - Unify sync pipeline with ContentTypeHandler patternContentTypeHandler<TSource, TDevice>interface for media-type-specific sync logicMusicHandlerandVideoHandlerimplementationsUnifiedDiffer,UnifiedPlanner, andUnifiedExecutorgeneric pipeline componentserror-handling.ts)CollectionAdapter<TItem, TFilter>interface replaces separate music/video adapter contractsPatch Changes
67d1357Thanks @jvgomg! - Fix--deleteflag removing video tracks when syncing music (and vice versa). The delete flag now only considers tracks of the content type being synced.120a7b1Thanks @jvgomg! - Improvepodkit doctororphan file reporting. Orphan detection now skips macOS._resource fork files that were inflating the count. Add--verboseoutput showing orphan breakdown by directory, file extension, and the 10 largest files. Add--format csvto export the full orphan file list for inspection.3f56a1bThanks @jvgomg! - Fix video sync deleting and re-adding episodes with episode number 0 (e.g., S01E00)The
||operator treated episode/season number0as falsy, converting it toundefined. This broke diff key matching for episode 0, causing every sync to delete and re-add the video. Changed to??(nullish coalescing) which only convertsnull/undefined, preserving0as a valid value.3db2bbbThanks @jvgomg! - Fix graceful shutdown during sync: Ctrl+C now reliably saves completed work to the iPod database before exiting. Previously, video sync interruptions could silently skip the database save, causing the next sync to redo already-completed work. Also fix "Force quit" appearing immediately on first Ctrl+C when running viabun run. Ctrl+C during read-only phases (scanning, diffing) now exits instantly instead of showing a misleading "finishing current operation" message.1c98ac2Thanks @jvgomg! - Fix video sync overall progress counter incrementing on every transcode sub-progress tick instead of once per video143e314Thanks @jvgomg! - Fully detach USB device on eject so iPod disappears from Disk Utility (macOS) and system (Linux/Docker)Previously, eject only unmounted the volume but left the physical disk device attached. On macOS, the iPod would still appear in Disk Utility after ejecting. On Linux, the USB device could remain visible.
Now eject resolves the whole-disk identifier and fully detaches the USB device:
diskutil ejecttargets the whole disk (e.g.,disk5) instead of the volumeudisksctl power-offtargets the whole disk (e.g.,/dev/sda) and is also called after theumountfallback pathUpdated dependencies [
8e11397,8fdf618,d19d6e3,3f56a1b,120a7b1,143e314,2873f14,66560a9,7624265,632f360]:@podkit/core@0.6.0
Minor Changes
d19d6e3Thanks @jvgomg! - Addpodkit doctorcommand for running diagnostic checks on an iPod, andpodkit device reset-artworkfor wiping artwork and clearing sync tags.podkit doctorruns all checks and reports problems;podkit doctor --repair artwork-integrity -c <collection>repairs by check ID using the source collection. @podkit/core exportsresetArtworkDatabaseandrebuildArtworkDatabaseprimitives, and a diagnostic framework in thediagnostics/module built on aDiagnosticCheckinterface (check + repair pattern). Includes a binary ArtworkDB parser and integrity checker.2873f14Thanks @jvgomg! - Add graceful shutdown handling for sync and doctor commandsPressing Ctrl+C during
podkit syncnow triggers a graceful shutdown: the current operation finishes, all completed tracks are saved to the iPod database, and the process exits cleanly with code 130. Previously, Ctrl+C killed the process immediately, potentially leaving orphaned files and unsaved work.podkit doctorcheck: detects orphaned files on the iPod (files not referenced by the database) with optional cleanup via--repair orphan-files66560a9Thanks @jvgomg! - Unify sync pipeline: CLI presenter pattern, naming symmetry, tests, and cleanup (TASK-186)7624265Thanks @jvgomg! - Unify sync pipeline with ContentTypeHandler patternContentTypeHandler<TSource, TDevice>interface for media-type-specific sync logicMusicHandlerandVideoHandlerimplementationsUnifiedDiffer,UnifiedPlanner, andUnifiedExecutorgeneric pipeline componentserror-handling.ts)CollectionAdapter<TItem, TFilter>interface replaces separate music/video adapter contractsPatch Changes
8e11397Thanks @jvgomg! - Add album-level artwork cache to sync executor, reducing redundant artwork extractions by ~10x (one extraction per album instead of per track). The cache is shared with the doctor repair routine via a newAlbumArtworkCacheabstraction.8fdf618Thanks @jvgomg! - Fix infinite metadata update loop when source collection contains duplicate tracksWhen a source collection had multiple entries with the same (artist, title, album) but different track numbers, each duplicate would generate a separate metadata-correction operation against the same iPod track. After applying one update, the next sync would see the other duplicate's metadata as a diff — causing an endless update cycle.
The diff engine now skips duplicate source tracks that match an already-claimed iPod track. The first source entry wins; subsequent duplicates are ignored.
3f56a1bThanks @jvgomg! - Fix video sync deleting and re-adding episodes with episode number 0 (e.g., S01E00)The
||operator treated episode/season number0as falsy, converting it toundefined. This broke diff key matching for episode 0, causing every sync to delete and re-add the video. Changed to??(nullish coalescing) which only convertsnull/undefined, preserving0as a valid value.120a7b1Thanks @jvgomg! - Fix track removal leaving orphan files on iPod. When removing tracks during sync (both music and video), the audio/video file was deleted from the iPod database but left on disk, accumulating orphan files over time.track.remove()now deletes the file by default. Pass{ keepFile: true }to preserve the file on disk.143e314Thanks @jvgomg! - Fully detach USB device on eject so iPod disappears from Disk Utility (macOS) and system (Linux/Docker)Previously, eject only unmounted the volume but left the physical disk device attached. On macOS, the iPod would still appear in Disk Utility after ejecting. On Linux, the USB device could remain visible.
Now eject resolves the whole-disk identifier and fully detaches the USB device:
diskutil ejecttargets the whole disk (e.g.,disk5) instead of the volumeudisksctl power-offtargets the whole disk (e.g.,/dev/sda) and is also called after theumountfallback path632f360Thanks @jvgomg! - Add incremental database saves during video sync, saving every 10 completed transfers by default. Reduces data loss if the process is interrupted during a large video sync.@podkit/daemon@0.2.2
Patch Changes
632f360Thanks @jvgomg! - Improve daemon graceful shutdown: forward SIGINT to the sync child process on SIGTERM so it drains and saves within Docker's 10-second timeout, instead of waiting for the full sync to complete.Updated dependencies [
8e11397,8fdf618,d19d6e3,3f56a1b,120a7b1,143e314,2873f14,66560a9,7624265,632f360]:@podkit/docker@0.2.3
Patch Changes
a71f2d0Thanks @jvgomg! - Optimise Docker image layers by usingCOPY --chmod=755instead of separateRUN chmodsteps, reducing the total layer countUpdated dependencies [
632f360,67d1357,4dd7b44,d19d6e3,120a7b1,b698a07,3f56a1b,3db2bbb,1c98ac2,143e314,2873f14,7624265]: