Skip to content

Commit f9c53f3

Browse files
authored
Use the streaming data from MWEB to avoid SABR-only responses (#7327)
1 parent efc3d63 commit f9c53f3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/renderer/helpers/api/local.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,14 @@ export async function getLocalVideoInfo(id) {
226226

227227
const info = await webInnertube.getInfo(id)
228228

229+
// temporary workaround for SABR-only responses
230+
const mwebInfo = await webInnertube.getBasicInfo(id, 'MWEB')
231+
232+
if (mwebInfo.playability_status.status === 'OK' && mwebInfo.streaming_data) {
233+
info.playability_status = mwebInfo.playability_status
234+
info.streaming_data = mwebInfo.streaming_data
235+
}
236+
229237
let hasTrailer = info.has_trailer
230238
let trailerIsAgeRestricted = info.getTrailerInfo() === null
231239

0 commit comments

Comments
 (0)