From cb13ca72b25d92729c07bbebe3d43634a185433c Mon Sep 17 00:00:00 2001 From: mrjvs Date: Wed, 6 Dec 2023 21:19:36 +0100 Subject: [PATCH] updatedAt on import Co-authored-by: William Oldham --- src/backend/accounts/progress.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/accounts/progress.ts b/src/backend/accounts/progress.ts index a5ad5022..037e4c56 100644 --- a/src/backend/accounts/progress.ts +++ b/src/backend/accounts/progress.ts @@ -19,6 +19,7 @@ export interface ProgressInput { episodeId?: string; seasonNumber?: number; episodeNumber?: number; + updatedAt?: string; } export function progressUpdateItemToInput( @@ -60,6 +61,7 @@ export function progressMediaItemToInputs( seasonId: episode.seasonId, episodeNumber: episode.number, seasonNumber: item.seasons[episode.seasonId].number, + updatedAt: new Date(episode.updatedAt).toISOString(), })); } return [ @@ -67,6 +69,7 @@ export function progressMediaItemToInputs( duration: item.progress?.duration ?? 0, watched: item.progress?.watched ?? 0, tmdbId, + updatedAt: new Date(item.updatedAt).toISOString(), meta: { title: item.title ?? "", type: item.type ?? "",