From dd7e932e7187c2252d614bf003ae075283dd01e0 Mon Sep 17 00:00:00 2001 From: an-lee Date: Wed, 10 Jan 2024 10:44:46 +0800 Subject: [PATCH 01/10] fix unique ID for the same audio/video --- enjoy/src/main/db/models/audio.ts | 14 ++++++++------ .../src/main/db/models/pronunciation-assessment.ts | 2 +- enjoy/src/main/db/models/recording.ts | 2 +- enjoy/src/main/db/models/transcription.ts | 2 +- enjoy/src/main/db/models/video.ts | 13 +++++++------ enjoy/src/main/providers/audible-provider.ts | 3 ++- 6 files changed, 20 insertions(+), 16 deletions(-) diff --git a/enjoy/src/main/db/models/audio.ts b/enjoy/src/main/db/models/audio.ts index c2dc410b..bc07e8a1 100644 --- a/enjoy/src/main/db/models/audio.ts +++ b/enjoy/src/main/db/models/audio.ts @@ -2,6 +2,7 @@ import { AfterCreate, AfterUpdate, AfterDestroy, + BeforeSave, BeforeCreate, BelongsTo, Table, @@ -37,7 +38,7 @@ const logger = log.scope("db/models/audio"); timestamps: true, }) export class Audio extends Model