Update update.js
This commit is contained in:
parent
82f1d9b276
commit
9f9cb8f636
|
@ -127,7 +127,7 @@ function parseMediaInfo(streams) {
|
||||||
streams = streams.filter(s => s.codec_type === 'video')
|
streams = streams.filter(s => s.codec_type === 'video')
|
||||||
streams = streams.map(s => {
|
streams = streams.map(s => {
|
||||||
s.bitrate = s.tags && s.tags.variant_bitrate ? parseInt(s.tags.variant_bitrate) : 0
|
s.bitrate = s.tags && s.tags.variant_bitrate ? parseInt(s.tags.variant_bitrate) : 0
|
||||||
s.frame_rate = parseFrameRate(s.r_frame_rate)
|
s.frame_rate = parseFrameRate(s.avg_frame_rate)
|
||||||
|
|
||||||
return s
|
return s
|
||||||
})
|
})
|
||||||
|
@ -136,8 +136,8 @@ function parseMediaInfo(streams) {
|
||||||
return _.head(streams) || {}
|
return _.head(streams) || {}
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseFrameRate(r_frame_rate = '0/0') {
|
function parseFrameRate(frame_rate = '0/0') {
|
||||||
const parts = r_frame_rate.split('/')
|
const parts = frame_rate.split('/')
|
||||||
const number = parseInt(parts[0]) / parseInt(parts[1])
|
const number = parseInt(parts[0]) / parseInt(parts[1])
|
||||||
|
|
||||||
return Math.round(number * 100) / 100
|
return Math.round(number * 100) / 100
|
||||||
|
|
Loading…
Reference in New Issue