mirror of
https://github.com/stashapp/stash.git
synced 2026-04-15 03:23:23 +02:00
PR Fixes
This commit is contained in:
parent
39c5a98142
commit
b679c6dc78
4 changed files with 5 additions and 5 deletions
|
|
@ -31,7 +31,7 @@ type SceneFile struct {
|
|||
Width int `json:"width"`
|
||||
Height int `json:"height"`
|
||||
Framerate string `json:"framerate"`
|
||||
Frames int `json:"frame"`
|
||||
Frames int `json:"frames"`
|
||||
Bitrate int `json:"bitrate"`
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ func (m *schema85PostMigrator) migrate(ctx context.Context) error {
|
|||
Count int `db:"count"`
|
||||
}{0}
|
||||
|
||||
if err := m.db.Get(&result, "SELECT COUNT(*) AS count FROM `video_files` WHERE `frames` = 0"); err != nil {
|
||||
if err := m.db.Get(&result, "SELECT COUNT(*) AS count FROM `video_files` WHERE `frames` IS NULL"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ func (m *schema85PostMigrator) migrate(ctx context.Context) error {
|
|||
FROM video_files vf
|
||||
JOIN files f ON f.id = vf.file_id
|
||||
JOIN folders ON folders.id = f.parent_folder_id
|
||||
WHERE vf.frames = 0
|
||||
WHERE vf.frames IS NULL
|
||||
`
|
||||
if lastID != 0 {
|
||||
query += fmt.Sprintf(" AND f.id > %d", lastID)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
ALTER TABLE video_files ADD COLUMN frames INTEGER NOT NULL DEFAULT 0;
|
||||
ALTER TABLE video_files ADD COLUMN frames INTEGER DEFAULT NULL;
|
||||
|
|
@ -925,7 +925,7 @@ func makeFile(i int) models.File {
|
|||
VideoCodec: getFileStringValue(i, "videoCodec"),
|
||||
AudioCodec: getFileStringValue(i, "audioCodec"),
|
||||
FrameRate: getFileDuration(i) * 2,
|
||||
Frames: int64(getFileDuration(i)) * 3,
|
||||
Frames: int64(getFileDuration(i) * getFileDuration(i) * 2),
|
||||
BitRate: int64(getFileDuration(i)) * 3,
|
||||
}
|
||||
} else if i >= fileIdxStartImageFiles && i < fileIdxStartGalleryFiles {
|
||||
|
|
|
|||
Loading…
Reference in a new issue