Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4676b45567 | ||
|
|
438050fcca | ||
|
|
70e2608e59 | ||
|
|
d2d875f124 | ||
|
|
6a1069337d | ||
|
|
eb67d9e4c0 | ||
|
|
6d9117a2a0 |
No files matched your search
@@ -5,6 +5,24 @@ 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.39.1] - 2025-05-23
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Regression with watch progress introduced in previous release
|
||||||
|
|
||||||
|
## [0.39.0] - 2025-05-23
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- New settings category: `Content Feed`
|
||||||
|
- New setting: `Disable Shorts`
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- A regression with thumbnails not showing from previous release
|
||||||
|
- Inability to login to Invidious when selected backend is Playlet (local)
|
||||||
|
|
||||||
## [0.38.2] - 2025-05-22
|
## [0.38.2] - 2025-05-22
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.38.2",
|
"version": "0.39.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.38.2",
|
"version": "0.39.1",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.31",
|
"@rokucommunity/bslint": "^0.8.31",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.38.2",
|
"version": "0.39.1",
|
||||||
"description": "Unofficial YouTube client for Roku",
|
"description": "Unofficial YouTube client for Roku",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.31",
|
"@rokucommunity/bslint": "^0.8.31",
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.38.2",
|
"version": "0.39.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.38.2"
|
"version": "0.39.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.38.2",
|
"version": "0.39.1",
|
||||||
"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",
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ 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=38
|
minor_version=39
|
||||||
build_version=00002
|
build_version=00001
|
||||||
|
|
||||||
ui_resolutions=hd
|
ui_resolutions=hd
|
||||||
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.38.2",
|
"version": "0.39.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.38.2"
|
"version": "0.39.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.38.2",
|
"version": "0.39.1",
|
||||||
"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",
|
||||||
|
|||||||
@@ -101,9 +101,16 @@ function CreateChannelFeeds(authorId as string, author as string, tabs as object
|
|||||||
return invalid
|
return invalid
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
disableShorts = m.preferences["content_feed.disable_shorts"]
|
||||||
|
|
||||||
feeds = []
|
feeds = []
|
||||||
for i = 0 to tabs.count() - 1
|
for i = 0 to tabs.count() - 1
|
||||||
tabName = tabs[i]
|
tabName = tabs[i]
|
||||||
|
if tabName = "shorts" and disableShorts
|
||||||
|
LogInfo(`Skipping "Shorts" tab based on user settings`)
|
||||||
|
continue for
|
||||||
|
end if
|
||||||
|
|
||||||
if m.tabs.DoesExist(tabName)
|
if m.tabs.DoesExist(tabName)
|
||||||
if tabsParams <> invalid and tabsParams.DoesExist(tabName)
|
if tabsParams <> invalid and tabsParams.DoesExist(tabName)
|
||||||
params = tabsParams[tabName]
|
params = tabsParams[tabName]
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
<field id="isSubscribed" type="boolean" onChange="OnSubscriptionChanged" />
|
<field id="isSubscribed" type="boolean" onChange="OnSubscriptionChanged" />
|
||||||
<field id="appController" type="node" bind="/AppController" />
|
<field id="appController" type="node" bind="/AppController" />
|
||||||
<field id="invidious" type="node" bind="/Invidious" />
|
<field id="invidious" type="node" bind="/Invidious" />
|
||||||
|
<field id="preferences" type="node" bind="/Preferences" />
|
||||||
<field id="bookmarksService" type="node" bind="/BookmarksService" />
|
<field id="bookmarksService" type="node" bind="/BookmarksService" />
|
||||||
<function name="ShowSortDialog" />
|
<function name="ShowSortDialog" />
|
||||||
</interface>
|
</interface>
|
||||||
|
|||||||
@@ -182,32 +182,13 @@ namespace InnertubeService
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function Search(query as string, options = invalid as object) as object
|
function Search(query as string, options = invalid as object) as object
|
||||||
searchFilters = invalid
|
return Innertube.Search(query, options)
|
||||||
continuation = ""
|
|
||||||
cancellation = invalid
|
|
||||||
raw = false
|
|
||||||
|
|
||||||
if options <> invalid
|
|
||||||
if options.DoesExist("searchFilters")
|
|
||||||
searchFilters = options.searchFilters
|
|
||||||
end if
|
|
||||||
if options.DoesExist("continuation")
|
|
||||||
continuation = options.continuation
|
|
||||||
end if
|
|
||||||
if options.DoesExist("cancellation")
|
|
||||||
cancellation = options.cancellation
|
|
||||||
end if
|
|
||||||
if options.DoesExist("raw")
|
|
||||||
raw = options.raw
|
|
||||||
end if
|
|
||||||
end if
|
|
||||||
|
|
||||||
return Innertube.Search(query, searchFilters, continuation, cancellation, raw)
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function GetTrending(options = invalid as object) as object
|
function GetTrending(options = invalid as object) as object
|
||||||
cancellation = invalid
|
cancellation = invalid
|
||||||
params = ""
|
params = ""
|
||||||
|
disableShorts = false
|
||||||
raw = false
|
raw = false
|
||||||
|
|
||||||
if options <> invalid
|
if options <> invalid
|
||||||
@@ -228,6 +209,9 @@ namespace InnertubeService
|
|||||||
params = "4gIKGgh0cmFpbGVycw%3D%3D"
|
params = "4gIKGgh0cmFpbGVycw%3D%3D"
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
if options.DoesExist("disableShorts")
|
||||||
|
disableShorts = options.disableShorts
|
||||||
|
end if
|
||||||
if options.DoesExist("raw")
|
if options.DoesExist("raw")
|
||||||
raw = options.raw
|
raw = options.raw
|
||||||
end if
|
end if
|
||||||
@@ -252,7 +236,10 @@ namespace InnertubeService
|
|||||||
return response.Json()
|
return response.Json()
|
||||||
end if
|
end if
|
||||||
|
|
||||||
feeds = Innertube.ParseResponseDataForFeeds(response.Json(), { skipCreatorOnTheRise: true })
|
feeds = Innertube.ParseResponseDataForFeeds(response.Json(), {
|
||||||
|
disableCreatorOnTheRise: true
|
||||||
|
disableShorts: disableShorts
|
||||||
|
})
|
||||||
|
|
||||||
result = {
|
result = {
|
||||||
feeds: feeds
|
feeds: feeds
|
||||||
@@ -286,6 +273,7 @@ namespace InnertubeService
|
|||||||
cancellation = invalid
|
cancellation = invalid
|
||||||
accessToken = invalid
|
accessToken = invalid
|
||||||
continuation = ""
|
continuation = ""
|
||||||
|
disableShorts = false
|
||||||
|
|
||||||
if options <> invalid
|
if options <> invalid
|
||||||
if options.DoesExist("cancellation")
|
if options.DoesExist("cancellation")
|
||||||
@@ -297,6 +285,9 @@ namespace InnertubeService
|
|||||||
if options.DoesExist("continuation")
|
if options.DoesExist("continuation")
|
||||||
continuation = options.continuation
|
continuation = options.continuation
|
||||||
end if
|
end if
|
||||||
|
if options.DoesExist("disableShorts")
|
||||||
|
disableShorts = options.disableShorts
|
||||||
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
request = Innertube.CreateBrowseRequest(browserId, Innertube.ClientType.Tv, "", continuation)
|
request = Innertube.CreateBrowseRequest(browserId, Innertube.ClientType.Tv, "", continuation)
|
||||||
@@ -312,7 +303,7 @@ namespace InnertubeService
|
|||||||
}
|
}
|
||||||
end if
|
end if
|
||||||
|
|
||||||
feeds = Innertube.ParseResponseDataForFeeds(response.Json())
|
feeds = Innertube.ParseResponseDataForFeeds(response.Json(), { disableShorts: disableShorts })
|
||||||
|
|
||||||
result = {
|
result = {
|
||||||
feeds: feeds
|
feeds: feeds
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ namespace Innertube
|
|||||||
"searchBarRenderer": ParseNotImplemented
|
"searchBarRenderer": ParseNotImplemented
|
||||||
"clickTrackingParams": ParseNotImplemented
|
"clickTrackingParams": ParseNotImplemented
|
||||||
"promoShelfRenderer": ParseNotImplemented
|
"promoShelfRenderer": ParseNotImplemented
|
||||||
|
"statementBannerRenderer": ParseNotImplemented
|
||||||
"adSlotRenderer": ParseNotImplemented
|
"adSlotRenderer": ParseNotImplemented
|
||||||
"adsControlFlowOpportunityReceivedCommand": ParseNotImplemented
|
"adsControlFlowOpportunityReceivedCommand": ParseNotImplemented
|
||||||
}
|
}
|
||||||
@@ -156,13 +157,13 @@ namespace Innertube
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function ParseShelfRenderer(nodeData as object, context as object) as object
|
function ParseShelfRenderer(nodeData as object, context as object) as object
|
||||||
if context.skipCreatorOnTheRise = true
|
if context.disableCreatorOnTheRise = true
|
||||||
badges = nodeData["badges"]
|
badges = nodeData["badges"]
|
||||||
if IsArray(badges)
|
if IsArray(badges)
|
||||||
for each badge in badges
|
for each badge in badges
|
||||||
if ValidString(ObjectUtils.Dig(badge, ["metadataBadgeRenderer", "style"])) = "BADGE_STYLE_TYPE_FEATURED"
|
if ValidString(ObjectUtils.Dig(badge, ["metadataBadgeRenderer", "style"])) = "BADGE_STYLE_TYPE_FEATURED"
|
||||||
label = ParseText(ObjectUtils.Dig(badge, ["metadataBadgeRenderer", "label"]))
|
label = ParseText(ObjectUtils.Dig(badge, ["metadataBadgeRenderer", "label"]))
|
||||||
LogInfo(`Skipping 'Create on the Rise' shelf (${label})`)
|
LogInfo(`Skipping 'Creator on the Rise' shelf (${label})`)
|
||||||
return invalid
|
return invalid
|
||||||
end if
|
end if
|
||||||
end for
|
end for
|
||||||
@@ -179,7 +180,11 @@ namespace Innertube
|
|||||||
return nodeData["contents"]
|
return nodeData["contents"]
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function ParseReelShelfRenderer(nodeData as object, _context as object) as object
|
function ParseReelShelfRenderer(nodeData as object, context as object) as object
|
||||||
|
if context.disableShorts = true
|
||||||
|
LogInfo("Skipping ReelShelfRenderer based on user settings")
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
' TODO: handle reelShelfRenderer.title
|
' TODO: handle reelShelfRenderer.title
|
||||||
return nodeData["items"]
|
return nodeData["items"]
|
||||||
end function
|
end function
|
||||||
@@ -276,20 +281,31 @@ namespace Innertube
|
|||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
liveNow = ValidString(ObjectUtils.Dig(nodeData, ["badges", 0, "metadataBadgeRenderer", "icon", "iconType"])) = "LIVE"
|
isUpcoming = false
|
||||||
if not liveNow
|
liveNow = false
|
||||||
thumbnailOverlays = nodeData["thumbnailOverlays"]
|
|
||||||
if IsArray(thumbnailOverlays)
|
thumbnailOverlays = nodeData["thumbnailOverlays"]
|
||||||
for each overlay in thumbnailOverlays
|
if IsArray(thumbnailOverlays)
|
||||||
if ValidString(ObjectUtils.Dig(overlay, ["thumbnailOverlayTimeStatusRenderer", "style"])) = "LIVE"
|
for each overlay in thumbnailOverlays
|
||||||
liveNow = true
|
parsedTimeStatusRenderer = ParseThumbnailOverlayTimeStatusRenderer(overlay)
|
||||||
exit for
|
if parsedTimeStatusRenderer <> invalid
|
||||||
|
if parsedTimeStatusRenderer.isShort
|
||||||
|
if context.disableShorts = true
|
||||||
|
LogInfo("Skipping Short based on user settings")
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
end if
|
end if
|
||||||
end for
|
|
||||||
end if
|
liveNow = liveNow or parsedTimeStatusRenderer.isLive
|
||||||
|
isUpcoming = isUpcoming or parsedTimeStatusRenderer.isUpcoming
|
||||||
|
end if
|
||||||
|
end for
|
||||||
|
end if
|
||||||
|
|
||||||
|
if ValidString(ObjectUtils.Dig(nodeData, ["badges", 0, "metadataBadgeRenderer", "icon", "iconType"])) = "LIVE"
|
||||||
|
liveNow = true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
isUpcoming = false
|
|
||||||
premiereTimestamp = ObjectUtils.Dig(nodeData, ["upcomingEventData", "startTime"])
|
premiereTimestamp = ObjectUtils.Dig(nodeData, ["upcomingEventData", "startTime"])
|
||||||
if IsString(premiereTimestamp)
|
if IsString(premiereTimestamp)
|
||||||
premiereTimestamp = premiereTimestamp.ToInt()
|
premiereTimestamp = premiereTimestamp.ToInt()
|
||||||
@@ -362,9 +378,12 @@ namespace Innertube
|
|||||||
thumbnailOverlays = nodeData["thumbnailOverlays"]
|
thumbnailOverlays = nodeData["thumbnailOverlays"]
|
||||||
if IsArray(thumbnailOverlays)
|
if IsArray(thumbnailOverlays)
|
||||||
for each overlay in thumbnailOverlays
|
for each overlay in thumbnailOverlays
|
||||||
lengthText = ParseText(ObjectUtils.Dig(overlay, ["thumbnailOverlayTimeStatusRenderer", "text"]))
|
parsedTimeStatusRenderer = ParseThumbnailOverlayTimeStatusRenderer(overlay)
|
||||||
if lengthText <> ""
|
if parsedTimeStatusRenderer <> invalid
|
||||||
exit for
|
lengthText = parsedTimeStatusRenderer.text
|
||||||
|
if lengthText <> ""
|
||||||
|
exit for
|
||||||
|
end if
|
||||||
end if
|
end if
|
||||||
end for
|
end for
|
||||||
end if
|
end if
|
||||||
@@ -518,8 +537,18 @@ namespace Innertube
|
|||||||
thumbnailOverlays = nodeData["thumbnailOverlays"]
|
thumbnailOverlays = nodeData["thumbnailOverlays"]
|
||||||
if IsArray(thumbnailOverlays)
|
if IsArray(thumbnailOverlays)
|
||||||
for each overlay in thumbnailOverlays
|
for each overlay in thumbnailOverlays
|
||||||
liveNow = liveNow or (ValidString(ObjectUtils.Dig(overlay, ["thumbnailOverlayTimeStatusRenderer", "style"])) = "LIVE")
|
parsedTimeStatusRenderer = ParseThumbnailOverlayTimeStatusRenderer(overlay)
|
||||||
isUpcoming = isUpcoming or (ValidString(ObjectUtils.Dig(overlay, ["thumbnailOverlayTimeStatusRenderer", "style"])) = "UPCOMING")
|
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 for
|
||||||
end if
|
end if
|
||||||
|
|
||||||
@@ -869,6 +898,11 @@ namespace Innertube
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function ParseShortsLockupViewModel(nodeData as object, context as object) as object
|
function ParseShortsLockupViewModel(nodeData as object, context as object) as object
|
||||||
|
if context.disableShorts = true
|
||||||
|
LogInfo("Skipping Short based on user settings")
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
|
||||||
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", nodeData)
|
||||||
@@ -978,17 +1012,30 @@ namespace Innertube
|
|||||||
thumbnailOverlays = ObjectUtils.Dig(nodeData, ["header", "tileHeaderRenderer", "thumbnailOverlays"])
|
thumbnailOverlays = ObjectUtils.Dig(nodeData, ["header", "tileHeaderRenderer", "thumbnailOverlays"])
|
||||||
if IsArray(thumbnailOverlays)
|
if IsArray(thumbnailOverlays)
|
||||||
for each overlay in thumbnailOverlays
|
for each overlay in thumbnailOverlays
|
||||||
maybeLengthText = ParseText(ObjectUtils.Dig(overlay, ["thumbnailOverlayTimeStatusRenderer", "text"]))
|
parsedTimeStatusRenderer = ParseThumbnailOverlayTimeStatusRenderer(overlay)
|
||||||
if maybeLengthText <> ""
|
if parsedTimeStatusRenderer <> invalid
|
||||||
lengthText = maybeLengthText
|
if parsedTimeStatusRenderer.isShort
|
||||||
|
if context.disableShorts = true
|
||||||
|
LogInfo("Skipping Short based on user settings")
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
end if
|
||||||
|
|
||||||
|
maybeLengthText = parsedTimeStatusRenderer.text
|
||||||
|
if maybeLengthText <> ""
|
||||||
|
lengthText = maybeLengthText
|
||||||
|
end if
|
||||||
|
|
||||||
|
liveNow = liveNow or parsedTimeStatusRenderer.isLive
|
||||||
|
isUpcoming = isUpcoming or parsedTimeStatusRenderer.isUpcoming
|
||||||
end if
|
end if
|
||||||
|
|
||||||
maybePercentDurationWatched = ObjectUtils.Dig(overlay, ["thumbnailOverlayResumePlaybackRenderer", "percentDurationWatched"])
|
maybePercentDurationWatched = ObjectUtils.Dig(overlay, ["thumbnailOverlayResumePlaybackRenderer", "percentDurationWatched"])
|
||||||
if maybePercentDurationWatched <> invalid
|
if maybePercentDurationWatched <> invalid
|
||||||
percentDurationWatched = maybePercentDurationWatched
|
percentDurationWatched = maybePercentDurationWatched
|
||||||
end if
|
end if
|
||||||
liveNow = liveNow or (ValidString(ObjectUtils.Dig(overlay, ["thumbnailOverlayTimeStatusRenderer", "style"])) = "LIVE")
|
|
||||||
isUpcoming = isUpcoming or (ValidString(ObjectUtils.Dig(overlay, ["thumbnailOverlayTimeStatusRenderer", "style"])) = "UPCOMING")
|
|
||||||
end for
|
end for
|
||||||
|
|
||||||
if liveNow or isUpcoming
|
if liveNow or isUpcoming
|
||||||
lengthText = ""
|
lengthText = ""
|
||||||
end if
|
end if
|
||||||
@@ -1022,6 +1069,11 @@ namespace Innertube
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function TileRendererTypeShorts(nodeData as object, context as object) as object
|
function TileRendererTypeShorts(nodeData as object, context as object) as object
|
||||||
|
if context.disableShorts = true
|
||||||
|
LogInfo("Skipping Short based on user settings")
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
|
||||||
videoId = nodeData["contentId"]
|
videoId = nodeData["contentId"]
|
||||||
if not IsString(videoId)
|
if not IsString(videoId)
|
||||||
LogWarn("Invalid video ID", nodeData)
|
LogWarn("Invalid video ID", nodeData)
|
||||||
@@ -1204,6 +1256,34 @@ namespace Innertube
|
|||||||
return ParseText(data["text"])
|
return ParseText(data["text"])
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function ParseThumbnailOverlayTimeStatusRenderer(data as object) as object
|
||||||
|
if data = invalid
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
if not IsAssociativeArray(data) or not data.DoesExist("thumbnailOverlayTimeStatusRenderer")
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
|
||||||
|
renderer = data["thumbnailOverlayTimeStatusRenderer"]
|
||||||
|
if not IsAssociativeArray(renderer)
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
|
||||||
|
text = ParseText(renderer["text"])
|
||||||
|
|
||||||
|
overlayStyle = ValidString(renderer["style"])
|
||||||
|
isLive = overlayStyle = "LIVE"
|
||||||
|
isUpcoming = overlayStyle = "UPCOMING"
|
||||||
|
isShort = overlayStyle = "SHORTS"
|
||||||
|
|
||||||
|
return {
|
||||||
|
"text": text
|
||||||
|
"isLive": isLive
|
||||||
|
"isUpcoming": isUpcoming
|
||||||
|
"isShort": isShort
|
||||||
|
}
|
||||||
|
end function
|
||||||
|
|
||||||
function StartNewFeed(title as string, context as object) as void
|
function StartNewFeed(title as string, context as object) as void
|
||||||
if context.currentFeed <> invalid
|
if context.currentFeed <> invalid
|
||||||
if context.currentFeed.items.Count() = 0 and context.currentFeed.title = ""
|
if context.currentFeed.items.Count() = 0 and context.currentFeed.title = ""
|
||||||
|
|||||||
@@ -6,7 +6,31 @@ import "pkg:/source/utils/Types.bs"
|
|||||||
|
|
||||||
namespace Innertube
|
namespace Innertube
|
||||||
|
|
||||||
function Search(query as string, searchFilters as object, continuation = "" as string, cancellation = invalid as object, raw = false as boolean) as object
|
function Search(query as string, options = invalid as object) as object
|
||||||
|
searchFilters = invalid
|
||||||
|
continuation = ""
|
||||||
|
cancellation = invalid
|
||||||
|
disableShorts = false
|
||||||
|
raw = false
|
||||||
|
|
||||||
|
if options <> invalid
|
||||||
|
if options.DoesExist("searchFilters")
|
||||||
|
searchFilters = options.searchFilters
|
||||||
|
end if
|
||||||
|
if options.DoesExist("continuation")
|
||||||
|
continuation = options.continuation
|
||||||
|
end if
|
||||||
|
if options.DoesExist("cancellation")
|
||||||
|
cancellation = options.cancellation
|
||||||
|
end if
|
||||||
|
if options.DoesExist("disableShorts")
|
||||||
|
disableShorts = options.disableShorts
|
||||||
|
end if
|
||||||
|
if options.DoesExist("raw")
|
||||||
|
raw = options.raw
|
||||||
|
end if
|
||||||
|
end if
|
||||||
|
|
||||||
deviceInfo = CreateObject("roDeviceInfo")
|
deviceInfo = CreateObject("roDeviceInfo")
|
||||||
|
|
||||||
payload = {
|
payload = {
|
||||||
@@ -51,7 +75,7 @@ namespace Innertube
|
|||||||
return response.Json()
|
return response.Json()
|
||||||
end if
|
end if
|
||||||
|
|
||||||
feeds = ParseResponseDataForFeeds(response.Json())
|
feeds = ParseResponseDataForFeeds(response.Json(), { disableShorts: disableShorts })
|
||||||
|
|
||||||
result = {
|
result = {
|
||||||
feeds: feeds
|
feeds: feeds
|
||||||
|
|||||||
@@ -7,10 +7,14 @@ function Init()
|
|||||||
m.service = new Invidious.InvidiousService(m.top)
|
m.service = new Invidious.InvidiousService(m.top)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function GetCurrentInstance(_unused as dynamic) as string
|
function GetInstance(_unused as dynamic) as string
|
||||||
return m.service.GetInstance()
|
return m.service.GetInstance()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function GetInvidiousInstance(_unused as dynamic) as string
|
||||||
|
return m.service.GetInvidiousInstance()
|
||||||
|
end function
|
||||||
|
|
||||||
function GetAuthorizeTokenLink(_unused as dynamic) as dynamic
|
function GetAuthorizeTokenLink(_unused as dynamic) as dynamic
|
||||||
return m.service.GetAuthorizeTokenLink()
|
return m.service.GetAuthorizeTokenLink()
|
||||||
end function
|
end function
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
<field id="authToken" type="assocarray" />
|
<field id="authToken" type="assocarray" />
|
||||||
<field id="apiDefinitions" type="assocarray" />
|
<field id="apiDefinitions" type="assocarray" />
|
||||||
|
|
||||||
<function name="GetCurrentInstance" />
|
<function name="GetInstance" />
|
||||||
|
<function name="GetInvidiousInstance" />
|
||||||
<function name="GetAuthorizeTokenLink" />
|
<function name="GetAuthorizeTokenLink" />
|
||||||
</interface>
|
</interface>
|
||||||
</component>
|
</component>
|
||||||
@@ -15,7 +15,7 @@ import "pkg:/source/utils/TimeUtils.bs"
|
|||||||
namespace Invidious
|
namespace Invidious
|
||||||
const INSTANCES_API = "https://api.invidious.io/instances.json?sort_by=type,users"
|
const INSTANCES_API = "https://api.invidious.io/instances.json?sort_by=type,users"
|
||||||
|
|
||||||
const DEFAULT_INSTANCE = "http://127.0.0.1:8888/playlet-invidious-backend"
|
const PLAYLET_BUILT_IN_INSTANCE = "http://127.0.0.1:8888/playlet-invidious-backend"
|
||||||
const INSTANCE_EXAMPLE = "https://invidious.example.com"
|
const INSTANCE_EXAMPLE = "https://invidious.example.com"
|
||||||
|
|
||||||
const TOKEN_CALLBACK = "/invidious/token_callback"
|
const TOKEN_CALLBACK = "/invidious/token_callback"
|
||||||
@@ -73,13 +73,25 @@ namespace Invidious
|
|||||||
|
|
||||||
backend = m.preferences["backend.selected"]
|
backend = m.preferences["backend.selected"]
|
||||||
if backend = "invidious"
|
if backend = "invidious"
|
||||||
instance = m.preferences["invidious.instance"]
|
instance = m.GetInvidiousInstance()
|
||||||
if not StringUtils.IsNullOrEmpty(instance)
|
if not StringUtils.IsNullOrEmpty(instance)
|
||||||
return instance
|
return instance
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
instance = DEFAULT_INSTANCE
|
return m.GetPlayletBuiltinInstance()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function GetInvidiousInstance() as string
|
||||||
|
if m.preferences = invalid
|
||||||
|
m.preferences = m.invidiousNode.preferences
|
||||||
|
end if
|
||||||
|
|
||||||
|
return m.preferences["invidious.instance"]
|
||||||
|
end function
|
||||||
|
|
||||||
|
function GetPlayletBuiltinInstance() as string
|
||||||
|
instance = PLAYLET_BUILT_IN_INSTANCE
|
||||||
address = m.invidiousNode.webServer@.GetServerAddress()
|
address = m.invidiousNode.webServer@.GetServerAddress()
|
||||||
instance = instance.Replace("http://127.0.0.1:8888", address)
|
instance = instance.Replace("http://127.0.0.1:8888", address)
|
||||||
return instance
|
return instance
|
||||||
@@ -732,7 +744,11 @@ namespace Invidious
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function GetAuthorizeTokenLink() as dynamic
|
function GetAuthorizeTokenLink() as dynamic
|
||||||
instance = m.GetInstance()
|
instance = m.GetInvidiousInstance()
|
||||||
|
if StringUtils.IsNullOrEmpty(instance)
|
||||||
|
instance = m.GetPlayletBuiltinInstance()
|
||||||
|
end if
|
||||||
|
|
||||||
' Make sure the host is not on https, because https cannot redirect to http, which is our local server
|
' Make sure the host is not on https, because https cannot redirect to http, which is our local server
|
||||||
invidiousHost = instance.Replace("https://", "http://")
|
invidiousHost = instance.Replace("https://", "http://")
|
||||||
|
|
||||||
|
|||||||
@@ -170,15 +170,16 @@ namespace InvidiousContent
|
|||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function VideoSetThumbnail(node as object, videoItem as object, instance as dynamic, quality = "medium" as string) as boolean
|
function VideoSetThumbnail(node as object, videoItem as object, instance as dynamic, quality = "medium" as string) as void
|
||||||
videoThumbnails = videoItem.videoThumbnails
|
videoThumbnails = videoItem.videoThumbnails
|
||||||
|
hasValidInstance = not StringUtils.IsNullOrEmpty(instance) and instance.InStr(":8888/playlet-invidious-backend") = -1
|
||||||
if videoThumbnails = invalid or videoThumbnails.Count() = 0
|
if videoThumbnails = invalid or videoThumbnails.Count() = 0
|
||||||
if StringUtils.IsNullOrEmpty(instance)
|
if hasValidInstance
|
||||||
node.thumbnail = `https://i.ytimg.com/vi/${videoItem.videoId}/mqdefault.jpg`
|
|
||||||
else
|
|
||||||
node.thumbnail = `${instance}/vi/${videoItem.videoId}/mqdefault.jpg`
|
node.thumbnail = `${instance}/vi/${videoItem.videoId}/mqdefault.jpg`
|
||||||
|
else
|
||||||
|
node.thumbnail = `https://i.ytimg.com/vi/${videoItem.videoId}/mqdefault.jpg`
|
||||||
end if
|
end if
|
||||||
return false
|
return
|
||||||
end if
|
end if
|
||||||
url = invalid
|
url = invalid
|
||||||
for each thumbnail in videoThumbnails
|
for each thumbnail in videoThumbnails
|
||||||
@@ -191,13 +192,13 @@ namespace InvidiousContent
|
|||||||
url = videoThumbnails[0].url
|
url = videoThumbnails[0].url
|
||||||
end if
|
end if
|
||||||
if url.startsWith("/")
|
if url.startsWith("/")
|
||||||
if StringUtils.IsNullOrEmpty(instance)
|
if hasValidInstance
|
||||||
return false
|
url = instance + url
|
||||||
|
else
|
||||||
|
url = `https://i.ytimg.com/vi/${videoItem.videoId}/mqdefault.jpg`
|
||||||
end if
|
end if
|
||||||
url = instance + url
|
|
||||||
end if
|
end if
|
||||||
node.thumbnail = url
|
node.thumbnail = url
|
||||||
return true
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function VideoIsLive(videoItem as object) as boolean
|
function VideoIsLive(videoItem as object) as boolean
|
||||||
@@ -288,16 +289,16 @@ namespace InvidiousContent
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
thumbnail = ""
|
thumbnail = ""
|
||||||
|
hasValidInstance = not StringUtils.IsNullOrEmpty(instance) and instance.InStr(":8888/playlet-invidious-backend") = -1
|
||||||
if IsString(playlistItem.playlistThumbnail)
|
if IsString(playlistItem.playlistThumbnail)
|
||||||
thumbnailUrl = playlistItem.playlistThumbnail
|
thumbnailUrl = playlistItem.playlistThumbnail
|
||||||
if thumbnailUrl.startsWith("/") and not StringUtils.IsNullOrEmpty(playlistItem.instance)
|
if thumbnailUrl.startsWith("/") and hasValidInstance
|
||||||
thumbnailUrl = playlistItem.instance + thumbnailUrl
|
thumbnailUrl = playlistItem.instance + thumbnailUrl
|
||||||
end if
|
end if
|
||||||
thumbnail = thumbnailUrl
|
thumbnail = thumbnailUrl
|
||||||
else if playlistItem.videos <> invalid and playlistItem.videos.Count() > 0 and playlistItem.videos[0].index = 0
|
else if playlistItem.videos <> invalid and playlistItem.videos.Count() > 0 and playlistItem.videos[0].index = 0
|
||||||
if VideoSetThumbnail(node, playlistItem.videos[0], instance, quality)
|
VideoSetThumbnail(node, playlistItem.videos[0], instance, quality)
|
||||||
return
|
return
|
||||||
end if
|
|
||||||
else if node.getChildCount() > 0
|
else if node.getChildCount() > 0
|
||||||
thumbnail = node.getChild(0).thumbnail
|
thumbnail = node.getChild(0).thumbnail
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import "pkg:/source/utils/RegistryUtils.bs"
|
import "pkg:/source/utils/RegistryUtils.bs"
|
||||||
|
import "pkg:/source/utils/StringUtils.bs"
|
||||||
import "pkg:/source/utils/Types.bs"
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
@@ -93,23 +94,21 @@ function MigrateExistingPreferences(userPrefs as object) as boolean
|
|||||||
isDirty = false
|
isDirty = false
|
||||||
|
|
||||||
' v0 -> v1
|
' v0 -> v1
|
||||||
instances = RegistryUtils.Read(RegistryUtils.INVIDIOUS_INSTANCES)
|
if ValidInt(userPrefs.__version) = 0
|
||||||
if instances <> invalid
|
instances = RegistryUtils.Read(RegistryUtils.INVIDIOUS_INSTANCES)
|
||||||
currentInstance = userPrefs["invidious.instance"]
|
if not StringUtils.IsNullOrEmpty(instances)
|
||||||
if currentInstance = invalid or currentInstance = ""
|
currentInstance = userPrefs["invidious.instance"]
|
||||||
instances = ParseJson(instances)
|
if StringUtils.IsNullOrEmpty(currentInstance)
|
||||||
if instances.Count() > 0
|
instances = ParseJson(instances)
|
||||||
instance = instances[0]
|
if IsArray(instances) and instances.Count() > 0
|
||||||
if instance <> invalid and instance <> ""
|
instance = instances[0]
|
||||||
userPrefs["invidious.instance"] = instance
|
if not StringUtils.IsNullOrEmpty(instance)
|
||||||
isDirty = true
|
userPrefs["invidious.instance"] = instance
|
||||||
|
end if
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
RegistryUtils.Delete(RegistryUtils.INVIDIOUS_INSTANCES)
|
||||||
end if
|
end if
|
||||||
RegistryUtils.Delete(RegistryUtils.INVIDIOUS_INSTANCES)
|
|
||||||
end if
|
|
||||||
|
|
||||||
if ValidInt(userPrefs.__version) = 0
|
|
||||||
userPrefs.__version = 1
|
userPrefs.__version = 1
|
||||||
isDirty = true
|
isDirty = true
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ namespace VideoQueueUtils
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
LogInfo(`Playing next recommended video (${videoId})`)
|
LogInfo(`Playing next recommended video (${videoId})`)
|
||||||
instance = invidiousNode@.GetCurrentInstance()
|
instance = invidiousNode@.GetInstance()
|
||||||
node = InvidiousContent.ToVideoContentNode(invalid, recommendedVideo, instance)
|
node = InvidiousContent.ToVideoContentNode(invalid, recommendedVideo, instance)
|
||||||
videoQueue.playVideo = node
|
videoQueue.playVideo = node
|
||||||
return true
|
return true
|
||||||
|
|||||||
+7
-1
@@ -8,7 +8,9 @@ namespace Http
|
|||||||
function new(server as object)
|
function new(server as object)
|
||||||
super()
|
super()
|
||||||
|
|
||||||
m.innertube = server.task.innertube
|
task = server.task
|
||||||
|
m.innertube = task.innertube
|
||||||
|
m.preferences = task.preferences
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@get("/playlet-invidious-backend/authorize_token")
|
@get("/playlet-invidious-backend/authorize_token")
|
||||||
@@ -65,6 +67,7 @@ namespace Http
|
|||||||
|
|
||||||
options = {
|
options = {
|
||||||
"accessToken": accessToken.Mid("Bearer ".Len())
|
"accessToken": accessToken.Mid("Bearer ".Len())
|
||||||
|
"disableShorts": m.preferences["content_feed.disable_shorts"]
|
||||||
}
|
}
|
||||||
continuation = request.query.continuation
|
continuation = request.query.continuation
|
||||||
if not StringUtils.IsNullOrEmpty(continuation)
|
if not StringUtils.IsNullOrEmpty(continuation)
|
||||||
@@ -247,6 +250,7 @@ namespace Http
|
|||||||
raw = request.query.raw <> invalid
|
raw = request.query.raw <> invalid
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
"disableShorts": m.preferences["content_feed.disable_shorts"]
|
||||||
raw: raw
|
raw: raw
|
||||||
type: request.query.type
|
type: request.query.type
|
||||||
}
|
}
|
||||||
@@ -295,6 +299,7 @@ namespace Http
|
|||||||
|
|
||||||
options = {
|
options = {
|
||||||
"accessToken": accessToken.Mid("Bearer ".Len())
|
"accessToken": accessToken.Mid("Bearer ".Len())
|
||||||
|
"disableShorts": m.preferences["content_feed.disable_shorts"]
|
||||||
}
|
}
|
||||||
|
|
||||||
continuation = request.query.continuation
|
continuation = request.query.continuation
|
||||||
@@ -360,6 +365,7 @@ namespace Http
|
|||||||
raw = request.query.raw <> invalid
|
raw = request.query.raw <> invalid
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
"disableShorts": m.preferences["content_feed.disable_shorts"]
|
||||||
raw: raw
|
raw: raw
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,8 @@ namespace Http
|
|||||||
|
|
||||||
if keysDict["invidious"] = true
|
if keysDict["invidious"] = true
|
||||||
state["invidious"] = {
|
state["invidious"] = {
|
||||||
current_instance: m.invidiousNode@.GetCurrentInstance()
|
instance: m.invidiousNode@.GetInstance()
|
||||||
|
invidious_instance: m.invidiousNode@.GetInvidiousInstance()
|
||||||
auth_url: m.invidiousNode@.GetAuthorizeTokenLink()
|
auth_url: m.invidiousNode@.GetAuthorizeTokenLink()
|
||||||
}
|
}
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -53,6 +53,20 @@
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayText: "Content Feed",
|
||||||
|
key: "content_feed",
|
||||||
|
description: "Feed preferences",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
displayText: "Disable Shorts",
|
||||||
|
key: "content_feed.disable_shorts",
|
||||||
|
description: "Disable short videos.",
|
||||||
|
type: "boolean",
|
||||||
|
defaultValue: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayText: "Invidious",
|
displayText: "Invidious",
|
||||||
key: "invidious",
|
key: "invidious",
|
||||||
|
|||||||
@@ -768,6 +768,22 @@
|
|||||||
<source>The backend used for browsing and playing videos.</source>
|
<source>The backend used for browsing and playing videos.</source>
|
||||||
<translation>The backend used for browsing and playing videos.</translation>
|
<translation>The backend used for browsing and playing videos.</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Content Feed</source>
|
||||||
|
<translation>Content Feed</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Feed preferences</source>
|
||||||
|
<translation>Feed preferences</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Disable Shorts</source>
|
||||||
|
<translation>Disable Shorts</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Disable short videos.</source>
|
||||||
|
<translation>Disable short videos.</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Invidious preferences</source>
|
<source>Invidious preferences</source>
|
||||||
<translation>Invidious preferences</translation>
|
<translation>Invidious preferences</translation>
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ 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=38
|
minor_version=39
|
||||||
build_version=00002
|
build_version=00001
|
||||||
|
|
||||||
ui_resolutions=hd
|
ui_resolutions=hd
|
||||||
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
||||||
|
|||||||
@@ -250,6 +250,11 @@ namespace Locale
|
|||||||
SelectedBackend = "Selected backend"
|
SelectedBackend = "Selected backend"
|
||||||
SelectedBackendDescription = "The backend used for browsing and playing videos."
|
SelectedBackendDescription = "The backend used for browsing and playing videos."
|
||||||
|
|
||||||
|
ContentFeed = "Content Feed"
|
||||||
|
ContentPreferences = "Feed preferences"
|
||||||
|
DisableShorts = "Disable Shorts"
|
||||||
|
DisableShortsDescription = "Disable short videos."
|
||||||
|
|
||||||
' "Invidious" is used as node id, so we can't use it before refactoring node ids.
|
' "Invidious" is used as node id, so we can't use it before refactoring node ids.
|
||||||
' Either way, Invidious doesn't translate, so it's fine to skip it here
|
' Either way, Invidious doesn't translate, so it's fine to skip it here
|
||||||
' Invidious = "Invidious"
|
' Invidious = "Invidious"
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.38.2",
|
"version": "0.39.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.38.2",
|
"version": "0.39.1",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
||||||
"@tailwindcss/typography": "^0.5.16",
|
"@tailwindcss/typography": "^0.5.16",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.38.2",
|
"version": "0.39.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
let invidiousApi = new InvidiousApi();
|
let invidiousApi = new InvidiousApi();
|
||||||
|
|
||||||
playletStateStore.subscribe((value) => {
|
playletStateStore.subscribe((value) => {
|
||||||
invidiousApi.instance = value?.invidious?.current_instance;
|
invidiousApi.instance = value?.invidious?.instance;
|
||||||
});
|
});
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
|
|||||||
@@ -32,7 +32,8 @@
|
|||||||
|
|
||||||
playletStateStore.subscribe((value) => {
|
playletStateStore.subscribe((value) => {
|
||||||
authUrl = value?.invidious?.auth_url;
|
authUrl = value?.invidious?.auth_url;
|
||||||
currentInstance = value?.invidious?.current_instance || "";
|
currentInstance =
|
||||||
|
value?.invidious?.invidious_instance || value?.invidious?.instance || "";
|
||||||
if (currentInstance === `${host()}/playlet-invidious-backend`) {
|
if (currentInstance === `${host()}/playlet-invidious-backend`) {
|
||||||
const trFn = get(translate);
|
const trFn = get(translate);
|
||||||
currentInstanceName = trFn("Playlet built-in backend");
|
currentInstanceName = trFn("Playlet built-in backend");
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
let searchFiltersLabel;
|
let searchFiltersLabel;
|
||||||
|
|
||||||
playletStateStore.subscribe((value) => {
|
playletStateStore.subscribe((value) => {
|
||||||
invidiousApi.instance = value?.invidious?.current_instance;
|
invidiousApi.instance = value?.invidious?.instance;
|
||||||
let userCountryCode = value?.device?.user_country_code;
|
let userCountryCode = value?.device?.user_country_code;
|
||||||
if (!userCountryCode || userCountryCode === "OT") {
|
if (!userCountryCode || userCountryCode === "OT") {
|
||||||
userCountryCode = "US";
|
userCountryCode = "US";
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
playletStateStore.subscribe((value) => {
|
playletStateStore.subscribe((value) => {
|
||||||
tvName = value?.device?.friendly_name ?? "Roku TV";
|
tvName = value?.device?.friendly_name ?? "Roku TV";
|
||||||
invidiousInstance = value?.invidious?.current_instance;
|
invidiousInstance = value?.invidious?.instance;
|
||||||
});
|
});
|
||||||
|
|
||||||
async function openOnTv() {
|
async function openOnTv() {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
playletStateStore.subscribe((value) => {
|
playletStateStore.subscribe((value) => {
|
||||||
tvName = value?.device?.friendly_name ?? "Roku TV";
|
tvName = value?.device?.friendly_name ?? "Roku TV";
|
||||||
invidiousInstance = value?.invidious?.current_instance;
|
invidiousInstance = value?.invidious?.instance;
|
||||||
});
|
});
|
||||||
|
|
||||||
async function playOnTv() {
|
async function playOnTv() {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
let invidiousInstance;
|
let invidiousInstance;
|
||||||
|
|
||||||
playletStateStore.subscribe((value) => {
|
playletStateStore.subscribe((value) => {
|
||||||
invidiousInstance = value?.invidious?.current_instance;
|
invidiousInstance = value?.invidious?.instance;
|
||||||
});
|
});
|
||||||
|
|
||||||
function getUpdatedText() {
|
function getUpdatedText() {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
playletStateStore.subscribe((value) => {
|
playletStateStore.subscribe((value) => {
|
||||||
tvName = value?.device?.friendly_name ?? "Roku TV";
|
tvName = value?.device?.friendly_name ?? "Roku TV";
|
||||||
invidiousInstance = value?.invidious?.current_instance;
|
invidiousInstance = value?.invidious?.instance;
|
||||||
});
|
});
|
||||||
|
|
||||||
async function playOnTv() {
|
async function playOnTv() {
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
let invidiousInstance;
|
let invidiousInstance;
|
||||||
|
|
||||||
playletStateStore.subscribe((value) => {
|
playletStateStore.subscribe((value) => {
|
||||||
invidiousInstance = value?.invidious?.current_instance;
|
invidiousInstance = value?.invidious?.instance;
|
||||||
});
|
});
|
||||||
|
|
||||||
function getViewCountDateText() {
|
function getViewCountDateText() {
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
let invidiousApi = new InvidiousApi();
|
let invidiousApi = new InvidiousApi();
|
||||||
|
|
||||||
playletStateStore.subscribe((value) => {
|
playletStateStore.subscribe((value) => {
|
||||||
invidiousApi.instance = value?.invidious?.current_instance;
|
invidiousApi.instance = value?.invidious?.instance;
|
||||||
let userCountryCode = value?.device?.user_country_code;
|
let userCountryCode = value?.device?.user_country_code;
|
||||||
if (!userCountryCode || userCountryCode === "OT") {
|
if (!userCountryCode || userCountryCode === "OT") {
|
||||||
userCountryCode = "US";
|
userCountryCode = "US";
|
||||||
|
|||||||
@@ -22,8 +22,15 @@
|
|||||||
videoThumbnails.find((thumbnail) => thumbnail.quality === "medium") ||
|
videoThumbnails.find((thumbnail) => thumbnail.quality === "medium") ||
|
||||||
videoThumbnails[0];
|
videoThumbnails[0];
|
||||||
let url = videoThumbnail.url;
|
let url = videoThumbnail.url;
|
||||||
if (url.startsWith("/") && invidiousInstance) {
|
if (url.startsWith("/")) {
|
||||||
url = invidiousInstance + url;
|
if (
|
||||||
|
invidiousInstance &&
|
||||||
|
!invidiousInstance.includes(":8888/playlet-invidious-backend")
|
||||||
|
) {
|
||||||
|
url = invidiousInstance + url;
|
||||||
|
} else {
|
||||||
|
url = `https://i.ytimg.com/vi/${videoId}/mqdefault.jpg`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
thumbnailUrl = url;
|
thumbnailUrl = url;
|
||||||
} else if (invidiousInstance) {
|
} else if (invidiousInstance) {
|
||||||
|
|||||||
Reference in new issue
Block a user