Compare commits

...
10 Commits
Author SHA1 Message Date
Brahim Hadriche 7e11a056f9 [skip ci] Update RELEASING.md 2025-06-21 07:20:00 -04:00
Brahim Hadriche 08c16a9830 [skip ci] fix warning 2025-06-21 07:18:39 -04:00
Brahim Hadriche aaef0352cb Release v0.40.6 (#664) 2025-06-21 07:15:06 -04:00
Brahim Hadriche 5ea6e11345 Announcement 2025-06-21 07:05:55 -04:00
Brahim Hadriche 141c80c618 [chore] update dependencies (#663)
* update dependencies

* update image rasterizer
2025-06-21 06:10:05 -04:00
Brahim Hadriche 5e26deea77 [skip ci] parser tweak 2025-06-20 20:28:12 -04:00
Brahim Hadriche 5884021e72 Experiment: isInlinePlaybackNoAd 2025-06-20 15:32:10 -04:00
Brahim Hadriche d8417ee90c Improve performance of video bookmarks (#662)
* Improve performance of video bookmarks

* remove test code
2025-06-20 11:53:41 -04:00
Brahim Hadriche 63f8ba8617 [skip ci] Small refactor 2025-06-20 09:20:49 -04:00
Brahim Hadriche a49f7e8d99 [skip ci] Revert "Set visitor data through launch args"
This reverts commit 4926c3df5b.
2025-06-19 14:18:50 -04:00
37 changed files with 1050 additions and 704 deletions

No files matched your search

+11
View File
@@ -5,6 +5,17 @@ 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/), 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). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.40.6] - 2025-06-21
### Fixed
- Improve performance of video bookmarks, by avoiding `/player` endpoint and caching results
- Github link to create new issue not working in web app due to url being too long
### Changed
- Added instructions to use web app as a workaround to current errors
## [0.40.5] - 2025-06-19 ## [0.40.5] - 2025-06-19
### Added ### Added
+1 -1
View File
@@ -19,7 +19,7 @@ These are mostly the steps when releasing a new version:
- Wait for the PR to be created - Wait for the PR to be created
- Inspect PR, wait for CI and merge - Inspect PR, wait for CI and merge
- Wait for CI on main branch to create the `canary` release - Wait for CI on main branch to create the `canary` release
- Edit `canary` release - Edit [`canary`](https://github.com/iBicha/playlet/releases/tag/canary) release
- Tag: `v$VERSION` - Tag: `v$VERSION`
- Title: `v$VERSION` - Title: `v$VERSION`
- Body: the content from CHANGELOG.md for this version - Body: the content from CHANGELOG.md for this version
+646 -566
View File
File diff suppressed because it is too large. Load diff
+6 -6
View File
@@ -1,18 +1,17 @@
{ {
"name": "playlet", "name": "playlet",
"version": "0.40.5", "version": "0.40.6",
"description": "Unofficial YouTube client for Roku", "description": "Unofficial YouTube client for Roku",
"devDependencies": { "devDependencies": {
"@rokucommunity/bslint": "^0.8.32", "@rokucommunity/bslint": "^0.8.32",
"@types/crypto-js": "^4.2.2", "@types/crypto-js": "^4.2.2",
"@types/fs-extra": "^11.0.4", "@types/fs-extra": "^11.0.4",
"@types/node": "^24.0.1", "@types/node": "^24.0.3",
"@types/xml2js": "^0.4.14", "@types/xml2js": "^0.4.14",
"argparse": "^2.0.1", "argparse": "^2.0.1",
"brighterscript": "0.68.5", "brighterscript": "0.68.5",
"brighterscript-formatter": "^1.7.15", "brighterscript-formatter": "^1.7.15",
"cheerio": "1.0.0-rc.11", "convert-svg-to-png": "^0.7.1",
"convert-svg-to-png": "^0.6.4",
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"dotenv": "^16.5.0", "dotenv": "^16.5.0",
"fs-extra": "^11.3.0", "fs-extra": "^11.3.0",
@@ -22,6 +21,7 @@
"json5": "^2.2.3", "json5": "^2.2.3",
"mailparser": "^3.7.3", "mailparser": "^3.7.3",
"protocol-buffers-schema": "^3.6.0", "protocol-buffers-schema": "^3.6.0",
"puppeteer": "^24.10.2",
"roku-deploy": "^3.12.6", "roku-deploy": "^3.12.6",
"roku-test-automation": "^2.0.13", "roku-test-automation": "^2.0.13",
"rooibos-roku": "5.15.7", "rooibos-roku": "5.15.7",
@@ -65,7 +65,7 @@
"convert-images": "node tools/convert-images.js", "convert-images": "node tools/convert-images.js",
"update-rale-component": "cd tools/RALE && rm TrackerTask.xml && curl -o TrackerTask.zip https://devtools.web.roku.com/roku-advanced-layout-editor/app/TrackerTask.zip && unzip TrackerTask.zip && rm TrackerTask.zip", "update-rale-component": "cd tools/RALE && rm TrackerTask.xml && curl -o TrackerTask.zip https://devtools.web.roku.com/roku-advanced-layout-editor/app/TrackerTask.zip && unzip TrackerTask.zip && rm TrackerTask.zip",
"postinstall": "cd playlet-lib && npm install && cd ../playlet-app && npm install && cd ../playlet-web && npm install", "postinstall": "cd playlet-lib && npm install && cd ../playlet-app && npm install && cd ../playlet-web && npm install",
"update-deps": "npx npm-check-updates --deep --upgrade --install always --reject tailwindcss,cheerio,brighterscript,daisyui", "update-deps": "npx npm-check-updates --deep --upgrade --install always --reject tailwindcss,brighterscript,daisyui",
"registry:write": "node tools/registry.js --input registry.json", "registry:write": "node tools/registry.js --input registry.json",
"registry:read": "node tools/registry.js --output registry.json", "registry:read": "node tools/registry.js --output registry.json",
"registry:clear": "node tools/registry.js --clear", "registry:clear": "node tools/registry.js --clear",
@@ -74,6 +74,6 @@
"shutdown": "node tools/shutdown.js" "shutdown": "node tools/shutdown.js"
}, },
"optionalDependencies": { "optionalDependencies": {
"@rollup/rollup-linux-x64-gnu": "^4.43.0" "@rollup/rollup-linux-x64-gnu": "^4.44.0"
} }
} }
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet-app", "name": "playlet-app",
"version": "0.40.5", "version": "0.40.6",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-app", "name": "playlet-app",
"version": "0.40.5" "version": "0.40.6"
} }
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-app", "name": "playlet-app",
"version": "0.40.5", "version": "0.40.6",
"description": "Unofficial YouTube client for Roku", "description": "Unofficial YouTube client for Roku",
"scripts": { "scripts": {
"prebuild": "rm -rf ../build/playlet-app", "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 # Do not update version manually, it is auto updated from package.json
major_version=0 major_version=0
minor_version=40 minor_version=40
build_version=00005 build_version=00006
ui_resolutions=hd ui_resolutions=hd
uri_resolution_autosub=$$RES$$,480p,720p,1080p uri_resolution_autosub=$$RES$$,480p,720p,1080p
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.40.5", "version": "0.40.6",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.40.5" "version": "0.40.6"
} }
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.40.5", "version": "0.40.6",
"description": "Unofficial YouTube client for Roku", "description": "Unofficial YouTube client for Roku",
"scripts": { "scripts": {
"prebuild": "rm -rf ../build/playlet-lib", "prebuild": "rm -rf ../build/playlet-lib",
@@ -187,9 +187,8 @@ function OnSubscribeButtonSelected()
subscribe: not m.top.isSubscribed subscribe: not m.top.isSubscribed
} }
callback = JobSystem.CreateCallback() m.subscribeJob = JobSystem.CreateCallback()
JobSystem.QueueJob(m.jobQueue, Jobs.SubscribeJob, input, callback) JobSystem.QueueJob(m.jobQueue, Jobs.SubscribeJob, input, m.subscribeJob)
m.subscribeJob = callback
end function end function
function OnBannerLoadStatus() as void function OnBannerLoadStatus() as void
@@ -407,9 +406,8 @@ function FetchSubscriptionStatus() as void
invidious: m.invidious invidious: m.invidious
} }
callback = JobSystem.CreateCallback(OnFetchSubscriptionStatusDone) m.fetchSubscriptionStatusJob = JobSystem.CreateCallback(OnFetchSubscriptionStatusDone)
JobSystem.QueueJob(m.jobQueue, Jobs.FetchSubscriptionStatusJob, input, callback) JobSystem.QueueJob(m.jobQueue, Jobs.FetchSubscriptionStatusJob, input, m.fetchSubscriptionStatusJob)
m.fetchSubscriptionStatusJob = callback
end function end function
function OnFetchSubscriptionStatusDone(event as object) as void function OnFetchSubscriptionStatusDone(event as object) as void
@@ -23,9 +23,8 @@ function LoadChannel(invidiousNode as object, jobQueue as object) as void
invidious: invidiousNode invidious: invidiousNode
} }
callback = JobSystem.CreateCallback(OnChannelContentJobDone) m.channelContentJob = JobSystem.CreateCallback(OnChannelContentJobDone)
JobSystem.QueueJob(jobQueue, Jobs.ChannelContentJob, input, callback) JobSystem.QueueJob(jobQueue, Jobs.ChannelContentJob, input, m.channelContentJob)
m.channelContentJob = callback
end function end function
function OnChannelContentJobDone(event as object) as void function OnChannelContentJobDone(event as object) as void
@@ -33,10 +33,9 @@ function LoadPlaylist(invidiousNode as object, jobQueue as object, singlePage as
singlePage: singlePage singlePage: singlePage
} }
callback = JobSystem.CreateCallback(OnPlaylistContentJobDone)
JobSystem.QueueJob(jobQueue, Jobs.PlaylistContentJob, input, callback)
m.playlistContentJob = callback
m.top.isLoading = true m.top.isLoading = true
m.playlistContentJob = JobSystem.CreateCallback(OnPlaylistContentJobDone)
JobSystem.QueueJob(jobQueue, Jobs.PlaylistContentJob, input, m.playlistContentJob)
end function end function
function OnPlaylistContentJobDone(event as object) as void function OnPlaylistContentJobDone(event as object) as void
@@ -57,9 +57,8 @@ function RefreshAccessToken() as void
} }
} }
callback = JobSystem.CreateCallback(OnProfileRefreshTokenJobDone) m.profileRefreshTokenJob = JobSystem.CreateCallback(OnProfileRefreshTokenJobDone)
JobSystem.QueueJob(m.jobQueue, Jobs.ProfileRefreshTokenJob, input, callback) JobSystem.QueueJob(m.jobQueue, Jobs.ProfileRefreshTokenJob, input, m.profileRefreshTokenJob)
m.profileRefreshTokenJob = callback
end function end function
function OnProfileRefreshTokenJobDone(event as object) as void function OnProfileRefreshTokenJobDone(event as object) as void
@@ -23,12 +23,28 @@ namespace DialogUtils
if options.DoesExist("message") if options.DoesExist("message")
message = options.message message = options.message
if GetInterface(message, "ifArray") = invalid if IsString(message)
message = message.Tokenize(`\n`).ToArray() message = message.Tokenize(`\n`).ToArray()
end if end if
dialog.message = message dialog.message = message
end if end if
if options.DoesExist("bulletText")
bulletText = options.bulletText
if IsString(bulletText)
bulletText = bulletText.Tokenize(`\n`).ToArray()
end if
dialog.bulletText = bulletText
end if
if options.DoesExist("bottomMessage")
bottomMessage = options.bottomMessage
if IsString(bottomMessage)
bottomMessage = bottomMessage.Tokenize(`\n`).ToArray()
end if
dialog.bottomMessage = bottomMessage
end if
if options.DoesExist("title") if options.DoesExist("title")
dialog.title = options.title dialog.title = options.title
end if end if
+1 -11
View File
@@ -3,6 +3,7 @@ import "pkg:/source/utils/StringUtils.bs"
import "pkg:/source/utils/Types.bs" import "pkg:/source/utils/Types.bs"
function InitEcpArgs() function InitEcpArgs()
m.videoQueue = m.top.findNode("VideoQueue")
LaunchArgumentsReceived() LaunchArgumentsReceived()
m.scene.ObserveField("inputArgs", FuncName(InputArgumentsReceived)) m.scene.ObserveField("inputArgs", FuncName(InputArgumentsReceived))
@@ -28,14 +29,6 @@ function ProcessArguments(args as object) as void
return return
end if end if
if not StringUtils.IsNullOrEmpty(args.visitorData)
if m.innertube = invalid
m.innertube = m.top.findNode("InnerTube")
end if
m.innertube.visitorData = args.visitorData
end if
if not StringUtils.IsNullOrEmpty(args.contentId) and StringUtils.IsNullOrEmpty(args.videoId) if not StringUtils.IsNullOrEmpty(args.contentId) and StringUtils.IsNullOrEmpty(args.videoId)
args.videoId = args.contentId args.videoId = args.contentId
end if end if
@@ -50,9 +43,6 @@ function ProcessArguments(args as object) as void
if args.timestamp <> invalid if args.timestamp <> invalid
node.timestamp = args.timestamp node.timestamp = args.timestamp
end if end if
if m.videoQueue = invalid
m.videoQueue = m.top.findNode("VideoQueue")
end if
m.videoQueue.playVideo = node m.videoQueue.playVideo = node
end if end if
end function end function
+17 -9
View File
@@ -33,7 +33,7 @@ function SetScenePalette(scene as object) as void
scene.palette = palette scene.palette = palette
end function end function
const HAS_ANNOUNCEMENT = false const HAS_ANNOUNCEMENT = true
function MainSceneContainerChanged() function MainSceneContainerChanged()
AutoBindSceneGraph() AutoBindSceneGraph()
@@ -62,18 +62,26 @@ function StartWebServer()
end function end function
function ShowAnnouncement() as boolean function ShowAnnouncement() as boolean
deviceInfo = CreateObject("roDeviceInfo")
deviceName = deviceInfo.GetFriendlyName()
dialog = DialogUtils.ShowDialogOnce({ dialog = DialogUtils.ShowDialogOnce({
messageId: "1747362859" messageId: "1750501488"
title: "Announcement - YouTube account support" title: "Web app workaround"
message: [ message: [
"YouTube account support is now available in Playlet!" "If you're experiencing issues playing videos, please consider this workaround while we work on a fix:"
`Subscriptions, playlists, watch history and "Recommended" are now available in the app.` ]
"If you encounter any issues, please report them on GitHub." bulletText: [
"https://github.com/iBicha/playlet/issues" `Go to the "Remote" screen, and scan the QR code to open the web app in your browser.`
"Thank you." `Tap the video you want to play.`
`Select the "Play on ${deviceName} (ytjs)" button.`
]
bottomMessage: [
"Apologies for the inconvenience, and thank you for your patience!"
"Issue link: https://github.com/iBicha/playlet/issues/626"
] ]
alwaysOnTop: true alwaysOnTop: true
marginWidth: 180 large: true
}) })
if dialog = invalid if dialog = invalid
@@ -38,7 +38,7 @@ function MainSceneContainerChanged()
StartWebServer() StartWebServer()
HideLoadingScreen() HideLoadingScreen()
InitEcpArgs() InitEcpArgs()
if false if true
if not ShowAnnouncement() if not ShowAnnouncement()
m.scene.signalBeacon("AppLaunchComplete") m.scene.signalBeacon("AppLaunchComplete")
end if end if
@@ -58,18 +58,25 @@ function StartWebServer()
end function end function
function ShowAnnouncement() as boolean function ShowAnnouncement() as boolean
deviceInfo = CreateObject("roDeviceInfo")
deviceName = deviceInfo.GetFriendlyName()
dialog = DialogUtils_ShowDialogOnce({ dialog = DialogUtils_ShowDialogOnce({
messageId: "1747362859" messageId: "1750501488"
title: "Announcement - YouTube account support" title: "Web app workaround"
message: [ message: [
"YouTube account support is now available in Playlet!" "If you're experiencing issues playing videos, please consider this workaround while we work on a fix:"
"Subscriptions, playlists, watch history and " + chr(34) + "Recommended" + chr(34) + " are now available in the app." ]
"If you encounter any issues, please report them on GitHub." bulletText: [
"https://github.com/iBicha/playlet/issues" "Go to the " + chr(34) + "Remote" + chr(34) + " screen, and scan the QR code to open the web app in your browser."
"Thank you." "Tap the video you want to play."
("Select the " + chr(34) + "Play on " + bslib_toString(deviceName) + " (ytjs)" + chr(34) + " button.")
]
bottomMessage: [
"Apologies for the inconvenience, and thank you for your patience!"
"Issue link: https://github.com/iBicha/playlet/issues/626"
] ]
alwaysOnTop: true alwaysOnTop: true
marginWidth: 180 large: true
}) })
if dialog = invalid if dialog = invalid
return false return false
@@ -188,9 +188,8 @@ function GeneratePairingCode()
deviceId: m.loungeService.deviceId deviceId: m.loungeService.deviceId
} }
callback = JobSystem.CreateCallback(OnLoungeGenerateManualPairingCodeJobDone) m.loungeGenerateManualPairingCodeJob = JobSystem.CreateCallback(OnLoungeGenerateManualPairingCodeJobDone)
JobSystem.QueueJob(m.jobQueue, Jobs.LoungeGenerateManualPairingCodeJob, input, callback) JobSystem.QueueJob(m.jobQueue, Jobs.LoungeGenerateManualPairingCodeJob, input, m.loungeGenerateManualPairingCodeJob)
m.loungeGenerateManualPairingCodeJob = callback
end function end function
function OnLoungeGenerateManualPairingCodeJobDone(event as object) as void function OnLoungeGenerateManualPairingCodeJobDone(event as object) as void
@@ -111,9 +111,8 @@ function OnTextChange() as void
"searchScreen": m.top "searchScreen": m.top
} }
callback = JobSystem.CreateCallback() m.searchSuggestionsJob = JobSystem.CreateCallback()
JobSystem.QueueJob(m.jobQueue, Jobs.SearchSuggestionsJob, input, callback) JobSystem.QueueJob(m.jobQueue, Jobs.SearchSuggestionsJob, input, m.searchSuggestionsJob)
m.searchSuggestionsJob = callback
end function end function
function OnSearchSuggestions(event as object) as void function OnSearchSuggestions(event as object) as void
@@ -132,7 +132,7 @@ function Close()
end function end function
function OnCategorySelected(event as object) as void function OnCategorySelected(event as object) as void
itemSelected = m.categoryList.itemSelected itemSelected = event.GetData()
itemNode = m.categoryList.content.GetChild(itemSelected) itemNode = m.categoryList.content.GetChild(itemSelected)
if itemNode = invalid if itemNode = invalid
LogError("Invalid item selected:", itemSelected) LogError("Invalid item selected:", itemSelected)
@@ -109,6 +109,10 @@ end function
function AddVideoBookmark(id as string, groupName as string) function AddVideoBookmark(id as string, groupName as string)
bookmarkGroupNode = GetOrCreateBookmarkGroup(groupName) bookmarkGroupNode = GetOrCreateBookmarkGroup(groupName)
' TODO:P1 instead of just storying the video id, we should store
' enough metadata for display (videoId, author, authorId, title,
' duration, isLive) that way all data is offline and avoid making
' a request altogether.
feedSource = { feedSource = {
"apiType": "Invidious" "apiType": "Invidious"
"endpoint": "video_info" "endpoint": "video_info"
@@ -24,9 +24,8 @@ function OnRequestVisitorData() as void
innertube: m.top innertube: m.top
} }
callback = JobSystem.CreateCallback(OnInnertubeSessionDataJobDone) m.innertubeSessionDataJob = JobSystem.CreateCallback(OnInnertubeSessionDataJobDone)
JobSystem.QueueJob(m.top.jobQueue, Jobs.InnertubeSessionDataJob, input, callback) JobSystem.QueueJob(m.top.jobQueue, Jobs.InnertubeSessionDataJob, input, m.innertubeSessionDataJob)
m.innertubeSessionDataJob = callback
end function end function
function OnInnertubeSessionDataJobDone(event as object) as void function OnInnertubeSessionDataJobDone(event as object) as void
@@ -113,33 +113,50 @@ namespace InnertubeService
} }
end if end if
responseData = ObjectUtils.Dig(responseData, ["contents", "twoColumnWatchNextResults", "playlist", "playlist"]) ' If we're fetching more than one video, we want to search for the playlist
if responseData = invalid if videoIds.Count() > 1
' Sometimes the response doesn't contain a playlist. responseData = ObjectUtils.Dig(responseData, ["contents", "twoColumnWatchNextResults", "playlist", "playlist"])
' The theory here is that when a private video is in the list, the created playlist if responseData = invalid
' is no longer publicly available. That's why it is not returned. Also happens with ' Sometimes the response doesn't contain a playlist.
' a deleted video. ' The theory here is that when a private video is in the list, the created playlist
' A retry after a short sleep SOMETIMES fixes this (but not always). ' is no longer publicly available. That's why it is not returned. Also happens with
' TODO:P1: Figure out why this happens and if there's a better way to handle it. ' a deleted video.
if retry ' A retry after a short sleep SOMETIMES fixes this (but not always).
LogWarn("Response data missing playlist. Retrying in a bit...") ' TODO:P1: Figure out why this happens and if there's a better way to handle it.
newOptions = {} if retry
if options <> invalid LogWarn("Response data missing playlist. Retrying in a bit...")
newOptions.Append(options) newOptions = {}
if options <> invalid
newOptions.Append(options)
end if
newOptions["retry"] = false
sleep(200 + Rnd(500))
return GetVideoInfoBatched(videoIds, newOptions)
else
LogWarn("Response data missing playlist. Not retrying.")
end if end if
newOptions["retry"] = false
sleep(200 + Rnd(500))
return GetVideoInfoBatched(videoIds, newOptions)
else
LogWarn("Response data missing playlist. Not retrying.")
end if end if
end if end if
feeds = Innertube.ParseResponseDataForFeeds(responseData) feeds = Innertube.ParseResponseDataForFeeds(responseData)
if feeds.Count() > 0
return { if videoIds.Count() > 1
videos: ValidArray(feeds[0].items) if feeds.Count() > 0
} return {
videos: ValidArray(feeds[0].items)
}
end if
else
if feeds.Count() > 0
foundVideos = feeds[0].items
for each video in foundVideos
if video.videoId = videoIds[0]
return {
videos: [video]
}
end if
end for
end if
end if end if
return { return {
@@ -44,6 +44,7 @@ namespace Innertube
"twoColumnSearchResultsRenderer": ParseTwoColumnSearchResultsRenderer "twoColumnSearchResultsRenderer": ParseTwoColumnSearchResultsRenderer
"singleColumnBrowseResultsRenderer": ParseSingleColumnBrowseResultsRenderer "singleColumnBrowseResultsRenderer": ParseSingleColumnBrowseResultsRenderer
"twoColumnBrowseResultsRenderer": ParseTwoColumnBrowseResultsRenderer "twoColumnBrowseResultsRenderer": ParseTwoColumnBrowseResultsRenderer
"twoColumnWatchNextResults": ParseTwoColumnWatchNextResults
"watchNextEndScreenRenderer": ParseWatchNextEndScreenRenderer "watchNextEndScreenRenderer": ParseWatchNextEndScreenRenderer
"tabRenderer": ParseTabRenderer "tabRenderer": ParseTabRenderer
"sectionListRenderer": ParseSectionListRenderer "sectionListRenderer": ParseSectionListRenderer
@@ -61,6 +62,8 @@ namespace Innertube
"playlistVideoListContinuation": ParsePlaylistVideoListContinuation "playlistVideoListContinuation": ParsePlaylistVideoListContinuation
"videoRenderer": ParseVideoRenderer "videoRenderer": ParseVideoRenderer
"gridVideoRenderer": ParseGridVideoRenderer "gridVideoRenderer": ParseGridVideoRenderer
"compactVideoRenderer": ParseCompactVideoRenderer
"videoPrimaryInfoRenderer": ParseVideoPrimaryInfoRenderer
"channelVideoPlayerRenderer": ParseChannelVideoPlayerRenderer "channelVideoPlayerRenderer": ParseChannelVideoPlayerRenderer
"playlistVideoRenderer": ParsePlaylistVideoRenderer "playlistVideoRenderer": ParsePlaylistVideoRenderer
"playlistPanelVideoRenderer": ParsePlaylistPanelVideoRenderer "playlistPanelVideoRenderer": ParsePlaylistPanelVideoRenderer
@@ -88,6 +91,14 @@ namespace Innertube
"gridContinuation": ParseGridContinuation "gridContinuation": ParseGridContinuation
"tvSurfaceContentContinuation": ParseTvSurfaceContentContinuation "tvSurfaceContentContinuation": ParseTvSurfaceContentContinuation
' Ignored nodes: ' Ignored nodes:
' Contains comments "teaser".
"commentsEntryPointHeaderRenderer": ParseNotImplemented
' Contains the owner of the video from "videoPrimaryInfoRenderer"
"videoSecondaryInfoRenderer": ParseNotImplemented
' Empty node? Perhaps used in some cases
"compositeVideoPrimaryInfoRenderer": ParseNotImplemented
' An information panel, could contain a link to some website, or a message.
"infoPanelContainerRenderer": ParseNotImplemented
' When you mispell something in the search bar, this renderer shows ' When you mispell something in the search bar, this renderer shows
"didYouMeanRenderer": ParseNotImplemented "didYouMeanRenderer": ParseNotImplemented
' A list of subscribers in a channel with a CTA to subscribe. ' A list of subscribers in a channel with a CTA to subscribe.
@@ -118,6 +129,7 @@ namespace Innertube
"searchBarRenderer": ParseNotImplemented "searchBarRenderer": ParseNotImplemented
"clickTrackingParams": ParseNotImplemented "clickTrackingParams": ParseNotImplemented
"promoShelfRenderer": ParseNotImplemented "promoShelfRenderer": ParseNotImplemented
"merchandiseShelfRenderer": ParseNotImplemented
"statementBannerRenderer": ParseNotImplemented "statementBannerRenderer": ParseNotImplemented
"adSlotRenderer": ParseNotImplemented "adSlotRenderer": ParseNotImplemented
"adsControlFlowOpportunityReceivedCommand": ParseNotImplemented "adsControlFlowOpportunityReceivedCommand": ParseNotImplemented
@@ -136,6 +148,32 @@ namespace Innertube
return nodeData["tabs"] return nodeData["tabs"]
end function end function
function ParseTwoColumnWatchNextResults(nodeData as object, _context as object) as object
subItems = []
results = ObjectUtils.Dig(nodeData, ["results", "results", "contents"])
if results <> invalid
subItems.Push(results)
end if
secondaryResults = ObjectUtils.Dig(nodeData, ["secondaryResults", "secondaryResults", "results"])
if secondaryResults <> invalid
subItems.Push(secondaryResults)
end if
' Technically, this playlist would have its own title, and should count as a separate feed.
' For now, we just add it to the current feed.
playlist = ObjectUtils.Dig(nodeData, ["playlist", "playlist", "contents"])
if playlist <> invalid
subItems.Push(playlist)
end if
if subItems.Count() = 0
LogWarn("No results found in TwoColumnWatchNextResults", nodeData)
return invalid
end if
return subItems
end function
function ParseWatchNextEndScreenRenderer(nodeData as object, _context as object) as object function ParseWatchNextEndScreenRenderer(nodeData as object, _context as object) as object
return nodeData["results"] return nodeData["results"]
end function end function
@@ -267,7 +305,7 @@ namespace Innertube
function ParseVideoRenderer(nodeData as object, context as object) as object function ParseVideoRenderer(nodeData as object, context as object) as object
videoId = nodeData["videoId"] videoId = nodeData["videoId"]
if not IsString(videoId) if not IsString(videoId)
LogWarn("Invalid video ID", nodeData) LogWarn("Invalid video ID", `\n`, FormatJson(nodeData))
return invalid return invalid
end if end if
@@ -369,7 +407,7 @@ namespace Innertube
function ParseGridVideoRenderer(nodeData as object, context as object) as object function ParseGridVideoRenderer(nodeData as object, context as object) as object
videoId = nodeData["videoId"] videoId = nodeData["videoId"]
if not IsString(videoId) if not IsString(videoId)
LogWarn("Invalid video ID", nodeData) LogWarn("Invalid video ID", `\n`, FormatJson(nodeData))
return invalid return invalid
end if end if
@@ -451,10 +489,141 @@ namespace Innertube
return invalid return invalid
end function end function
function ParseCompactVideoRenderer(nodeData as object, context as object) as object
videoId = nodeData["videoId"]
if not IsString(videoId)
LogWarn("Invalid video ID", `\n`, FormatJson(nodeData))
return invalid
end if
author = invalid
authorId = invalid
authorPossibleNodes = ["ownerText", "shortBylineText", "longBylineText"]
for each authorPossibleNode in authorPossibleNodes
node = nodeData[authorPossibleNode]
author = ParseText(node)
authorId = ObjectUtils.Dig(node, ["runs", 0, "navigationEndpoint", "browseEndpoint", "browseId"])
if author <> "" and authorId <> invalid
exit for
end if
end for
viewCountText = ParseText(nodeData["shortViewCountText"])
if viewCountText = ""
viewCountText = ParseText(nodeData["viewCountText"])
end if
publishedText = ParseText(nodeData["publishedTimeText"])
lengthText = ParseText(nodeData["lengthText"])
if lengthText = ""
thumbnailOverlays = nodeData["thumbnailOverlays"]
if IsArray(thumbnailOverlays)
for each overlay in thumbnailOverlays
parsedTimeStatusRenderer = ParseThumbnailOverlayTimeStatusRenderer(overlay)
if parsedTimeStatusRenderer <> invalid
lengthText = parsedTimeStatusRenderer.text
if lengthText <> ""
exit for
end if
end if
end for
end if
end if
if context.generateVideoThumbnails = true
videoThumbnails = GenerateVideoThumbnails(videoId)
else
videoThumbnails = ObjectUtils.Dig(nodeData, ["thumbnail", "thumbnails"])
if videoThumbnails = invalid
videoThumbnails = GenerateVideoThumbnails(videoId)
end if
end if
isUpcoming = false
liveNow = ValidString(ObjectUtils.Dig(nodeData, ["badges", 0, "metadataBadgeRenderer", "icon", "iconType"])) = "LIVE"
thumbnailOverlays = nodeData["thumbnailOverlays"]
if IsArray(thumbnailOverlays)
for each overlay in thumbnailOverlays
parsedTimeStatusRenderer = ParseThumbnailOverlayTimeStatusRenderer(overlay)
if parsedTimeStatusRenderer <> invalid
if parsedTimeStatusRenderer.isShort
if context.disableShorts = true
LogInfo("Skipping Short based on user settings")
return invalid
end if
end if
liveNow = liveNow or parsedTimeStatusRenderer.isLive
isUpcoming = isUpcoming or parsedTimeStatusRenderer.isUpcoming
end if
end for
end if
premiereTimestamp = ObjectUtils.Dig(nodeData, ["upcomingEventData", "startTime"])
if IsString(premiereTimestamp)
premiereTimestamp = premiereTimestamp.ToInt()
isUpcoming = true
end if
video = {
"type": "video"
"videoId": videoId
"author": author
"authorId": authorId
"title": ParseText(nodeData["title"])
"videoThumbnails": videoThumbnails
"viewCountText": viewCountText
"publishedText": publishedText
"lengthText": lengthText
"liveNow": liveNow
}
if isUpcoming
video["isUpcoming"] = true
video["premiereTimestamp"] = premiereTimestamp
end if
PushFeedItem(video, context)
return invalid
end function
function ParseVideoPrimaryInfoRenderer(nodeData as object, context as object) as object
videoId = nodeData["videoId"]
if not IsString(videoId)
videoId = ObjectUtils.Dig(nodeData, ["updatedMetadataEndpoint", "updatedMetadataEndpoint", "videoId"])
if not IsString(videoId)
LogWarn("Invalid video ID", `\n`, FormatJson(nodeData))
return invalid
end if
end if
title = ParseText(nodeData["title"])
videoThumbnails = GenerateVideoThumbnails(videoId)
publishedText = ParseText(nodeData["relativeDateText"])
if publishedText = ""
publishedText = ParseText(nodeData["dateText"])
end if
viewCountText = ParseText(ObjectUtils.Dig(nodeData, ["viewCount", "videoViewCountRenderer", "viewCount"]))
' TODO:P2 the owner of the video is under videoSecondaryInfoRenderer in a neibouring node.
video = {
"type": "video"
"videoId": videoId
"title": title
"videoThumbnails": videoThumbnails
"viewCountText": viewCountText
"publishedText": publishedText
}
PushFeedItem(video, context)
return invalid
end function
function ParseChannelVideoPlayerRenderer(nodeData as object, context as object) as object function ParseChannelVideoPlayerRenderer(nodeData as object, context as object) as object
videoId = nodeData["videoId"] videoId = nodeData["videoId"]
if not IsString(videoId) if not IsString(videoId)
LogWarn("Invalid video ID", nodeData) LogWarn("Invalid video ID", `\n`, FormatJson(nodeData))
return invalid return invalid
end if end if
@@ -483,7 +652,7 @@ namespace Innertube
function ParsePlaylistVideoRenderer(nodeData as object, context as object) as object function ParsePlaylistVideoRenderer(nodeData as object, context as object) as object
videoId = nodeData["videoId"] videoId = nodeData["videoId"]
if not IsString(videoId) if not IsString(videoId)
LogWarn("Invalid video ID", nodeData) LogWarn("Invalid video ID", `\n`, FormatJson(nodeData))
return invalid return invalid
end if end if
@@ -532,7 +701,7 @@ namespace Innertube
function ParsePlaylistPanelVideoRenderer(nodeData as object, context as object) as object function ParsePlaylistPanelVideoRenderer(nodeData as object, context as object) as object
videoId = nodeData["videoId"] videoId = nodeData["videoId"]
if not IsString(videoId) if not IsString(videoId)
LogWarn("Invalid video ID", nodeData) LogWarn("Invalid video ID", `\n`, FormatJson(nodeData))
return invalid return invalid
end if end if
@@ -598,7 +767,7 @@ namespace Innertube
function ParseEndScreenVideoRenderer(nodeData as object, context as object) as object function ParseEndScreenVideoRenderer(nodeData as object, context as object) as object
videoId = nodeData["videoId"] videoId = nodeData["videoId"]
if not IsString(videoId) if not IsString(videoId)
LogWarn("Invalid video ID", nodeData) LogWarn("Invalid video ID", `\n`, FormatJson(nodeData))
return invalid return invalid
end if end if
@@ -930,7 +1099,7 @@ namespace Innertube
videoId = ObjectUtils.Dig(nodeData, ["onTap", "innertubeCommand", "reelWatchEndpoint", "videoId"]) videoId = ObjectUtils.Dig(nodeData, ["onTap", "innertubeCommand", "reelWatchEndpoint", "videoId"])
if not IsString(videoId) if not IsString(videoId)
LogWarn("Invalid video ID", nodeData) LogWarn("Invalid video ID", `\n`, FormatJson(nodeData))
return invalid return invalid
end if end if
@@ -1017,7 +1186,7 @@ namespace Innertube
function TileRendererTypeVideo(nodeData as object, context as object) as object function TileRendererTypeVideo(nodeData as object, context as object) as object
videoId = nodeData["contentId"] videoId = nodeData["contentId"]
if not IsString(videoId) if not IsString(videoId)
LogWarn("Invalid video ID", nodeData) LogWarn("Invalid video ID", `\n`, FormatJson(nodeData))
return invalid return invalid
end if end if
@@ -1106,7 +1275,7 @@ namespace Innertube
videoId = nodeData["contentId"] videoId = nodeData["contentId"]
if not IsString(videoId) if not IsString(videoId)
LogWarn("Invalid video ID", nodeData) LogWarn("Invalid video ID", `\n`, FormatJson(nodeData))
return invalid return invalid
end if end if
@@ -26,6 +26,7 @@ namespace Innertube
"autoCaptionsDefaultOn": false "autoCaptionsDefaultOn": false
"html5Preference": "HTML5_PREF_WANTS" "html5Preference": "HTML5_PREF_WANTS"
"lactMilliseconds": "-1" "lactMilliseconds": "-1"
"isInlinePlaybackNoAd": true
} }
} }
"attestationRequest": { "attestationRequest": {
@@ -228,8 +228,8 @@ function InitContent() as void
} }
callback = JobSystem.CreateCallback(OnVideoRowListContentJobDone) callback = JobSystem.CreateCallback(OnVideoRowListContentJobDone)
JobSystem.QueueJob(m.jobQueue, Jobs.VideoRowListContentJob, input, callback)
m.pendingLoadJobs[callback.id] = { callback: callback } m.pendingLoadJobs[callback.id] = { callback: callback }
JobSystem.QueueJob(m.jobQueue, Jobs.VideoRowListContentJob, input, callback)
end function end function
function CancelCurrentJobs() function CancelCurrentJobs()
@@ -316,8 +316,8 @@ function LoadRowContent(contentNode as object) as void
} }
callback = JobSystem.CreateCallback(OnVideoRowListRowContentJobDone) callback = JobSystem.CreateCallback(OnVideoRowListRowContentJobDone)
JobSystem.QueueJob(m.jobQueue, Jobs.VideoRowListRowContentJob, input, callback)
m.pendingLoadJobs[callback.id] = { callback: callback, content: contentNode } m.pendingLoadJobs[callback.id] = { callback: callback, content: contentNode }
JobSystem.QueueJob(m.jobQueue, Jobs.VideoRowListRowContentJob, input, callback)
end function end function
function OnVideoRowListRowContentJobDone(event as object) as void function OnVideoRowListRowContentJobDone(event as object) as void
@@ -217,9 +217,8 @@ namespace SponsorBlock
m.sponsorSkipEventJob.cancel = true m.sponsorSkipEventJob.cancel = true
end if end if
callback = JobSystem.CreateCallback() m.sponsorSkipEventJob = JobSystem.CreateCallback()
JobSystem.QueueJob(m.jobQueue, Jobs.SponsorBlockSegmentViewedJob, { segmentId: segmentId }, callback) JobSystem.QueueJob(m.jobQueue, Jobs.SponsorBlockSegmentViewedJob, { segmentId: segmentId }, m.sponsorSkipEventJob)
m.sponsorSkipEventJob = callback
end function end function
end namespace end namespace
@@ -29,7 +29,7 @@ function VideoContentTask(input as object) as object
messagePort = CreateObject("roMessagePort") messagePort = CreateObject("roMessagePort")
MessagePortUtils.ObserveFieldScopedExSafe(innertubeNode, "visitorData", messagePort) MessagePortUtils.ObserveFieldScopedExSafe(innertubeNode, "visitorData", messagePort)
innertubeNode.requestVisitorData = true innertubeNode.requestVisitorData = true
message = wait(10000, messagePort) message = wait(20000, messagePort)
innertubeNode.unobserveFieldScoped("visitorData") innertubeNode.unobserveFieldScoped("visitorData")
if message = invalid if message = invalid
return { return {
@@ -26,10 +26,11 @@ function VideoQueueViewContentTask(input as object) as object
visitorData: innertubeNode.visitorData visitorData: innertubeNode.visitorData
} }
' TODO:P1: Use InnertubeService.GetVideoInfoBatched instead of loading each video individually ' TODO:P1: Use InnertubeService.GetVideoInfoBatched with an array instead of loading each video individually
' TODO:P1: It turns out this might be too much. With a large number of videos ' TODO:P1: It turns out this might be too much. With a large number of videos
' YouTube starts to rate limit us. ' YouTube starts to rate limit us.
' Need to change it to load on demand using render tracking ' Need to change it to load on demand using render tracking
' Or maybe not load this stuff at all.
for i = index to videoNodes.Count() - 1 for i = index to videoNodes.Count() - 1
videoNode = videoNodes[i] videoNode = videoNodes[i]
if not LoadVideoDetail(videoNode, service, instance, requestOptions, backend) if not LoadVideoDetail(videoNode, service, instance, requestOptions, backend)
@@ -57,12 +58,19 @@ function VideoQueueViewContentTask(input as object) as object
return invalid return invalid
end function end function
' Returns true if the video was loaded from cache.
function LoadVideoDetail(videoNode as object, service as object, instance as string, requestOptions as object, backend as string) as boolean function LoadVideoDetail(videoNode as object, service as object, instance as string, requestOptions as object, backend as string) as boolean
videoId = videoNode.videoId videoId = videoNode.videoId
if backend = "playlet" if backend = "playlet"
metadata = InnertubeService.GetVideoMetadata(videoId, requestOptions) requestOptions["retry"] = false
metadata = InnertubeService.GetVideoInfoBatched([videoId], requestOptions)
if IsArray(metadata.videos) and metadata.videos.Count() > 0
metadata = metadata.videos[0]
else
metadata = {
"error": "Failed to get video info with video_info_batched=true"
}
end if
else else
metadata = service.GetVideoMetadata(videoId, requestOptions) metadata = service.GetVideoMetadata(videoId, requestOptions)
end if end if
@@ -572,17 +572,38 @@ namespace Http
videoId = videoId.Left(videoId.InStr("?")) videoId = videoId.Left(videoId.InStr("?"))
end if end if
raw = request.query.raw <> invalid raw = request.query.raw <> invalid
videoInfoBatched = request.query.video_info_batched <> invalid
options = { options = {
"raw": raw "raw": raw
"visitorData": m.innertube.visitorData "visitorData": m.innertube.visitorData
} }
metadata = InnertubeService.GetVideoMetadata(videoId, options) if videoInfoBatched
options["retry"] = false
metadata = InnertubeService.GetVideoInfoBatched([videoId], options)
if IsArray(metadata.videos) and metadata.videos.Count() > 0
metadata = metadata.videos[0]
else
metadata = {
"error": "Failed to get video info with video_info_batched=true"
}
end if
else
metadata = InnertubeService.GetVideoMetadata(videoId, options)
end if
response.Json(metadata) response.Json(metadata)
if metadata.error <> invalid if metadata.error <> invalid
response.http_code = 500 response.http_code = 500
return true
end if
' If we're only interested in video info and not streaming data,
' we can return longer cache time.
if videoInfoBatched
response.headers["cache-control"] = "public, max-age=259200" ' 3 days
end if end if
return true return true
@@ -96,6 +96,10 @@ video_info:
url: /api/v1/videos/{id} url: /api/v1/videos/{id}
responseHandler: VideoInfoHandler responseHandler: VideoInfoHandler
cacheSeconds: 259200 # 3 days cacheSeconds: 259200 # 3 days
queryParams:
video_info_batched:
type: boolean
default: true
playlist_info: playlist_info:
title: Playlist title: Playlist
+1 -1
View File
@@ -3,7 +3,7 @@ title=PlayletLib
# Do not update version manually, it is auto updated from package.json # Do not update version manually, it is auto updated from package.json
major_version=0 major_version=0
minor_version=40 minor_version=40
build_version=00005 build_version=00006
ui_resolutions=hd ui_resolutions=hd
uri_resolution_autosub=$$RES$$,480p,720p,1080p uri_resolution_autosub=$$RES$$,480p,720p,1080p
+18 -18
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet-web", "name": "playlet-web",
"version": "0.40.5", "version": "0.40.6",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-web", "name": "playlet-web",
"version": "0.40.5", "version": "0.40.6",
"devDependencies": { "devDependencies": {
"@sveltejs/vite-plugin-svelte": "^5.1.0", "@sveltejs/vite-plugin-svelte": "^5.1.0",
"@tailwindcss/typography": "^0.5.16", "@tailwindcss/typography": "^0.5.16",
@@ -17,12 +17,12 @@
"daisyui": "^4.12.23", "daisyui": "^4.12.23",
"dotenv": "^16.5.0", "dotenv": "^16.5.0",
"ip": "^2.0.1", "ip": "^2.0.1",
"postcss": "^8.5.5", "postcss": "^8.5.6",
"svelte": "^5.34.1", "svelte": "^5.34.7",
"svelte-check": "^4.2.1", "svelte-check": "^4.2.2",
"svelte-preprocess": "^6.0.3", "svelte-preprocess": "^6.0.3",
"tailwindcss": "^3.4.17", "tailwindcss": "^3.4.17",
"terser": "^5.42.0", "terser": "^5.43.1",
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.8.3", "typescript": "^5.8.3",
"vite": "^6.3.5", "vite": "^6.3.5",
@@ -3811,9 +3811,9 @@
} }
}, },
"node_modules/postcss": { "node_modules/postcss": {
"version": "8.5.5", "version": "8.5.6",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.5.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
"integrity": "sha512-d/jtm+rdNT8tpXuHY5MMtcbJFBkhXE6593XVR9UoGCH8jSFGci7jGvMGH5RYd5PBJW+00NZQt6gf7CbagJCrhg==", "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -4416,9 +4416,9 @@
} }
}, },
"node_modules/svelte": { "node_modules/svelte": {
"version": "5.34.1", "version": "5.34.7",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-5.34.1.tgz", "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.34.7.tgz",
"integrity": "sha512-jWNnN2hZFNtnzKPptCcJHBWrD9CtbHPDwIRIODufOYaWkR0kLmAIlM384lMt4ucwuIRX4hCJwD2D8ZtEcGJQ0Q==", "integrity": "sha512-5PEg+QQKce4t1qiOtVUhUS3AQRTtxJyGBTpxLcNWnr0Ve8q4r06bMo0Gv8uhtCPWlztZHoi3Ye7elLhu+PCTMg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -4442,9 +4442,9 @@
} }
}, },
"node_modules/svelte-check": { "node_modules/svelte-check": {
"version": "4.2.1", "version": "4.2.2",
"resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.2.1.tgz", "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.2.2.tgz",
"integrity": "sha512-e49SU1RStvQhoipkQ/aonDhHnG3qxHSBtNfBRb9pxVXoa+N7qybAo32KgA9wEb2PCYFNaDg7bZCdhLD1vHpdYA==", "integrity": "sha512-1+31EOYZ7NKN0YDMKusav2hhEoA51GD9Ws6o//0SphMT0ve9mBTsTUEX7OmDMadUP3KjNHsSKtJrqdSaD8CrGQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -4637,9 +4637,9 @@
} }
}, },
"node_modules/terser": { "node_modules/terser": {
"version": "5.42.0", "version": "5.43.1",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.42.0.tgz", "resolved": "https://registry.npmjs.org/terser/-/terser-5.43.1.tgz",
"integrity": "sha512-UYCvU9YQW2f/Vwl+P0GfhxJxbUGLwd+5QrrGgLajzWAtC/23AX0vcise32kkP7Eu0Wu9VlzzHAXkLObgjQfFlQ==", "integrity": "sha512-+6erLbBm0+LROX2sPXlUYx/ux5PyE9K/a92Wrt6oA+WDAoFTdpHE5tCYCI5PNzq2y8df4rA+QgHLJuR4jNymsg==",
"dev": true, "dev": true,
"license": "BSD-2-Clause", "license": "BSD-2-Clause",
"dependencies": { "dependencies": {
+5 -5
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-web", "name": "playlet-web",
"version": "0.40.5", "version": "0.40.6",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
@@ -18,12 +18,12 @@
"daisyui": "^4.12.23", "daisyui": "^4.12.23",
"dotenv": "^16.5.0", "dotenv": "^16.5.0",
"ip": "^2.0.1", "ip": "^2.0.1",
"postcss": "^8.5.5", "postcss": "^8.5.6",
"svelte": "^5.34.1", "svelte": "^5.34.7",
"svelte-check": "^4.2.1", "svelte-check": "^4.2.2",
"svelte-preprocess": "^6.0.3", "svelte-preprocess": "^6.0.3",
"tailwindcss": "^3.4.17", "tailwindcss": "^3.4.17",
"terser": "^5.42.0", "terser": "^5.43.1",
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.8.3", "typescript": "^5.8.3",
"vite": "^6.3.5", "vite": "^6.3.5",
+1 -1
View File
@@ -4,7 +4,7 @@ export class PlayletApi {
static host = () => `http://${getHost()}` static host = () => `http://${getHost()}`
static async getVideoInfo(videoId) { static async getVideoInfo(videoId) {
const response = await fetch(`${PlayletApi.host()}/playlet-invidious-backend/api/v1/videos/${videoId}`); const response = await fetch(`${PlayletApi.host()}/playlet-invidious-backend/api/v1/videos/${videoId}?video_info_batched=true`);
return await response.json(); return await response.json();
} }
+17 -2
View File
@@ -138,8 +138,23 @@ ${JSON.stringify(profilesInfo, null, 2)}
} }
function createGithubIssueUrl() { function createGithubIssueUrl() {
const body = encodeURIComponent(createFeedbackBody()); const body = createFeedbackBody();
return `https://github.com/iBicha/playlet/issues/new?title=${feedbackTitle}&body=${body}`; let bodyEncoded = encodeURIComponent(body);
// Github url known limit is 8192
// Limit body, otherwise URL might be too long
// This is an body arbitrary limit, that should keep us under the 8192 limit
const encodedBodyLimit = 8000;
const bodyLimit = 4200;
if (bodyEncoded.length > encodedBodyLimit) {
bodyEncoded = encodeURIComponent(
body.substring(0, bodyLimit) + "\n\n[...truncated]"
);
}
const url = `https://github.com/iBicha/playlet/issues/new?title=${feedbackTitle}&body=${bodyEncoded}`;
console.log("Github URL length:", url.length);
return url;
} }
function createMailToUrl() { function createMailToUrl() {
+5 -1
View File
@@ -7,6 +7,7 @@ const { existsSync, writeFileSync, readFileSync } = require('fs');
const json5 = require('json5'); const json5 = require('json5');
const md5 = require('crypto-js/md5'); const md5 = require('crypto-js/md5');
const path = require('path'); const path = require('path');
const { executablePath } = require('puppeteer');
const META_EXT = '.meta.json5'; const META_EXT = '.meta.json5';
@@ -116,7 +117,10 @@ function checkFileHash(file, hash) {
} }
async function generateImage(inputImage, options, rootDir) { async function generateImage(inputImage, options, rootDir) {
const opts = { ...options }; const opts = {
launch: { executablePath },
...options
};
opts.outputFilePath = path.join(rootDir, opts.outputFilePath); opts.outputFilePath = path.join(rootDir, opts.outputFilePath);
await convertFile(inputImage, opts); await convertFile(inputImage, opts);
} }