Skip to content

Commit 3826cf7

Browse files
Merge pull request #7850 from efb4f5ff-1298-471a-8973-3d47447115dc/hotfix-release
Hotfix Release - v0.23.7
2 parents 169aafc + cfc656a commit 3826cf7

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "freetube",
33
"productName": "FreeTube",
44
"description": "A private YouTube client",
5-
"version": "0.23.6",
5+
"version": "0.23.7",
66
"license": "AGPL-3.0-or-later",
77
"main": "./dist/main.js",
88
"private": true,

src/renderer/helpers/api/local.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,18 @@ export async function getLocalVideoInfo(id) {
232232

233233
const info = await webInnertube.getInfo(id, { po_token: contentPoToken })
234234

235-
// temporary workaround for SABR-only responses
235+
// #region temporary workaround for SABR-only responses
236+
237+
// MWEB doesn't have an audio track selector so it picks the audio track on the server based on the request language.
238+
239+
const originalAudioTrackFormat = info.streaming_data?.adaptive_formats.find(format => {
240+
return format.has_audio && format.is_original && format.language
241+
})
242+
243+
if (originalAudioTrackFormat) {
244+
webInnertube.session.context.client.hl = originalAudioTrackFormat.language
245+
}
246+
236247
const mwebInfo = await webInnertube.getBasicInfo(id, { client: 'MWEB', po_token: contentPoToken })
237248

238249
if (mwebInfo.playability_status.status === 'OK' && mwebInfo.streaming_data) {
@@ -242,6 +253,8 @@ export async function getLocalVideoInfo(id) {
242253
clientName = 'MWEB'
243254
}
244255

256+
// #endregion temporary workaround for SABR-only responses
257+
245258
let hasTrailer = info.has_trailer
246259
let trailerIsAgeRestricted = info.getTrailerInfo() === null
247260

@@ -324,6 +337,10 @@ export async function getLocalVideoInfo(id) {
324337
url.searchParams.set('pot', contentPoToken)
325338
url.searchParams.set('c', clientName)
326339

340+
// Remove &xosf=1 as it adds `position:63% line:0%` to the subtitle lines
341+
// placing them in the top right corner
342+
url.searchParams.delete('xosf')
343+
327344
captionTrack.base_url = url.toString()
328345
}
329346
}

0 commit comments

Comments
 (0)