mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-22 20:17:41 +00:00
feat(db): add custom migration to backfill totalFrames and startTimecode
This commit is contained in:
@@ -91,7 +91,7 @@ export async function getMediaInfoActivity(params: {
|
||||
bitRate: info.bitRate,
|
||||
frameRate: info.frameRate,
|
||||
totalFrames: info.totalFrames,
|
||||
startTimecode: info.startTimecode,
|
||||
startTimecode: info.startTimecode || '00:00:00:00',
|
||||
hasAudio: info.hasAudio,
|
||||
videoCodec: info.videoCodec,
|
||||
audioCodec: info.audioCodec,
|
||||
@@ -123,6 +123,8 @@ export async function getMediaInfoActivity(params: {
|
||||
duration: 0,
|
||||
bitRate: 0,
|
||||
frameRate: 0,
|
||||
totalFrames: 0,
|
||||
startTimecode: '00:00:00:00',
|
||||
hasAudio: false,
|
||||
format: {},
|
||||
}
|
||||
|
||||
@@ -101,7 +101,17 @@ describe('Transcode Workflow', () => {
|
||||
|
||||
mockActivities.getMediaInfoActivity.mockResolvedValue({
|
||||
mimeType: 'video/mp4',
|
||||
metadata: { originalWidth: 1920, originalHeight: 1080, duration: 10, frameRate: 30 },
|
||||
metadata: {
|
||||
originalWidth: 1920,
|
||||
originalHeight: 1080,
|
||||
duration: 10,
|
||||
frameRate: 30,
|
||||
totalFrames: 300,
|
||||
startTimecode: '00:00:00:00',
|
||||
bitRate: 1000,
|
||||
hasAudio: false,
|
||||
format: {},
|
||||
},
|
||||
videoTranscodes: [],
|
||||
imageTranscodes: [],
|
||||
})
|
||||
@@ -181,7 +191,17 @@ describe('Transcode Workflow', () => {
|
||||
|
||||
mockActivities.getMediaInfoActivity.mockResolvedValue({
|
||||
mimeType: 'image/jpeg',
|
||||
metadata: { originalWidth: 1000, originalHeight: 1000 },
|
||||
metadata: {
|
||||
originalWidth: 1000,
|
||||
originalHeight: 1000,
|
||||
duration: 0,
|
||||
frameRate: 0,
|
||||
totalFrames: 0,
|
||||
startTimecode: '00:00:00:00',
|
||||
bitRate: 0,
|
||||
hasAudio: false,
|
||||
format: {},
|
||||
},
|
||||
videoTranscodes: [],
|
||||
imageTranscodes: [],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user