From 2e7cf5ae0cf8fbc9526742b67a0079d42211644c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 26 Sep 2018 14:08:35 +0200 Subject: Fix video files duplicated when fps is null Null values are not considered equal in a UNIQUE index --- server/models/video/video-file.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/models/video/video-file.ts') diff --git a/server/models/video/video-file.ts b/server/models/video/video-file.ts index 0887a3738..f040803b9 100644 --- a/server/models/video/video-file.ts +++ b/server/models/video/video-file.ts @@ -66,8 +66,8 @@ export class VideoFileModel extends Model { @Column infoHash: string - @AllowNull(true) - @Default(null) + @AllowNull(false) + @Default(-1) @Is('VideoFileFPS', value => throwIfNotValid(value, isVideoFPSResolutionValid, 'fps')) @Column fps: number -- cgit v1.2.3