Skip to content

Commit 940a948

Browse files
absidueOothecaPickle
authored andcommitted
Use the streaming data from MWEB to avoid SABR-only responses (FreeTubeApp#7327)
1 parent 05dca9a commit 940a948

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
@@ -223,6 +223,14 @@ export async function getLocalVideoInfo(id) {
223223

224224
const info = await webInnertube.getInfo(id)
225225

226+
// temporary workaround for SABR-only responses
227+
const mwebInfo = await webInnertube.getBasicInfo(id, 'MWEB')
228+
229+
if (mwebInfo.playability_status.status === 'OK' && mwebInfo.streaming_data) {
230+
info.playability_status = mwebInfo.playability_status
231+
info.streaming_data = mwebInfo.streaming_data
232+
}
233+
226234
const hasTrailer = info.has_trailer
227235
const trailerIsAgeRestricted = info.getTrailerInfo() === null
228236

0 commit comments

Comments
 (0)