Compare commits

...
8 Commits
Author SHA1 Message Date
Brahim Hadriche 62f96dea5e Release v0.41.12 (#731) 2025-09-17 18:25:09 -04:00
Brahim Hadriche 15a0177083 Fallback to 360p when dash streams are missing 2025-09-17 18:23:18 -04:00
Brahim Hadriche 9f83391e37 [skip ci] tweak 2025-09-17 16:37:54 -04:00
Brahim Hadriche f742826b8d [skip ci] tweak 2025-09-17 16:27:50 -04:00
Brahim Hadriche 763d7e1309 Release v0.41.11 (#730) 2025-09-17 09:08:03 -04:00
Brahim Hadriche 9ae59a1bd7 [skip ci] changelog 2025-09-17 09:00:30 -04:00
Brahim Hadriche ae64f73c67 [skip ci] Fingerprint validation 2025-09-16 21:48:21 -04:00
Brahim Hadriche 8329fef6c1 [skip ci] changelog 2025-09-16 20:12:02 -04:00
15 changed files with 144 additions and 65 deletions

No files matched your search

+15 -1
View File
@@ -5,9 +5,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.41.12] - 2025-09-17
### Fixed
- Fallback to 360p when dash streams are missing
## [0.41.11] - 2025-09-17
### Fixed
- Small fixes related to events
## [0.41.10] - 2025-09-16
- Nothing worth mentioning yet.
### Fixed
- Disabled event batching
## [0.41.9] - 2025-09-16
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "playlet",
"version": "0.41.10",
"version": "0.41.12",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "playlet",
"version": "0.41.10",
"version": "0.41.12",
"hasInstallScript": true,
"devDependencies": {
"@rokucommunity/bslint": "^0.8.35",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "playlet",
"version": "0.41.10",
"version": "0.41.12",
"description": "Unofficial YouTube client for Roku",
"devDependencies": {
"@rokucommunity/bslint": "^0.8.35",
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "playlet-app",
"version": "0.41.10",
"version": "0.41.12",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "playlet-app",
"version": "0.41.10"
"version": "0.41.12"
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "playlet-app",
"version": "0.41.10",
"version": "0.41.12",
"description": "Unofficial YouTube client for Roku",
"scripts": {
"prebuild": "rm -rf ../build/playlet-app",
+1 -1
View File
@@ -3,7 +3,7 @@ title=Playlet
# Do not update version manually, it is auto updated from package.json
major_version=0
minor_version=41
build_version=00010
build_version=00012
ui_resolutions=hd
uri_resolution_autosub=$$RES$$,480p,720p,1080p
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "playlet-lib",
"version": "0.41.10",
"version": "0.41.12",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "playlet-lib",
"version": "0.41.10"
"version": "0.41.12"
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "playlet-lib",
"version": "0.41.10",
"version": "0.41.12",
"description": "Unofficial YouTube client for Roku",
"scripts": {
"prebuild": "rm -rf ../build/playlet-lib",
@@ -185,8 +185,8 @@ class DashManifest
if xml.Node("Representation", representationAttributes)
m.AddColorInfo(stream, xml)
if stream.url = invalid
xml.Comment(`[ERROR] Stream.url is invalid for itag: ${stream.itag}`)
if StringUtils.IsNullOrEmpty(stream.url)
xml.Comment(`[ERROR] Stream.url is null or empty for itag: ${stream.itag}`)
else if stream.url.InStr("source=yt_live_broadcast") <> -1
xml.Comment(`[WARN] Stream URL indicates a live broadcast for itag: ${stream.itag}`)
end if
@@ -86,8 +86,18 @@ namespace Innertube
lengthSeconds = videoDetails["lengthSeconds"].ToInt()
isLive = ValidBool(videoDetails["isLive"])
adaptiveFormats = ParseAdaptiveFormats(payload, signatureTimestamp, isLive, cancellation)
hasLiveStreamingData = FormatsHaveLiveStreamingData(adaptiveFormats)
adaptiveFormats = ValidArray(ObjectUtils.Dig(payload, ["streamingData", "adaptiveFormats"]))
formats = ValidArray(ObjectUtils.Dig(payload, ["streamingData", "formats"]))
if not isLive
DecipherUrls(formats, adaptiveFormats, signatureTimestamp, cancellation)
end if
hasLiveStreamingData = FormatsHaveLiveStreamingData(formats, adaptiveFormats)
adaptiveFormats = TransformFormats(adaptiveFormats)
formats = TransformFormats(formats)
videoInfo = {
"type": "video"
@@ -103,7 +113,7 @@ namespace Innertube
"hlsUrl": streamingData["hlsManifestUrl"]
"dashUrl": streamingData["dashManifestUrl"]
"adaptiveFormats": adaptiveFormats
"formatStreams": []
"formatStreams": formats
"captions": ParseCaptions(payload)
"recommendedVideos": []
}
@@ -296,25 +306,14 @@ namespace Innertube
return captions
end function
function ParseAdaptiveFormats(payload as object, signatureTimestamp as dynamic, isLive as boolean, cancellation as object) as object
adaptiveFormats = ObjectUtils.Dig(payload, ["streamingData", "adaptiveFormats"])
if not IsArray(adaptiveFormats)
return []
end if
if not isLive
adaptiveFormats = DecipherUrls(adaptiveFormats, signatureTimestamp, cancellation)
end if
formats = []
for each fmt in adaptiveFormats
formats.Push(GetAdaptiveFormat(fmt))
function TransformFormats(formats as object) as object
for i = 0 to formats.Count() - 1
formats[i] = TransformFormat(formats[i])
end for
return formats
end function
function GetAdaptiveFormat(fmt as object) as object
function TransformFormat(fmt as object) as object
itag = `${fmt["itag"]}`
result = {
"bitrate": `${fmt["bitrate"]}`
@@ -396,24 +395,34 @@ namespace Innertube
return json["sts"]
end function
function DecipherUrls(adaptiveFormats as object, signatureTimestamp as dynamic, cancellation as object) as object
function DecipherUrls(formats as object, adaptiveFormats as object, signatureTimestamp as dynamic, cancellation as object) as void
if signatureTimestamp = invalid
' No need to decipher if signatureTimestamp is not available
return adaptiveFormats
return
end if
formats = []
for each fmt in adaptiveFormats
formats.push({
reqFormats = []
for each fmt in formats
reqFormats.push({
"url": fmt["url"]
"cipher": fmt["cipher"]
"signatureCipher": fmt["signatureCipher"]
})
end for
request = HttpClient.PostJson(`${PLAYLET_SUPPORT_SERVER}/v1/decipher`, {
reqAdaptiveFormats = []
for each fmt in adaptiveFormats
reqAdaptiveFormats.push({
"url": fmt["url"]
"cipher": fmt["cipher"]
"signatureCipher": fmt["signatureCipher"]
})
end for
request = HttpClient.PostJson(`${PLAYLET_SUPPORT_SERVER}/v2/decipher`, {
"sts": signatureTimestamp
"formats": formats
"formats": reqFormats
"adaptiveFormats": reqAdaptiveFormats
})
request.Cancellation(cancellation)
@@ -445,27 +454,36 @@ namespace Innertube
end if
json = response.Json()
if not IsAssociativeArray(json) or not json.DoesExist("formats")
if not IsAssociativeArray(json) or not json.DoesExist("formats") or not json.DoesExist("adaptiveFormats")
error = "Invalid response from decipher service"
LogError(error)
throw error
end if
decipheredFormats = json["formats"]
if not IsArray(decipheredFormats) or decipheredFormats.Count() <> adaptiveFormats.Count()
if not IsArray(decipheredFormats) or decipheredFormats.Count() <> formats.Count()
error = "Invalid formats in deciphered response"
LogError(error)
throw error
end if
for i = 0 to decipheredFormats.Count() - 1
fmt = adaptiveFormats[i]
fmt = formats[i]
decipheredFmt = decipheredFormats[i]
fmt["url"] = decipheredFmt["url"]
end for
return adaptiveFormats
decipheredAdaptiveFormats = json["adaptiveFormats"]
if not IsArray(decipheredAdaptiveFormats) or decipheredAdaptiveFormats.Count() <> adaptiveFormats.Count()
error = "Invalid adaptiveFormats in deciphered response"
LogError(error)
throw error
end if
for i = 0 to decipheredAdaptiveFormats.Count() - 1
fmt = adaptiveFormats[i]
decipheredFmt = decipheredAdaptiveFormats[i]
fmt["url"] = decipheredFmt["url"]
end for
end function
function ParseIsLoggedIn(payload as object) as boolean
@@ -512,17 +530,24 @@ namespace Innertube
}
end function
function FormatsHaveLiveStreamingData(adaptiveFormats as object) as boolean
if not IsArray(adaptiveFormats)
return false
function FormatsHaveLiveStreamingData(formats as object, adaptiveFormats as object) as boolean
if IsArray(adaptiveFormats)
for each fmt in adaptiveFormats
url = fmt["url"]
if IsString(url) and url.InStr("yt_live_broadcast") <> -1
return true
end if
end for
end if
for each fmt in adaptiveFormats
url = fmt["url"]
if IsString(url) and url.InStr("yt_live_broadcast") <> -1
return true
end if
end for
if IsArray(formats)
for each fmt in formats
url = fmt["url"]
if IsString(url) and url.InStr("yt_live_broadcast") <> -1
return true
end if
end for
end if
return false
end function
+11 -5
View File
@@ -33,10 +33,11 @@ namespace Sentry
hasAttachments = IsArray(event.attachments) and event.attachments.Count() > 0
if (not SUPPORTS_ATTACHMENTS) and hasAttachments
message += `\nAttachments:`
message += `\nAttachments: (${event.attachments.Count()} files)`
for each attachment in event.attachments
message += `\nAttachment: ${attachment.filename} (${attachment.content_type})\n${attachment.data}`
end for
message += `\nEnd of attachments.`
end if
eventPayload = {
@@ -60,11 +61,16 @@ namespace Sentry
}
if event.fingerprint <> invalid
if IsString(event.fingerprint)
eventPayload.fingerprint = [event.fingerprint]
else if IsArray(event.fingerprint)
eventPayload.fingerprint = event.fingerprint
fingerprint = event.fingerprint
if not IsArray(fingerprint)
fingerprint = [fingerprint]
end if
for i = 0 to fingerprint.Count() - 1
if not IsString(fingerprint[i])
fingerprint[i] = ToString(fingerprint[i])
end if
end for
eventPayload.fingerprint = fingerprint
end if
payload += FormatJson(eventPayload) + `\n`
@@ -97,6 +97,12 @@ function ExecuteJob() as void
end if
streamUrls = CreateStreamUrls(metadata, service, preferencesNode, backend, playletServerPort)
if streamUrls.Count() = 0
contentNode.addFields({ metadata: metadata })
JobError("No playable streams found for this video.")
return
end if
' Forwarding query params to HLS playlists is not needed. In fact, it can cause issues
' because the playlist is limited to 4MB, and on large playlists the query params
' significantly increase the size of the playlist, making it cropped.
@@ -126,18 +132,46 @@ function CreateStreamUrls(metadata as object, service as Invidious.InvidiousServ
streamUrls = []
if not StringUtils.IsNullOrEmpty(metadata.hlsUrl)
if SupportsHls(metadata)
metadata.hlsUrl = AddInstanceToUrlIfNeeded(metadata.hlsUrl, instance)
AddHlsUrls(streamUrls, metadata, preferredQuality, backend, proxyVideos, playletServerPort)
else
' Not that we're using dashUrl, but why not, it useful when testing it
metadata.dashUrl = AddInstanceToUrlIfNeeded(metadata.dashUrl, instance)
else if SupportsDash(metadata)
AddDashUrls(streamUrls, metadata, preferredQuality, backend, proxyVideos, playletServerPort)
else if SupportsMuxedFormats(metadata)
for each stream in metadata.formatStreams
if StringUtils.IsNullOrEmpty(stream.url)
continue for
end if
stream.url = AddInstanceToUrlIfNeeded(stream.url, instance)
streamUrls.push(stream.url)
end for
end if
return streamUrls
end function
function SupportsHls(metadata as object) as boolean
return not StringUtils.IsNullOrEmpty(metadata.hlsUrl)
end function
function SupportsDash(metadata as object) as boolean
if not IsArray(metadata.adaptiveFormats) or metadata.adaptiveFormats.Count() = 0
return false
end if
for each fmt in metadata.adaptiveFormats
if not StringUtils.IsNullOrEmpty(fmt.url)
return true
end if
end for
return false
end function
function SupportsMuxedFormats(metadata as object) as boolean
return IsArray(metadata.formatStreams) and metadata.formatStreams.Count() > 0
end function
function AddHlsUrls(streamUrls as object, metadata as object, preferredQuality as string, backend as string, proxyVideos as string, playletServerPort as integer)
hlsUrl = metadata.hlsUrl
hlsUrlLocal = invalid
+1 -1
View File
@@ -3,7 +3,7 @@ title=PlayletLib
# Do not update version manually, it is auto updated from package.json
major_version=0
minor_version=41
build_version=00010
build_version=00012
ui_resolutions=hd
uri_resolution_autosub=$$RES$$,480p,720p,1080p
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "playlet-web",
"version": "0.41.10",
"version": "0.41.12",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "playlet-web",
"version": "0.41.10",
"version": "0.41.12",
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^6.2.0",
"@tailwindcss/postcss": "^4.1.13",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "playlet-web",
"version": "0.41.10",
"version": "0.41.12",
"type": "module",
"scripts": {
"dev": "vite",