fix postgres media progress timestamp update

This commit is contained in:
Kevin Gatera 2026-03-02 19:51:07 -05:00
parent 7f7e73e3af
commit d5b509a9d7
No known key found for this signature in database
GPG key ID: F0D9F5932458CFB9

View file

@ -253,7 +253,13 @@ class MediaProgress extends Model {
const escapedDate = this.sequelize.escape(new Date(progressPayload.lastUpdate)) const escapedDate = this.sequelize.escape(new Date(progressPayload.lastUpdate))
Logger.info(`[MediaProgress] Manually setting updatedAt to ${escapedDate} (media item ${this.mediaItemId})`) Logger.info(`[MediaProgress] Manually setting updatedAt to ${escapedDate} (media item ${this.mediaItemId})`)
await this.sequelize.query(`UPDATE "mediaProgresses" SET "updatedAt" = ${escapedDate} WHERE "id" = '${this.id}'`) await this.constructor.update(
{ updatedAt: new Date(progressPayload.lastUpdate) },
{
where: { id: this.id },
silent: true
}
)
await this.reload() await this.reload()
} }