@@ -213,9 +213,17 @@ export async function getLocalVideoInfo(id) {
213213 webInnertube . session . context . client . visitorData ,
214214 JSON . stringify ( webInnertube . session . context )
215215 ) )
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+ ) )
216222
217223 webInnertube . session . po_token = contentPoToken
218224 webInnertube . session . player . po_token = sessionPoToken
225+ webInnertube . session . po_token = contentPoToken
226+ webInnertube . session . player . po_token = sessionPoToken
219227 } catch ( error ) {
220228 console . error ( 'Local API, poToken generation failed' , error )
221229 throw error
@@ -288,32 +296,17 @@ export async function getLocalVideoInfo(id) {
288296
289297 try {
290298 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 )
296300 decipherFormats ( info . streaming_data . adaptive_formats , webInnertube . session . player )
297- }
298301
299302 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
301304
302- << < << << HEAD
303305 if ( url . includes ( '?' ) ) {
304306 url += `&pot=${ encodeURIComponent ( sessionPoToken ) } &mpd_version=7`
305307 } else {
306308 url += `${ url . endsWith ( '/' ) ? '' : '/' } pot/${ encodeURIComponent ( sessionPoToken ) } /mpd_version/7`
307309 }
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 )
317310 }
318311 }
319312 } catch ( ex ) {
0 commit comments