UweTrottmann / SeriesGuide

Track your favorite TV shows and movies on Android devices.
https://seriesgui.de
Apache License 2.0
1.96k stars 400 forks source link

Check for existing watched entry in history before sending one #874

Closed UweTrottmann closed 2 years ago

UweTrottmann commented 2 years ago

839

If history entries are added based on user actions (e.g. this does not affect the initial data merge when syncing with Trakt), check the history API if an entry already exists at the watchedAt timestamp to be used. This is only a single API call and is expected to have a small, in most cases probably empty, response so overhead should be minimal. Edit: for movies need to look up the Trakt id first, but that likely happened already as part of loading details from Trakt (e.g. response is cached).

github-actions[bot] commented 2 years ago

Unit Test Results

27 tests  ±0   27 :heavy_check_mark: ±0   9s :stopwatch: ±0s 12 suites ±0     0 :zzz: ±0  12 files   ±0     0 :x: ±0 

Results for commit a95b3078. ± Comparison against base commit d8b6f632.

:recycle: This comment has been updated with latest results.