@@ -213,9 +213,17 @@ export async function getLocalVideoInfo(id) {
213
213
webInnertube . session . context . client . visitorData ,
214
214
JSON . stringify ( webInnertube . session . context )
215
215
) )
216
+ ( { contentPoToken, sessionPoToken } = await ipcRenderer . invoke (
217
+ IpcChannels . GENERATE_PO_TOKENS ,
218
+ id ,
219
+ webInnertube . session . context . client . visitorData ,
220
+ JSON . stringify ( webInnertube . session . context )
221
+ ) )
216
222
217
223
webInnertube . session . po_token = contentPoToken
218
224
webInnertube . session . player . po_token = sessionPoToken
225
+ webInnertube . session . po_token = contentPoToken
226
+ webInnertube . session . player . po_token = sessionPoToken
219
227
} catch ( error ) {
220
228
console . error ( 'Local API, poToken generation failed' , error )
221
229
throw error
@@ -288,32 +296,17 @@ export async function getLocalVideoInfo(id) {
288
296
289
297
try {
290
298
if ( info . streaming_data ) {
291
- decipherFormats ( info . streaming_data . formats , webInnertube . session . player )
292
-
293
- const firstFormat = info . streaming_data . adaptive_formats [ 0 ]
294
-
295
- if ( firstFormat . url || firstFormat . signature_cipher || firstFormat . cipher ) {
299
+ decipherFormats ( info . streaming_data . formats , webInnertube . session . player )
296
300
decipherFormats ( info . streaming_data . adaptive_formats , webInnertube . session . player )
297
- }
298
301
299
302
if ( info . streaming_data . dash_manifest_url ) {
300
- let url = info . streaming_data . dash_manifest_url
303
+ let url = info . streaming_data . dash_manifest_url
301
304
302
- << < << << HEAD
303
305
if ( url . includes ( '?' ) ) {
304
306
url += `&pot=${ encodeURIComponent ( sessionPoToken ) } &mpd_version=7`
305
307
} else {
306
308
url += `${ url . endsWith ( '/' ) ? '' : '/' } pot/${ encodeURIComponent ( sessionPoToken ) } /mpd_version/7`
307
309
}
308
- = === ===
309
- if ( url . includes ( '?' ) ) {
310
- url += `&pot=${ encodeURIComponent ( sessionPoToken ) } &mpd_version=7`
311
- } else {
312
- url += `${ url . endsWith ( '/' ) ? '' : '/' } pot/${ encodeURIComponent ( sessionPoToken ) } /mpd_version/7`
313
- }
314
-
315
- info . streaming_data . dash_manifest_url = url
316
- >>> > >>> 99 fa698e ( Merge commit '250ec7c4f50124e7c444f0ffbacb00f85186bd62' into development )
317
310
}
318
311
}
319
312
} catch ( ex ) {
0 commit comments