1.3 KiB
1.3 KiB
title, tags
| title | tags | |||
|---|---|---|---|---|
| Import System |
|
Import System
Overview
Bulk import functionality for migrating data into Showy. Self-throttling to respect TMDB rate limits.
[!info] File:
backend/services/importerService.js
Endpoints
See API Reference#Import.
| Method | Path | Description |
|---|---|---|
POST |
/api/v1/import/movies |
Bulk import movies |
POST |
/api/v1/import/tmdb |
Import by TMDB IDs |
POST |
/api/v1/import/episodes-watch-history |
Import episode watch history |
Rate Limiting
The importer self-throttles to stay under TMDB API limits:
- Max 35 requests per 10 seconds
- 500ms delay between each individual request
- Each import triggers the full Services#EntryManager pipeline (TMDB fetch → save → media download)
Flows
Movie Import
- Receives array of movie data
- For each: calls
EntryManager.fetchAndSaveNewEntry(tmdbId, false) - Throttled execution with progress tracking
TMDB ID Import
- Receives array of TMDB IDs + type flags
- For each: calls
EntryManager.fetchAndSaveNewEntry(tmdbId, isTvSeries) - Same throttled execution
Episode Watch History Import
- Receives array of episode watch records
- Creates
EpisodeSeenrecords in bulk - Updates
date_first_seen/date_last_seenon episodes and entries