Add Trakt ZIP export imports - #1817
Conversation
Parse official Trakt export archives locally so imports no longer depend on API access or a client ID. Preserve the existing username and public-list paths while sharing their media conversion behavior. Import watch history, ratings, comments, owned media, system lists, and custom lists. Validate archive structure and decompressed sizes, ignore aggregate watch files, and cover pagination, malformed input, target coordinates, and collections with focused unit tests.
Expose a third Trakt import mode that uploads the account export ZIP through the existing temporary file pipeline. Keep username and public-list forms available and submit the generated export path through the new GraphQL input variant.
Describe how to request and upload a Trakt account export and list the imported data categories. Clarify throughout the user and generated configuration documentation that only API-based username and public-list imports require a Trakt client ID.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (11)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. WalkthroughTrakt imports now support Export ZIP files. The frontend submits ZIP paths through a new import variant. The importer parses supported JSON entries, imports history, ratings, comments, and collections, enforces decompression limits, and documents API and ZIP requirements. ChangesTrakt ZIP export import
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to This change adds Trakt export ZIP importing while preserving existing import modes; no actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant SettingsUI
participant ImportInput
participant TraktImporter
participant ExportImporter
participant ZipArchive
SettingsUI->>ImportInput: submit Export ZIP path
ImportInput->>TraktImporter: send Export input
TraktImporter->>ExportImporter: dispatch ZIP import
ExportImporter->>ZipArchive: read recognized JSON entries
ZipArchive-->>ExportImporter: return parsed records
ExportImporter-->>TraktImporter: return ImportResult
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Clippy (1.97.1)Clippy execution timed out Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Validation
cargo test --package trakt-importer-servicecargo clippy --package trakt-importer-service --all-targetscargo fmt --all -- --checkyarn turbo run build --filter=@ryot/frontendyarn turbo run typecheck --filter=@ryot/frontendyarn turbo run build --filter=@ryot/docsCloses #1816
Summary by CodeRabbit
New Features
Documentation