mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
Handle null video durations in migration (#3021)
This commit is contained in:
@@ -75,5 +75,6 @@ func (d *Decorator) IsMissingMetadata(ctx context.Context, fs file.FS, f file.Fi
|
|||||||
return vf.VideoCodec == unsetString || vf.AudioCodec == unsetString ||
|
return vf.VideoCodec == unsetString || vf.AudioCodec == unsetString ||
|
||||||
vf.Format == unsetString || vf.Width == unsetNumber ||
|
vf.Format == unsetString || vf.Width == unsetNumber ||
|
||||||
vf.Height == unsetNumber || vf.FrameRate == unsetNumber ||
|
vf.Height == unsetNumber || vf.FrameRate == unsetNumber ||
|
||||||
|
vf.Duration == unsetNumber ||
|
||||||
vf.BitRate == unsetNumber || interactive != vf.Interactive
|
vf.BitRate == unsetNumber || interactive != vf.Interactive
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -458,7 +458,7 @@ INSERT INTO `video_files`
|
|||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
`files`.`id`,
|
`files`.`id`,
|
||||||
`scenes`.`duration`,
|
COALESCE(`scenes`.`duration`, -1),
|
||||||
-- special values for unset to be updated during scan
|
-- special values for unset to be updated during scan
|
||||||
COALESCE(`scenes`.`video_codec`, 'unset'),
|
COALESCE(`scenes`.`video_codec`, 'unset'),
|
||||||
COALESCE(`scenes`.`format`, 'unset'),
|
COALESCE(`scenes`.`format`, 'unset'),
|
||||||
|
|||||||
Reference in New Issue
Block a user