mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-12 10:00:05 -04:00
Update database/update.js
This commit is contained in:
parent
8b6bee2ed3
commit
fd60c886fe
3 changed files with 7 additions and 5 deletions
|
@ -135,8 +135,10 @@ function parseStreams(streams) {
|
|||
.filter(s => s.codec_type === 'video')
|
||||
.reduce(
|
||||
(acc, curr) => {
|
||||
if (curr.height > acc.height)
|
||||
return { width: curr.width, height: curr.height, bitrate: curr.bitrate }
|
||||
if (curr.height > acc.height) {
|
||||
const bitrate = curr.tags.variant_bitrate ? parseInt(curr.tags.variant_bitrate) : 0
|
||||
return { width: curr.width, height: curr.height, bitrate }
|
||||
}
|
||||
return acc
|
||||
},
|
||||
{ width: 0, height: 0, bitrate: 0 }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue