Skip to content

Tmdb import - #44

Open
mahibi wants to merge 2 commits into
Patch4Code:masterfrom
mahibi:tmdbImport
Open

mahibi wants to merge 2 commits into
Patch4Code:masterfrom
mahibi:tmdbImport

Conversation

@mahibi

@mahibi mahibi commented Nov 15, 2026 •

Copy link
Copy Markdown

TMDb import for movies + lazy loading of images.

If a movie has "Your rating" value, it is added to Movies. If it has no "Your rating" value, it is added to watchlist.

grafik

Supported CSV format is (TMDb format):

TMDb ID,IMDb ID,Type,Name,Release Date,Season Number,Episode Number,Rating,Your Rating,Date Rated
8886,tt1008017,movie,Palermo Shooting,2008-11-20T00:00:00Z,,,6.098,,2012-07-19T00:00:00Z

The code of this PR was generated by Gemini 3.1 Pro Preview.
I tested it with a CSV file of hundreds of movies. All were imported and images are loading fine when scrolling.

Feel free to make any changes to this PullRequest without asking or let me know what i should change.


PS: Thank you for this app, it's the cleanest open source TMDb app i could find 👍 I'm willing to contribute further if AI contributions are allowed.

- Added "Import from TMDb" section in SettingsView below "Import Database".
- Implemented importTmdbCsv to parse TMDb exported CSVs directly.
- Fetches poster images directly from TMDB api during import.
- Handles both movie ratings and watchlists based on "Your Rating".
- Added proper foreign key constraints handling by correctly ordering DB insertions (Movies -> LoggedMovie).
- Handled IO threaded background file processing with localized Toast feedback.

Assisted-by: Gemini 3.1 Pro Preview
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
- Removed synchronous TMDB API calls during CSV import to prevent long blocking times and rate limiting.
- Added MovieSyncHelper to dynamically fetch missing poster URLs in the background.
- Integrated MovieSyncHelper across all list view models (Watchlist, MyMovies, Diary, Reviews, Custom Lists).
- Updates are persisted to Room DB and dynamically pushed to the UI via LiveData.

Assisted-by: Gemini 3.1 Pro Preview
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import function

1 participant