Add check for format.resolution in Invidious adaptive formats

This commit is contained in:
PrestonN 2021-10-13 23:11:51 -04:00
parent fde06914b5
commit 6519b054c6
1 changed files with 3 additions and 1 deletions

View File

@ -546,7 +546,9 @@ export default Vue.extend({
this.recommendedVideos = result.recommendedVideos
this.adaptiveFormats = result.adaptiveFormats.map((format) => {
format.bitrate = parseInt(format.bitrate)
if (typeof format.resolution !== 'undefined') {
format.height = parseInt(format.resolution.replace('p', ''))
}
return format
})
this.isLive = result.liveNow