diff --git a/config/bslint.jsonc b/config/bslint.jsonc index a8cf1bd5..9c095d8f 100644 --- a/config/bslint.jsonc +++ b/config/bslint.jsonc @@ -5,23 +5,32 @@ "**/bslib.brs" ], "rules": { - "aa-comma-style": "no-dangling", - "anon-function-style": "no-sub", - "assign-all-paths": "warn", - "block-if-style": "no-then", - "case-sensitivity": "warn", - "condition-style": "no-group", - "consistent-return": "error", - "eol-last": "always", + // Code style "inline-if-style": "never", + "block-if-style": "no-then", + "condition-style": "no-group", "named-function-style": "no-sub", + "anon-function-style": "no-sub", + "aa-comma-style": "never", "no-print": "warn", - "no-stop": "error", "no-todo": "off", + "no-stop": "error", + "eol-last": "always", + // Strictness "type-annotations": "all", - "unreachable-code": "warn", + // Color + "color-format": "hash-hex", + "color-case": "upper", + "color-alpha": "always", + "color-alpha-defaults": "allowed", + "color-cert": "always", + // Code flow + "assign-all-paths": "error", + "unsafe-path-loop": "error", "unsafe-iterators": "error", - "unsafe-path-loop": "warn", - "unused-variable": "warn" + "unreachable-code": "warn", + "case-sensitivity": "error", + "unused-variable": "error", + "consistent-return": "error" } } \ No newline at end of file diff --git a/playlet-app/src/components/BootstrapScene/BootstrapScene.bs b/playlet-app/src/components/BootstrapScene/BootstrapScene.bs index 20f2ae96..ea1edd03 100644 --- a/playlet-app/src/components/BootstrapScene/BootstrapScene.bs +++ b/playlet-app/src/components/BootstrapScene/BootstrapScene.bs @@ -2,7 +2,7 @@ import "LoadingMessages.bs" function Init() as void m.scene = m.top.getScene() - m.top.backgroundColor = "0x242424FF" + m.top.backgroundColor = "#242424FF" m.top.backgroundURI = "" m.loadingIndicator = m.top.findNode("LoadingIndicator") diff --git a/playlet-app/src/images/channel-poster_fhd.png b/playlet-app/src/images/channel-poster_fhd.png index 94b1b372..66d184fa 100644 Binary files a/playlet-app/src/images/channel-poster_fhd.png and b/playlet-app/src/images/channel-poster_fhd.png differ diff --git a/playlet-app/src/images/channel-poster_hd.png b/playlet-app/src/images/channel-poster_hd.png index b2c9ca2c..6afa36a2 100644 Binary files a/playlet-app/src/images/channel-poster_hd.png and b/playlet-app/src/images/channel-poster_hd.png differ diff --git a/playlet-app/src/images/channel-poster_sd.png b/playlet-app/src/images/channel-poster_sd.png index c65bb77f..ba9704b2 100644 Binary files a/playlet-app/src/images/channel-poster_sd.png and b/playlet-app/src/images/channel-poster_sd.png differ diff --git a/playlet-app/src/images/vector/logo-light.svg.meta.json5 b/playlet-app/src/images/vector/logo-light.svg.meta.json5 index fba9289f..259e23fc 100644 --- a/playlet-app/src/images/vector/logo-light.svg.meta.json5 +++ b/playlet-app/src/images/vector/logo-light.svg.meta.json5 @@ -3,24 +3,24 @@ outputs: [ { outputFilePath: 'images/channel-poster_fhd.png', - outputHash: 'd644a0db84deed0bcc41a41d08a4ef75', + outputHash: '50729b5bdd2a7c0fd4a1d502812117d4', width: 540, height: 405, - background: '#FFFFFF', + background: '#EEEEEE', }, { outputFilePath: 'images/channel-poster_hd.png', - outputHash: 'd07a4ffaa021b55528bee91710f4e9d2', + outputHash: '8022dc6fa993ce3194c5aea37d6ea49a', width: 290, height: 218, - background: '#FFFFFF', + background: '#EEEEEE', }, { outputFilePath: 'images/channel-poster_sd.png', - outputHash: '66a311c639f89ff009e4624468282b2f', + outputHash: '63b8f12ac155c29b4e85db17a2886817', width: 246, height: 140, - background: '#FFFFFF', + background: '#EEEEEE', }, ], } \ No newline at end of file diff --git a/playlet-app/src/source/Dialog.bs b/playlet-app/src/source/Dialog.bs index 0171097f..d8e3f2cd 100644 --- a/playlet-app/src/source/Dialog.bs +++ b/playlet-app/src/source/Dialog.bs @@ -19,12 +19,12 @@ end function function SetPalette(dialog as object) palette = createObject("roSGNode", "RSGPalette") palette.colors = { - DialogBackgroundColor: "#242424FF", - DialogFocusColor: "#CECECEFF", - DialogFocusItemColor: "#202020FF", - DialogSecondaryTextColor: "#F8F8F8FF", - DialogSecondaryItemColor: "0xFF1C30FF", - DialogTextColor: "#EEEEEEFF" + DialogBackgroundColor: "#242424FF" + DialogFocusColor: "#CECECEFF" + DialogFocusItemColor: "#202020FF" + DialogSecondaryTextColor: "#DBDBDBFF" + DialogSecondaryItemColor: "#FF1C30FF" + DialogTextColor: "#DBDBDBFF" } dialog.palette = palette end function diff --git a/playlet-lib/src/components/ChannelView/ChannelView.bs b/playlet-lib/src/components/ChannelView/ChannelView.bs index a537cfad..3221b3bf 100644 --- a/playlet-lib/src/components/ChannelView/ChannelView.bs +++ b/playlet-lib/src/components/ChannelView/ChannelView.bs @@ -135,8 +135,8 @@ function OnSubscribeButtonSelected() isSubbed = IsSubscribed() m.subscribeTask = StartAsyncTask(SubscribeTask, { - invidious: m.invidious, - ucid: m.authorId, + invidious: m.invidious + ucid: m.authorId subscribe: not isSubbed }) end function @@ -172,19 +172,19 @@ function InitializeTabs() m.tabs = { videos: function(authorId as string, author as string) as object return CreateChannelFeed("Latest videos", "channel_videos", authorId, author) - end function, + end function shorts: function(authorId as string, author as string) as object return CreateChannelFeed("Shorts", "channel_shorts", authorId, author) - end function, + end function streams: function(authorId as string, author as string) as object return CreateChannelFeed("Live", "channel_streams", authorId, author) - end function, + end function podcasts: function(authorId as string, author as string) as object return CreateChannelFeed("Podcasts", "channel_podcasts", authorId, author) - end function, + end function playlists: function(authorId as string, author as string) as object return CreateChannelFeed("Playlists", "channel_playlists", authorId, author) - end function, + end function channels: function(authorId as string, author as string) as object return CreateChannelFeed("Channels", "channel_channels", authorId, author) end function @@ -193,12 +193,12 @@ end function function CreateChannelFeed(title as string, endpoint as string, ucid as string, author as string) as object return { - title: title, + title: title feedSources: [{ - "id": `inv_${endpoint}_${ucid}`, - "title": `${author} - ${title}`, - "apiType": "Invidious", - "endpoint": endpoint, + "id": `inv_${endpoint}_${ucid}` + "title": `${author} - ${title}` + "apiType": "Invidious" + "endpoint": endpoint "pathParams": { "ucid": ucid } diff --git a/playlet-lib/src/components/ChannelView/SubscribeTask.bs b/playlet-lib/src/components/ChannelView/SubscribeTask.bs index 35ec4652..e191618e 100644 --- a/playlet-lib/src/components/ChannelView/SubscribeTask.bs +++ b/playlet-lib/src/components/ChannelView/SubscribeTask.bs @@ -22,7 +22,7 @@ function SubscribeTask(input as object) as object error = response.ErrorMessage() LogError("Failed to subscribe/unsubscribe to channel:", error) return { - success: false, + success: false error: error } end if diff --git a/playlet-lib/src/components/ContentNode/ChannelContentNode.bs b/playlet-lib/src/components/ContentNode/ChannelContentNode.bs index 65c28978..d19e36c4 100644 --- a/playlet-lib/src/components/ContentNode/ChannelContentNode.bs +++ b/playlet-lib/src/components/ContentNode/ChannelContentNode.bs @@ -18,7 +18,7 @@ function LoadChannel(invidiousNode as object) as void m.top.loadState = FeedLoadState.Loading m.contentTask = StartAsyncTask(ChannelContentTask, { - content: m.top, + content: m.top invidious: invidiousNode }, OnChannelContentTaskResult) end function diff --git a/playlet-lib/src/components/ContentNode/ChannelContentTask.bs b/playlet-lib/src/components/ContentNode/ChannelContentTask.bs index 5b5b903c..92d6d7ef 100644 --- a/playlet-lib/src/components/ContentNode/ChannelContentTask.bs +++ b/playlet-lib/src/components/ContentNode/ChannelContentTask.bs @@ -24,7 +24,7 @@ function ChannelContentTask(input as object) as object if not response.IsSuccess() or metadata = invalid contentNode.loadState = FeedLoadState.Error return { - success: false, + success: false error: response.ErrorMessage() } end if diff --git a/playlet-lib/src/components/ContextMenu/ContextMenuRow.bs b/playlet-lib/src/components/ContextMenu/ContextMenuRow.bs index 5a740848..12434e3e 100644 --- a/playlet-lib/src/components/ContextMenu/ContextMenuRow.bs +++ b/playlet-lib/src/components/ContextMenu/ContextMenuRow.bs @@ -11,19 +11,19 @@ function OnItemHasFocus() hasFocus = m.top.itemHasFocus if hasFocus m.top.font = "font:SmallestBoldSystemFont" - m.top.color = "0x262626ff" + m.top.color = "#262626ff" else m.top.font = "font:SmallestSystemFont" - m.top.color = "0xddddddff" + m.top.color = "#DBDBDBFF" end if end function function OnFocusPercent() if m.top.focusPercent > 0.5 m.top.font = "font:SmallestBoldSystemFont" - m.top.color = "0x262626ff" + m.top.color = "#262626FF" else m.top.font = "font:SmallestSystemFont" - m.top.color = "0xddddddff" + m.top.color = "#DBDBDBFF" end if end function diff --git a/playlet-lib/src/components/Dialog/DialogPalette.bs b/playlet-lib/src/components/Dialog/DialogPalette.bs index e5ec5d7a..d89f890b 100644 --- a/playlet-lib/src/components/Dialog/DialogPalette.bs +++ b/playlet-lib/src/components/Dialog/DialogPalette.bs @@ -1,12 +1,12 @@ function SetPalette(dialog as object) palette = createObject("roSGNode", "RSGPalette") palette.colors = { - DialogBackgroundColor: "#242424FF", - DialogFocusColor: "#CECECEFF", - DialogFocusItemColor: "#202020FF", - DialogSecondaryTextColor: "#F8F8F8FF", - DialogSecondaryItemColor: "0xFF1C30FF", - DialogTextColor: "#EEEEEEFF" + DialogBackgroundColor: "#242424FF" + DialogFocusColor: "#CECECEFF" + DialogFocusItemColor: "#202020FF" + DialogSecondaryTextColor: "#DBDBDBFF" + DialogSecondaryItemColor: "#FF1C30FF" + DialogTextColor: "#DBDBDBFF" } dialog.palette = palette end function diff --git a/playlet-lib/src/components/Dialog/LoginDialog.bs b/playlet-lib/src/components/Dialog/LoginDialog.bs index 15203f13..b15c5993 100644 --- a/playlet-lib/src/components/Dialog/LoginDialog.bs +++ b/playlet-lib/src/components/Dialog/LoginDialog.bs @@ -34,9 +34,9 @@ function OnUrlSet() m.urlLabel.text = url StartAsyncTask(GenerateQrCodeTask, { - poster: m.qrCode, - text: url, - size: m.qrCode.loadWidth, + poster: m.qrCode + text: url + size: m.qrCode.loadWidth padding: 10 }) end function diff --git a/playlet-lib/src/components/NavBar/NavBar.bs b/playlet-lib/src/components/NavBar/NavBar.bs index 4b996114..ce4c4889 100644 --- a/playlet-lib/src/components/NavBar/NavBar.bs +++ b/playlet-lib/src/components/NavBar/NavBar.bs @@ -1,4 +1,3 @@ -import "pkg:/source/utils/ColorUtils.bs" import "pkg:/source/utils/FocusManagement.bs" import "pkg:/source/utils/Types.bs" @@ -31,8 +30,8 @@ function PopulateButtons() as void buttons = [] for each item in navBarItems button = CreateObject("roSGNode", "IconButton") - button.background = ColorUtils.HexToInt("242424") - button.focusBackground = ColorUtils.HexToInt("FF1C30") + button.background = "#242424FF" + button.focusBackground = "#FF1C30FF" button.padding = 20 button.height = 50 button.width = 90 diff --git a/playlet-lib/src/components/Navigation/LongPress.bs b/playlet-lib/src/components/Navigation/LongPress.bs index df658c64..8f050ad4 100644 --- a/playlet-lib/src/components/Navigation/LongPress.bs +++ b/playlet-lib/src/components/Navigation/LongPress.bs @@ -3,7 +3,7 @@ const OPTIONS_LONG_PRESS_KEY = "OPTIONS_LONG_PRESS" function InitializeLongPress(keys as object, duration = 1.0 as float) longPressKeyMap = { - "OK": OK_LONG_PRESS_KEY, + "OK": OK_LONG_PRESS_KEY "options": OPTIONS_LONG_PRESS_KEY } m._longPressKeyMap = {} @@ -17,7 +17,7 @@ function InitializeLongPress(keys as object, duration = 1.0 as float) ' - press K to simulate an "OK" long press on the remote. ' - press O to simulate an "options" long press on the remote. simulatedLongPressKeyMap = { - "OK": "Lit_k", + "OK": "Lit_k" "options": "Lit_o" } diff --git a/playlet-lib/src/components/Navigation/Navigation.bs b/playlet-lib/src/components/Navigation/Navigation.bs index f8e50035..d1d6e83a 100644 --- a/playlet-lib/src/components/Navigation/Navigation.bs +++ b/playlet-lib/src/components/Navigation/Navigation.bs @@ -10,8 +10,8 @@ function SetNavigation(fromNode as object, direction as string, toNode as object end if m._navigation[direction].push({ - fromNode: fromNode, - toNode: toNode, + fromNode: fromNode + toNode: toNode callback: callback }) end function @@ -19,7 +19,7 @@ end function function NavigationKeyHandler(key as string, press as boolean) as object if not press return { - handled: false, + handled: false node: invalid } end if @@ -27,7 +27,7 @@ function NavigationKeyHandler(key as string, press as boolean) as object navigations = m._navigation[key] if navigations = invalid return { - handled: false, + handled: false node: invalid } end if @@ -41,13 +41,13 @@ function NavigationKeyHandler(key as string, press as boolean) as object item.callback() end if return { - handled: true, + handled: true node: item.toNode } end if end for return { - handled: false, + handled: false node: invalid } end function diff --git a/playlet-lib/src/components/PlayQueue/PlayQueue.bs b/playlet-lib/src/components/PlayQueue/PlayQueue.bs index 719028fb..3f5df1c7 100644 --- a/playlet-lib/src/components/PlayQueue/PlayQueue.bs +++ b/playlet-lib/src/components/PlayQueue/PlayQueue.bs @@ -68,26 +68,26 @@ function GetQueue(_unused as dynamic) as object nodeType = node.type if nodeType = "video" items.push({ - type: nodeType, - videoId: node.videoId, - title: node.title, - author: node.author, + type: nodeType + videoId: node.videoId + title: node.title + author: node.author thumbnail: node.thumbnail }) else if node.type = "playlist" items.push({ - type: nodeType, - playlistId: node.playlistId, - title: node.title, - thumbnail: node.thumbnail, + type: nodeType + playlistId: node.playlistId + title: node.title + thumbnail: node.thumbnail videoCountText: node.videoCountText }) end if end for return { - index: m.top.index, - playlistIndex: m.top.playlistIndex, + index: m.top.index + playlistIndex: m.top.playlistIndex items: items } end function @@ -189,7 +189,7 @@ function LoadPlaylist(playlist as object) as void playlist.loadState = FeedLoadState.Loading task = StartAsyncTask(PlaylistContentTask, { - content: playlist, + content: playlist invidious: m.top.invidious }, OnPlaylistContentTaskResult) m.pendingLoadTasks[task.id] = task diff --git a/playlet-lib/src/components/PlayQueue/PlayQueueViewCell.bs b/playlet-lib/src/components/PlayQueue/PlayQueueViewCell.bs index 3429e2ab..da3c6a45 100644 --- a/playlet-lib/src/components/PlayQueue/PlayQueueViewCell.bs +++ b/playlet-lib/src/components/PlayQueue/PlayQueueViewCell.bs @@ -66,6 +66,7 @@ function SetHighlight() as void index = m.top.index if playQueueIndex = index + ' bs:disable-next-line LINT3023 m.top.thumbnailBlendColor = "#FFFFFFFF" m.top.highlightUri = "pkg:/images/focus_grid.9.png" else diff --git a/playlet-lib/src/components/PlaylistView/PlaylistContentTask.bs b/playlet-lib/src/components/PlaylistView/PlaylistContentTask.bs index 66b0df60..6c69a0ad 100644 --- a/playlet-lib/src/components/PlaylistView/PlaylistContentTask.bs +++ b/playlet-lib/src/components/PlaylistView/PlaylistContentTask.bs @@ -27,7 +27,7 @@ function PlaylistContentTask(input as object) as object if not response.IsSuccess() or metadata = invalid contentNode.loadState = FeedLoadState.Error return { - success: false, + success: false error: response.ErrorMessage() } end if diff --git a/playlet-lib/src/components/PlaylistView/PlaylistView.bs b/playlet-lib/src/components/PlaylistView/PlaylistView.bs index 0ddb51e5..b183e57d 100644 --- a/playlet-lib/src/components/PlaylistView/PlaylistView.bs +++ b/playlet-lib/src/components/PlaylistView/PlaylistView.bs @@ -223,7 +223,7 @@ function LoadPlaylist() as void m.top.content.loadState = FeedLoadState.Loading m.playlistLoadTask = StartAsyncTask(PlaylistContentTask, { - content: m.top.content, + content: m.top.content invidious: m.top.invidious }, OnPlaylistContentTaskResult) end function diff --git a/playlet-lib/src/components/Screens/AppInfoScreen/AppInfoScreen.bs b/playlet-lib/src/components/Screens/AppInfoScreen/AppInfoScreen.bs index 5c81aa02..cfa26629 100644 --- a/playlet-lib/src/components/Screens/AppInfoScreen/AppInfoScreen.bs +++ b/playlet-lib/src/components/Screens/AppInfoScreen/AppInfoScreen.bs @@ -3,28 +3,28 @@ import "pkg:/source/asyncTask/asyncTask.bs" function Init() ' TODO:P2 Add tooltip to each field with description of what it means m.displayNames = [{ - key: "app_version", + key: "app_version" displayText: "Playlet App Version" }, { - key: "lib_version", + key: "lib_version" displayText: "Playlet Library Version" }, { - key: "lib_version_latest", + key: "lib_version_latest" displayText: "Playlet Library Latest Version" }, { - key: "lib_url", + key: "lib_url" displayText: "Playlet Library URL" }, { - key: "lib_url_type", + key: "lib_url_type" displayText: "Playlet Library URL Type" }, { - key: "app_git_commit_hash", + key: "app_git_commit_hash" displayText: "Playlet App Git Commit Hash" }, { - key: "lib_git_commit_hash", + key: "lib_git_commit_hash" displayText: "Playlet Library Git Commit Hash" }, { - key: "id", + key: "id" displayText: "App ID" }] diff --git a/playlet-lib/src/components/Screens/BookmarksScreen/BookmarksScreen.bs b/playlet-lib/src/components/Screens/BookmarksScreen/BookmarksScreen.bs index 1dfa426d..70a8251d 100644 --- a/playlet-lib/src/components/Screens/BookmarksScreen/BookmarksScreen.bs +++ b/playlet-lib/src/components/Screens/BookmarksScreen/BookmarksScreen.bs @@ -79,7 +79,7 @@ function SetRowListContent(bookmarksContent as object) end for feeds.push({ - "title": bookmarkGroupNode.title, + "title": bookmarkGroupNode.title "feedSources": feedSources }) end for diff --git a/playlet-lib/src/components/Screens/SearchScreen/SearchFilters/SearchFilters.bs b/playlet-lib/src/components/Screens/SearchScreen/SearchFilters/SearchFilters.bs index 378eba19..777ab3bc 100644 --- a/playlet-lib/src/components/Screens/SearchScreen/SearchFilters/SearchFilters.bs +++ b/playlet-lib/src/components/Screens/SearchScreen/SearchFilters/SearchFilters.bs @@ -5,110 +5,110 @@ import "pkg:/source/utils/Types.bs" function Init() options = { date: [{ - title: "Any date", + title: "Any date" value: "" }, { - title: "Last hour", + title: "Last hour" value: "hour" }, { - title: "Today", + title: "Today" value: "today" }, { - title: "This week", + title: "This week" value: "week" }, { - title: "This month", + title: "This month" value: "month" }, { - title: "This year", + title: "This year" value: "year" - }], + }] type: [{ - title: "Any type", + title: "Any type" value: "" }, { - title: "Video", + title: "Video" value: "video" }, { - title: "Playlist", + title: "Playlist" value: "playlist" }, { - title: "Channel", + title: "Channel" value: "channel" }, { - title: "Movie", + title: "Movie" value: "movie" }, { - title: "Show", + title: "Show" value: "show" - }], + }] duration: [{ - title: "Any duration", + title: "Any duration" value: "" }, { - title: "Under 4 minutes", + title: "Under 4 minutes" value: "short" }, { - title: "4 - 20 minutes", + title: "4 - 20 minutes" value: "medium" }, { - title: "Over 20 minutes", + title: "Over 20 minutes" value: "long" - }], + }] features: [{ - title: "Live", + title: "Live" value: "live" }, { - title: "4K", + title: "4K" value: "4k" }, { - title: "HD", + title: "HD" value: "hd" }, { - title: "Subtitles/CC", + title: "Subtitles/CC" value: "subtitles" }, { - title: "Creative Commons", + title: "Creative Commons" value: "creative_commons" }, { - title: "360°", + title: "360°" value: "360" }, { - title: "VR180", + title: "VR180" value: "vr180" }, { - title: "3D", + title: "3D" value: "3d" }, { - title: "HDR", + title: "HDR" value: "hdr" }, { - title: "Purchased", + title: "Purchased" value: "purchased" }, { - title: "Location", + title: "Location" value: "location" - }], + }] sort_by: [{ - title: "Relevance", + title: "Relevance" value: "" }, { - title: "Upload date", + title: "Upload date" value: "upload_date" }, { - title: "View count", + title: "View count" value: "view_count" }, { - title: "Rating", + title: "Rating" value: "rating" }] } m.controls = { - date: m.top.findNode("UploadDateList"), - type: m.top.findNode("TypeList"), - duration: m.top.findNode("DurationList"), - features: m.top.findNode("FeaturesList"), + date: m.top.findNode("UploadDateList") + type: m.top.findNode("TypeList") + duration: m.top.findNode("DurationList") + features: m.top.findNode("FeaturesList") sort_by: m.top.findNode("SortByList") } @@ -118,10 +118,10 @@ function Init() end for m.contentNodes = { - date: m.controls.date.content, - type: m.controls.type.content, - duration: m.controls.duration.content, - features: m.controls.features.content, + date: m.controls.date.content + type: m.controls.type.content + duration: m.controls.duration.content + features: m.controls.features.content sort_by: m.controls.sort_by.content } diff --git a/playlet-lib/src/components/Screens/SearchScreen/SearchScreen.bs b/playlet-lib/src/components/Screens/SearchScreen/SearchScreen.bs index a759d397..811d4de7 100644 --- a/playlet-lib/src/components/Screens/SearchScreen/SearchScreen.bs +++ b/playlet-lib/src/components/Screens/SearchScreen/SearchScreen.bs @@ -25,10 +25,10 @@ function Init() textEditBox.voiceEnabled = true m.top.filters = { - date: "", - type: "", - duration: "", - features: [], + date: "" + type: "" + duration: "" + features: [] sort_by: "" } @@ -99,8 +99,8 @@ function OnTextChange() as void end if m.searchSuggestionsTask = StartAsyncTask(SearchSuggestionsTask, { - q: m.keyboard.text, - invidious: m.invidious, + q: m.keyboard.text + invidious: m.invidious preferences: m.preferences }, OnSearchSuggestionsTaskResults) end function @@ -206,10 +206,10 @@ function Search(text as string) ShowLoadingScreen() feedSource = { - "id": `inv_search_${CryptoUtils.GetMd5(text)}`, - "title": `Search - ${text}`, - "apiType": "Invidious", - "endpoint": "search", + "id": `inv_search_${CryptoUtils.GetMd5(text)}` + "title": `Search - ${text}` + "apiType": "Invidious" + "endpoint": "search" "queryParams": { "q": text } @@ -222,14 +222,14 @@ function Search(text as string) feedSource.queryParams[filter] = value else if IsArray(value) and value.Count() > 0 feedSource.queryParams[filter] = { - value: value, + value: value arrayType: UrlUtils.QueryParamArrayType.CommaSeparated } end if end for m.rowList.feeds = [{ - "title": `Search - ${text}`, + "title": `Search - ${text}` "feedSources": [feedSource] }] end function diff --git a/playlet-lib/src/components/Screens/SearchScreen/SearchSuggestionsTask.bs b/playlet-lib/src/components/Screens/SearchScreen/SearchSuggestionsTask.bs index 1a9134e1..1909cf7c 100644 --- a/playlet-lib/src/components/Screens/SearchScreen/SearchSuggestionsTask.bs +++ b/playlet-lib/src/components/Screens/SearchScreen/SearchSuggestionsTask.bs @@ -26,7 +26,7 @@ function SearchSuggestionsTask(input as object) as object end if return { - q: q, + q: q response: history } end function diff --git a/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTesting.bs b/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTesting.bs index 689a598c..d57c4923 100644 --- a/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTesting.bs +++ b/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTesting.bs @@ -58,7 +58,7 @@ function RunTestsTask() end if m.testingTask = StartAsyncTask(InvidiousInstanceTestingTask, { - instance: m.top.instance, + instance: m.top.instance listNode: m.testList }) end function diff --git a/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTestingTask.bs b/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTestingTask.bs index a74e2d6c..402de4ce 100644 --- a/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTestingTask.bs +++ b/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTestingTask.bs @@ -38,9 +38,9 @@ function CreateTestNode(title as string, func as function) as object testNode = CreateObject("roSGNode", "ContentNode") testNode.title = title testNode.AddFields({ - func: FuncName(func), - state: "loading", - details: "", + func: FuncName(func) + state: "loading" + details: "" duration: 0 }) m[testNode.func] = func diff --git a/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousPublicInstances/InvidiousPublicInstancesTask.bs b/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousPublicInstances/InvidiousPublicInstancesTask.bs index d661df12..5c4bd2e2 100644 --- a/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousPublicInstances/InvidiousPublicInstancesTask.bs +++ b/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousPublicInstances/InvidiousPublicInstancesTask.bs @@ -15,7 +15,7 @@ function InvidiousPublicInstancesTask(input as object) as object if not response.IsSuccess() or instances = invalid return { - success: false, + success: false error: response.ErrorMessage() } end if @@ -31,14 +31,14 @@ function InvidiousPublicInstancesTask(input as object) as object for each instance in instances item = CreateObject("roSGNode", "InvidiousPublicInstancesListItemContent") item.setFields({ - name: instance[0], - version: instance[1].stats.software.version, - users: instance[1].stats.usage.users.total, - signup: instance[1].stats.openRegistrations ? "Yes" : "No", + name: instance[0] + version: instance[1].stats.software.version + users: instance[1].stats.usage.users.total + signup: instance[1].stats.openRegistrations ? "Yes" : "No" ' Leave 5 spaces for the flag, just to simplify the layout - location: ` ${instance[1].region}`, - flag: GetFlagUrl(instance[1].flag), - health: instance[1].monitor["30dRatio"].ratio, + location: ` ${instance[1].region}` + flag: GetFlagUrl(instance[1].flag) + health: instance[1].monitor["30dRatio"].ratio uri: instance[1].uri }) content.AppendChild(item) diff --git a/playlet-lib/src/components/Screens/SettingsScreen/SettingsScreen.bs b/playlet-lib/src/components/Screens/SettingsScreen/SettingsScreen.bs index d78a4ae4..f4310f63 100644 --- a/playlet-lib/src/components/Screens/SettingsScreen/SettingsScreen.bs +++ b/playlet-lib/src/components/Screens/SettingsScreen/SettingsScreen.bs @@ -8,9 +8,9 @@ function Init() m.scrollAnimation = m.top.findNode("scrollAnimation") m.scrollAnimationInterpolator = m.scrollAnimation.findNode("scrollAnimationInterpolator") m.viewport = { - x: 150, - y: 96, - width: 1920, + x: 150 + y: 96 + width: 1920 height: 550 } end function @@ -75,7 +75,7 @@ function CreateCategoryNode(item as object, container as object, startX as integ node.displayText = item.displayText node.description = item.description return { - node: node, + node: node rect: node.boundingRect() } end function @@ -107,11 +107,11 @@ function CreateControls(item as object, container as object, startX as integer, end for return { - nodes: nodes, + nodes: nodes rect: { - x: x, - y: y, - width: width, + x: x + y: y + width: width height: height } } @@ -142,7 +142,7 @@ function CreateControl(item as object, container as object, startX as integer, s control@.BindPreference(m.preferences, item.key) return { - node: control, + node: control rect: control.boundingRect() } end function diff --git a/playlet-lib/src/components/Screens/WebAppScreen/WebAppScreen.bs b/playlet-lib/src/components/Screens/WebAppScreen/WebAppScreen.bs index f846a7e3..3ae91a45 100644 --- a/playlet-lib/src/components/Screens/WebAppScreen/WebAppScreen.bs +++ b/playlet-lib/src/components/Screens/WebAppScreen/WebAppScreen.bs @@ -23,9 +23,9 @@ function OnUrlSet() qrCodePoster = m.top.findNode("QrCodePoster") StartAsyncTask(GenerateQrCodeTask, { - poster: qrCodePoster, - text: url, - size: qrCodePoster.loadWidth, + poster: qrCodePoster + text: url + size: qrCodePoster.loadWidth padding: 20 }) end function diff --git a/playlet-lib/src/components/Services/Bookmarks/Bookmarks.bs b/playlet-lib/src/components/Services/Bookmarks/Bookmarks.bs index 1dd91b17..012f6828 100644 --- a/playlet-lib/src/components/Services/Bookmarks/Bookmarks.bs +++ b/playlet-lib/src/components/Services/Bookmarks/Bookmarks.bs @@ -53,18 +53,18 @@ function Save() as void bookmarkNodes = bookmarkGroupNode.getChildren(-1, 0) for each bookmarkNode in bookmarkNodes bookmarks.push({ - "id": bookmarkNode.id, + "id": bookmarkNode.id "feedSource": bookmarkNode.feedSource }) end for groups.push({ - "title": bookmarkGroupNode.title, + "title": bookmarkGroupNode.title "bookmarks": bookmarks }) end for bookmarksString = FormatJson({ - "__version": m.top.__version, + "__version": m.top.__version "groups": groups }) @@ -110,8 +110,8 @@ function AddVideoBookmark(id as string, groupName as string) bookmarkGroupNode = GetOrCreateBookmarkGroup(groupName) feedSource = { - "apiType": "Invidious", - "endpoint": "video_info", + "apiType": "Invidious" + "endpoint": "video_info" "pathParams": { "id": id } @@ -123,8 +123,8 @@ function AddPlaylistBookmark(id as string, groupName as string) bookmarkGroupNode = GetOrCreateBookmarkGroup(groupName) feedSource = { - "apiType": "Invidious", - "endpoint": "playlist_info", + "apiType": "Invidious" + "endpoint": "playlist_info" "pathParams": { "plid": id } @@ -136,10 +136,10 @@ function AddPlaylistBookmarkWithSpread(id as string, groupName as string) bookmarkGroupNode = GetOrCreateBookmarkGroup(groupName) feedSource = { - "id": `inv_playlist_${id}`, - "title": `${groupName} videos`, - "apiType": "Invidious", - "endpoint": "playlist", + "id": `inv_playlist_${id}` + "title": `${groupName} videos` + "apiType": "Invidious" + "endpoint": "playlist" "pathParams": { "plid": id } @@ -147,8 +147,8 @@ function AddPlaylistBookmarkWithSpread(id as string, groupName as string) AddFeedSourceBookmark(feedSource, `inv_playlist_${id}`, bookmarkGroupNode) feedSource = { - "apiType": "Invidious", - "endpoint": "playlist_info", + "apiType": "Invidious" + "endpoint": "playlist_info" "pathParams": { "plid": id } @@ -160,8 +160,8 @@ function AddChannelBookmark(id as string, groupName as string) bookmarkGroupNode = GetOrCreateBookmarkGroup(groupName) feedSource = { - "apiType": "Invidious", - "endpoint": "channel_info", + "apiType": "Invidious" + "endpoint": "channel_info" "pathParams": { "ucid": id } @@ -173,10 +173,10 @@ function AddChannelBookmarkWithSpread(id as string, groupName as string) bookmarkGroupNode = GetOrCreateBookmarkGroup(groupName) feedSource = { - "id": `inv_channel_videos_${id}`, - "title": `${groupName} videos`, - "apiType": "Invidious", - "endpoint": "channel_videos", + "id": `inv_channel_videos_${id}` + "title": `${groupName} videos` + "apiType": "Invidious" + "endpoint": "channel_videos" "pathParams": { "ucid": id } @@ -184,8 +184,8 @@ function AddChannelBookmarkWithSpread(id as string, groupName as string) AddFeedSourceBookmark(feedSource, `inv_channel_videos_${id}`, bookmarkGroupNode) feedSource = { - "apiType": "Invidious", - "endpoint": "channel_info", + "apiType": "Invidious" + "endpoint": "channel_info" "pathParams": { "ucid": id } diff --git a/playlet-lib/src/components/Services/Dash/DashManifest.bs b/playlet-lib/src/components/Services/Dash/DashManifest.bs index 58c3de5d..63e4732c 100644 --- a/playlet-lib/src/components/Services/Dash/DashManifest.bs +++ b/playlet-lib/src/components/Services/Dash/DashManifest.bs @@ -34,10 +34,10 @@ class DashManifest xml = new XmlObject() if xml.Node("MPD", { - "xmlns": "urn:mpeg:dash:schema:mpd:2011", - "profiles": "urn:mpeg:dash:profile:full:2011", - "minBufferTime": "PT1.5S", - "type": "static", + "xmlns": "urn:mpeg:dash:schema:mpd:2011" + "profiles": "urn:mpeg:dash:profile:full:2011" + "minBufferTime": "PT1.5S" + "type": "static" "mediaPresentationDuration": `PT${metadata.lengthSeconds ?? 0}S` }) if xml.Node("Period") @@ -45,9 +45,9 @@ class DashManifest id = 0 for each audioSet in audioSets adaptationSetAttributes = { - "id": `${id}`, - "mimeType": audioSet.mimeType, - "startWithSAP": "1", + "id": `${id}` + "mimeType": audioSet.mimeType + "startWithSAP": "1" "subsegmentAlignment": "true" } if not StringUtils.IsNullOrEmpty(audioSet.lang) @@ -56,7 +56,7 @@ class DashManifest if xml.Node("AdaptationSet", adaptationSetAttributes) xml.Node("Role", { - "schemeIdUri": "urn:mpeg:dash:role:2011", + "schemeIdUri": "urn:mpeg:dash:role:2011" "value": audioSet.acont = "original" ? "main" : "alternate" }) xml.End() @@ -77,13 +77,13 @@ class DashManifest end if if xml.Node("Representation", { - "id": stream.itag, - "codecs": codecs, + "id": stream.itag + "codecs": codecs "bandwidth": stream.bitrate }) xml.Node("AudioChannelConfiguration", { - "schemeIdUri": "urn:mpeg:dash:23003:3:audio_channel_configuration:2011", + "schemeIdUri": "urn:mpeg:dash:23003:3:audio_channel_configuration:2011" "value": `${stream.audioChannels}` }) xml.End() @@ -115,9 +115,9 @@ class DashManifest for each mimeType in videoMimeTypes if xml.Node("AdaptationSet", { - "id": `${id}`, - "mimeType": mimeType, - "startWithSAP": "1", + "id": `${id}` + "mimeType": mimeType + "startWithSAP": "1" "subsegmentAlignment": "true" }) @@ -137,10 +137,10 @@ class DashManifest end if representationAttributes = { - "id": stream.itag, - "codecs": codecs, - "startWithSAP": "1", - "maxPlayoutRate": "1", + "id": stream.itag + "codecs": codecs + "startWithSAP": "1" + "maxPlayoutRate": "1" "bandwidth": stream.bitrate } if stream.width <> invalid @@ -226,26 +226,26 @@ class DashManifest bandwidth = ((storyboardWidthInPixels * storyboardHeightInPixels * 0.5) / duration) if xml.Node("AdaptationSet", { - "id": `${id}`, - "mimeType": "image/jpeg", + "id": `${id}` + "mimeType": "image/jpeg" "contentType": "image" }) xml.Node("SegmentTemplate", { - "media": url, - "duration": duration, + "media": url + "duration": duration "startNumber": 0 }) xml.End() if xml.Node("Representation", { - "id": `thumbnails_${id}`, - "bandwidth": bandwidth, - "width": storyboardWidthInPixels, + "id": `thumbnails_${id}` + "bandwidth": bandwidth + "width": storyboardWidthInPixels "height": storyboardHeightInPixels }) xml.Node("EssentialProperty", { - "schemeIdUri": "http://dashif.org/guidelines/thumbnail_tile", + "schemeIdUri": "http://dashif.org/guidelines/thumbnail_tile" "value": `${storyboardWidth}x${storyboardHeight}` }) xml.End() @@ -334,8 +334,8 @@ class DashManifest stream = streams[i] mimeType = stream.type.Tokenize(";")[0] types[`${mimeType}-${stream.languageInfo.lang}-${stream.languageInfo.acont}`] = { - "mimeType": mimeType, - "lang": stream.languageInfo.lang, + "mimeType": mimeType + "lang": stream.languageInfo.lang "acont": stream.languageInfo.acont } end for diff --git a/playlet-lib/src/components/Services/Invidious/InvidiousService.bs b/playlet-lib/src/components/Services/Invidious/InvidiousService.bs index 940bbfcf..1cd437a5 100644 --- a/playlet-lib/src/components/Services/Invidious/InvidiousService.bs +++ b/playlet-lib/src/components/Services/Invidious/InvidiousService.bs @@ -45,15 +45,15 @@ namespace Invidious m.endpoints = node.apiDefinitions m.responseHanlders = { - DefaultHandler: m.DefaultHandler, - AuthFeedHandler: m.AuthFeedHandler, - PlaylistHandler: m.PlaylistHandler, - VideoInfoHandler: m.VideoInfoHandler, - PlaylistInfoHandler: m.PlaylistInfoHandler, - ChannelInfoHandler: m.ChannelInfoHandler, - ChannelVideosHandler: m.ChannelVideosHandler, - ChannelPlaylistsHandler: m.ChannelPlaylistsHandler, - ChannelRelatedChannelsHandler: m.ChannelRelatedChannelsHandler, + DefaultHandler: m.DefaultHandler + AuthFeedHandler: m.AuthFeedHandler + PlaylistHandler: m.PlaylistHandler + VideoInfoHandler: m.VideoInfoHandler + PlaylistInfoHandler: m.PlaylistInfoHandler + ChannelInfoHandler: m.ChannelInfoHandler + ChannelVideosHandler: m.ChannelVideosHandler + ChannelPlaylistsHandler: m.ChannelPlaylistsHandler + ChannelRelatedChannelsHandler: m.ChannelRelatedChannelsHandler WatchHistoryHandler: m.WatchHistoryHandler } end function @@ -209,7 +209,7 @@ namespace Invidious endpoint = m.endpoints[feedSource.endpoint] if endpoint = invalid return { - success: false, + success: false error: `Endpoint ${feedSource.endpoint} not found` } end if @@ -222,7 +222,7 @@ namespace Invidious authToken = m.node.authToken if authToken = invalid return { - success: false, + success: false error: ERROR_NOT_AUTHENTICATED } end if @@ -283,12 +283,12 @@ namespace Invidious if response.IsSuccess() and result <> invalid return { - success: true, + success: true result: result } else return { - success: false, + success: false error: response.ErrorMessage() } end if @@ -318,7 +318,7 @@ namespace Invidious if response.StatusCode() = 200 json = response.Json() return { - items: json.videos, + items: json.videos continuation: json.continuation } end if @@ -329,7 +329,7 @@ namespace Invidious if response.StatusCode() = 200 json = response.Json() return { - items: json.playlists, + items: json.playlists continuation: json.continuation } end if @@ -340,7 +340,7 @@ namespace Invidious if response.StatusCode() = 200 json = response.Json() return { - items: json.relatedChannels, + items: json.relatedChannels continuation: json.continuation } end if @@ -422,7 +422,7 @@ namespace Invidious videos = [] for each item in json videos.push({ - "type": "video", + "type": "video" "videoId": item }) end for @@ -454,7 +454,7 @@ namespace Invidious ' Right now we're probably in a UI thread, and we can't unregister the token ' Without a Task StartAsyncTask(InvidiousUnregisterTokenTask, { - invidious: m.node, + invidious: m.node authToken: authToken }) RegistryUtils.Delete(RegistryUtils.INVIDIOUS_TOKEN) @@ -470,8 +470,8 @@ We apologize for the inconvenience.` function SetAuthToken(token as string, instance as string, username as dynamic) obj = { - token: token, - instance: instance, + token: token + instance: instance username: username } diff --git a/playlet-lib/src/components/Services/Invidious/InvidiousSubscriptionsTask.bs b/playlet-lib/src/components/Services/Invidious/InvidiousSubscriptionsTask.bs index cf5a63ea..77edeac9 100644 --- a/playlet-lib/src/components/Services/Invidious/InvidiousSubscriptionsTask.bs +++ b/playlet-lib/src/components/Services/Invidious/InvidiousSubscriptionsTask.bs @@ -20,7 +20,7 @@ function InvidiousSubscriptionsTask(input as object) as object LogError("Error getting subscriptions:", error) return { - success: false, + success: false error: response.ErrorMessage() } end if diff --git a/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockService.bs b/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockService.bs index f0d58b0f..1fb28ee4 100644 --- a/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockService.bs +++ b/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockService.bs @@ -6,7 +6,6 @@ namespace SponsorBlock const SKIP_SEGMENT_ENDPOINT = "/api/skipSegments" const VIEWED_SEGMENT_ENDPOINT = "/api/viewedVideoSponsorTime" - class SponsorBlockService function new() ' TODO:P2 this is being read and parsed on every skipped segment. It should be cached. diff --git a/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockTask.bs b/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockTask.bs index 55154702..d7828eb5 100644 --- a/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockTask.bs +++ b/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockTask.bs @@ -15,8 +15,8 @@ function SponsorBlockTask(input as object) as object end if return { - videoId: videoId, - skipSegments: skipSegments, + videoId: videoId + skipSegments: skipSegments barPath: barPath } end function diff --git a/playlet-lib/src/components/VideoFeed/VideoRowCell/RowCell.bs b/playlet-lib/src/components/VideoFeed/VideoRowCell/RowCell.bs index 6e65e8b5..64a3b184 100644 --- a/playlet-lib/src/components/VideoFeed/VideoRowCell/RowCell.bs +++ b/playlet-lib/src/components/VideoFeed/VideoRowCell/RowCell.bs @@ -4,18 +4,18 @@ function OnContentSet() as void content = m.top.itemContent visibleProperties = { - "video": "videoRowCellVisible", - "playlist": "playlistRowCellVisible", - "channel": "channelRowCellVisible", - "loading": "loadingRowCellVisible", + "video": "videoRowCellVisible" + "playlist": "playlistRowCellVisible" + "channel": "channelRowCellVisible" + "loading": "loadingRowCellVisible" "action": "actionRowCellVisible" } contentProperties = { - "video": "videoRowCellItemContent", - "playlist": "playlistRowCellItemContent", - "channel": "channelRowCellItemContent", - "loading": "loadingRowCellItemContent", + "video": "videoRowCellItemContent" + "playlist": "playlistRowCellItemContent" + "channel": "channelRowCellItemContent" + "loading": "loadingRowCellItemContent" "action": "actionRowCellItemContent" } diff --git a/playlet-lib/src/components/VideoFeed/VideoRowList.bs b/playlet-lib/src/components/VideoFeed/VideoRowList.bs index dd4e25e8..69e77e00 100644 --- a/playlet-lib/src/components/VideoFeed/VideoRowList.bs +++ b/playlet-lib/src/components/VideoFeed/VideoRowList.bs @@ -209,7 +209,7 @@ function InitContent() as void end if task = StartAsyncTask(VideoRowListContentTask, { - node: m.top, + node: m.top feeds: m.top.feeds }, OnVideoRowListContentTaskResult) m.pendingLoadTasks[task.id] = task @@ -282,8 +282,8 @@ function LoadRowContent(contentNode as object) contentNode.loadState = FeedLoadState.Loading task = StartAsyncTask(VideoRowListRowContentTask, { - rowList: m.top, - feedContentNode: contentNode, + rowList: m.top + feedContentNode: contentNode invidious: m.invidious }, OnVideoRowListRowContentTaskResult) m.pendingLoadTasks[task.id] = task diff --git a/playlet-lib/src/components/VideoFeed/VideoRowListRowContentTask.bs b/playlet-lib/src/components/VideoFeed/VideoRowListRowContentTask.bs index 0d23dc9e..f18badb6 100644 --- a/playlet-lib/src/components/VideoFeed/VideoRowListRowContentTask.bs +++ b/playlet-lib/src/components/VideoFeed/VideoRowListRowContentTask.bs @@ -143,7 +143,7 @@ function VideoRowListRowContentTask(input as object) as object catch error HandleFeedLoadErrorDialog(error, rowList) return { - success: false, + success: false error: error } end try diff --git a/playlet-lib/src/components/VideoPlayer/SponsorBlock.bs b/playlet-lib/src/components/VideoPlayer/SponsorBlock.bs index 2d075493..afa16255 100644 --- a/playlet-lib/src/components/VideoPlayer/SponsorBlock.bs +++ b/playlet-lib/src/components/VideoPlayer/SponsorBlock.bs @@ -110,7 +110,7 @@ namespace SponsorBlock barPath = output.result.barPath if barPath <> invalid m.top.trickPlayBar.trackImageUri = barPath - m.top.trickPlayBar.filledBarBlendColor = "0xFF000080" + m.top.trickPlayBar.filledBarBlendColor = "#FF000080" end if m.top.UnobserveFieldScoped("position") diff --git a/playlet-lib/src/components/VideoPlayer/VideoContentTask.bs b/playlet-lib/src/components/VideoPlayer/VideoContentTask.bs index 54b86c6c..4ad56342 100644 --- a/playlet-lib/src/components/VideoPlayer/VideoContentTask.bs +++ b/playlet-lib/src/components/VideoPlayer/VideoContentTask.bs @@ -27,7 +27,7 @@ function VideoContentTask(input as object) as object if not response.IsSuccess() or metadata = invalid return { - success: false, + success: false error: response.ErrorMessage() } end if @@ -41,9 +41,9 @@ function VideoContentTask(input as object) as object SetCaptions(metadata, service, contentNode) contentNode.addFields({ - metadata: metadata, + metadata: metadata ' StreamUrls is taken - playletStreamUrls: streamUrls, + playletStreamUrls: streamUrls playletStreamUrlIndex: 0 }) @@ -104,11 +104,11 @@ function AddStreamUrls(streamUrls as object, metadata as object, service as Invi ' These are roughly the itags for 360p and 480p ' Most videos will hit 18, which is 360p mediumItags = { - "18": true, - "43": true, - "44": true, - "82": true, - "83": true, + "18": true + "43": true + "44": true + "82": true + "83": true "101": true } for each formatStream in metadata.formatStreams @@ -172,8 +172,8 @@ function SetCaptions(metadata as object, service as object, contentNode as objec for each caption in metadata.captions subtitleTracks.Push({ - Description: caption.label, - Language: isoLanguageList[caption.language_code] ?? caption.language_code, + Description: caption.label + Language: isoLanguageList[caption.language_code] ?? caption.language_code TrackName: instance + caption.url }) end for diff --git a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs index 1e88854f..2a7d6ef8 100644 --- a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs +++ b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs @@ -69,9 +69,9 @@ function StartVideoContentTask(videoContentNode as object) m.top.content = videoContentNode m.videoContentTask = StartAsyncTask(VideoContentTask, { - content: videoContentNode, - invidious: m.top.invidious, - preferences: m.top.preferences, + content: videoContentNode + invidious: m.top.invidious + preferences: m.top.preferences playletServerPort: m.top.webServer.port }, OnVideoContentTaskResults) end function @@ -110,7 +110,7 @@ end function function MarkVideoWatched(videoId as string) if m.top.invidious.authToken <> invalid StartAsyncTask(MarkVideoWatchedTask, { - videoId: videoId, + videoId: videoId invidious: m.top.invidious }) end if diff --git a/playlet-lib/src/components/VideoPlayer/VideoPlayerStyle.bs b/playlet-lib/src/components/VideoPlayer/VideoPlayerStyle.bs index 128fd286..9929f733 100644 --- a/playlet-lib/src/components/VideoPlayer/VideoPlayerStyle.bs +++ b/playlet-lib/src/components/VideoPlayer/VideoPlayerStyle.bs @@ -1,12 +1,12 @@ function SetPlayerStyle() - m.top.trickPlayBar.filledBarBlendColor = "0xFF1C30FF" - m.top.bufferingBar.filledBarBlendColor = "0xFF1C30FF" - m.top.retrievingBar.filledBarBlendColor = "0xFF1C30FF" + m.top.trickPlayBar.filledBarBlendColor = "#FF1C30FF" + m.top.bufferingBar.filledBarBlendColor = "#FF1C30FF" + m.top.retrievingBar.filledBarBlendColor = "#FF1C30FF" ' Find the BusySpinner built into the Video node busySpinner = FindChildNodeOfType(m.top, "BusySpinner") if busySpinner <> invalid - busySpinner.poster.blendColor = "0xFF1C30FF" + busySpinner.poster.blendColor = "#FF1C30FF" end if end function diff --git a/playlet-lib/src/components/Web/PlayletWebServer/Middleware/BookmarksRouter.bs b/playlet-lib/src/components/Web/PlayletWebServer/Middleware/BookmarksRouter.bs index 8a3bc8c2..9f38a51c 100644 --- a/playlet-lib/src/components/Web/PlayletWebServer/Middleware/BookmarksRouter.bs +++ b/playlet-lib/src/components/Web/PlayletWebServer/Middleware/BookmarksRouter.bs @@ -52,7 +52,7 @@ namespace Http end for feeds.push({ - "title": bookmarkGroupNode.title, + "title": bookmarkGroupNode.title "feedSources": feedSources }) end for diff --git a/playlet-lib/src/components/Web/PlayletWebServer/Middleware/PlayletLibUrlsRouter.bs b/playlet-lib/src/components/Web/PlayletWebServer/Middleware/PlayletLibUrlsRouter.bs index 21f851f9..95200f6e 100644 --- a/playlet-lib/src/components/Web/PlayletWebServer/Middleware/PlayletLibUrlsRouter.bs +++ b/playlet-lib/src/components/Web/PlayletWebServer/Middleware/PlayletLibUrlsRouter.bs @@ -18,7 +18,7 @@ namespace Http end if response.Json({ - loaded: scene.playletLibLoadedUrl, + loaded: scene.playletLibLoadedUrl saved: saved }) return true diff --git a/playlet-lib/src/components/Web/PlayletWebServer/Middleware/StateApiRouter.bs b/playlet-lib/src/components/Web/PlayletWebServer/Middleware/StateApiRouter.bs index 6fc9bc0b..6f582fee 100644 --- a/playlet-lib/src/components/Web/PlayletWebServer/Middleware/StateApiRouter.bs +++ b/playlet-lib/src/components/Web/PlayletWebServer/Middleware/StateApiRouter.bs @@ -50,11 +50,10 @@ namespace Http if ArrayUtils.IndexOfString(keys, "invidious") <> -1 authToken = invidiousNode.authToken state["invidious"] = { - current_instance: invidiousNode@.GetCurrentInstance(), - ' backup_instances: InvidiousSettings.GetBackupInstances(), - auth_url: invidiousNode@.GetAuthorizeTokenLink(), - logged_in: authToken <> invalid, - logged_in_instance: authToken <> invalid ? authToken.instance : invalid, + current_instance: invidiousNode@.GetCurrentInstance() + auth_url: invidiousNode@.GetAuthorizeTokenLink() + logged_in: authToken <> invalid + logged_in_instance: authToken <> invalid ? authToken.instance : invalid logged_in_username: authToken <> invalid ? authToken.username : invalid } end if diff --git a/playlet-lib/src/components/Web/WebServer/Http/HttpRouter.bs b/playlet-lib/src/components/Web/WebServer/Http/HttpRouter.bs index 0c74e94e..b78dfe42 100644 --- a/playlet-lib/src/components/Web/WebServer/Http/HttpRouter.bs +++ b/playlet-lib/src/components/Web/WebServer/Http/HttpRouter.bs @@ -36,10 +36,10 @@ namespace Http for each route in m.routes if m.RouteMatchesRequest(route, request) if route.handler({ - router: m, - request: request, - response: response, - connection: connection, + router: m + request: request + response: response + connection: connection server: response.server }) = true return true diff --git a/playlet-lib/src/components/Web/WebServer/Middleware/EtagUtils.bs b/playlet-lib/src/components/Web/WebServer/Middleware/EtagUtils.bs index 76bad457..c1eed3ed 100644 --- a/playlet-lib/src/components/Web/WebServer/Middleware/EtagUtils.bs +++ b/playlet-lib/src/components/Web/WebServer/Middleware/EtagUtils.bs @@ -25,7 +25,7 @@ namespace Http if not StringUtils.IsNullOrEmpty(path) m.pathToEtags[path] = { - etag: response.headers["ETag"], + etag: response.headers["ETag"] size: body.count() } end if diff --git a/playlet-lib/src/components/Web/WebServer/WebSockets/WebSocketServer.bs b/playlet-lib/src/components/Web/WebServer/WebSockets/WebSocketServer.bs index 9cc9fc0d..12dd5928 100644 --- a/playlet-lib/src/components/Web/WebServer/WebSockets/WebSocketServer.bs +++ b/playlet-lib/src/components/Web/WebServer/WebSockets/WebSocketServer.bs @@ -41,7 +41,7 @@ namespace Web LogInfo("on connect") for each listener in m.onConnectListeners listener({ - server: m, + server: m connection: connection }) end for @@ -51,7 +51,7 @@ namespace Web LogInfo("on disconnect") for each listener in m.onDisconnectListeners listener({ - server: m, + server: m connection: connection }) end for @@ -60,8 +60,8 @@ namespace Web function TriggerOnMessage(connection as Web.WebSocketConnection, message as string) for each listener in m.onMessageListeners listener({ - server: m, - connection: connection, + server: m + connection: connection message: message }) end for diff --git a/playlet-lib/src/config/sponsorblock_config.json5 b/playlet-lib/src/config/sponsorblock_config.json5 index 5923f2f6..c0be42a2 100644 --- a/playlet-lib/src/config/sponsorblock_config.json5 +++ b/playlet-lib/src/config/sponsorblock_config.json5 @@ -22,7 +22,7 @@ 'mute', 'full', ], - color: '#00d400B3', + color: '#00D400B3', }, selfpromo: { title: 'Unpaid/Self Promotion', @@ -32,7 +32,7 @@ 'mute', 'full', ], - color: '#ffff00B3', + color: '#FFFF00B3', }, exclusive_access: { title: 'Exclusive Access', @@ -40,7 +40,7 @@ categorySupport: [ 'full', ], - color: '#008a5cB3', + color: '#008A5CB3', }, interaction: { title: 'Interaction Reminder (Subscribe)', @@ -49,7 +49,7 @@ 'skip', 'mute', ], - color: '#cc00ffB3', + color: '#CC00FFB3', }, poi_highlight: { title: 'Highlight', @@ -57,7 +57,7 @@ categorySupport: [ 'poi', ], - color: '#ff1684B3', + color: '#FF1684B3', }, intro: { title: 'Intermission/Intro Animation', @@ -66,7 +66,7 @@ 'skip', 'mute', ], - color: '#00ffffB3', + color: '#00FFFFB3', }, outro: { title: 'Endcards/Credits', @@ -75,16 +75,16 @@ 'skip', 'mute', ], - color: '#0202edB3', + color: '#0202EDB3', }, preview: { - title: 'Preview/Recap', - short_title: 'Preview/Recap', + title: 'Preview/Recap/Hook', + short_title: 'Preview/Recap/Hook', categorySupport: [ 'skip', 'mute', ], - color: '#008fd6B3', + color: '#008FD6B3', }, filler: { title: 'Filler Tangent/Jokes', @@ -109,7 +109,7 @@ categorySupport: [ 'skip', ], - color: '#ff9900B3', + color: '#FF9900B3', }, }, } \ No newline at end of file diff --git a/playlet-lib/src/images/icons/edit-48-black.png b/playlet-lib/src/images/icons/edit-48-black.png index 09de5e5e..60be97e3 100644 Binary files a/playlet-lib/src/images/icons/edit-48-black.png and b/playlet-lib/src/images/icons/edit-48-black.png differ diff --git a/playlet-lib/src/images/icons/edit-48-white.png b/playlet-lib/src/images/icons/edit-48-white.png index ff1d2c3b..e567e068 100644 Binary files a/playlet-lib/src/images/icons/edit-48-white.png and b/playlet-lib/src/images/icons/edit-48-white.png differ diff --git a/playlet-lib/src/images/icons/filters-black.png b/playlet-lib/src/images/icons/filters-black.png index 225c360b..c6f1a03b 100644 Binary files a/playlet-lib/src/images/icons/filters-black.png and b/playlet-lib/src/images/icons/filters-black.png differ diff --git a/playlet-lib/src/images/icons/filters-black.svg b/playlet-lib/src/images/icons/filters-black.svg index 18eda655..1547215f 100644 --- a/playlet-lib/src/images/icons/filters-black.svg +++ b/playlet-lib/src/images/icons/filters-black.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/playlet-lib/src/images/icons/filters-black.svg.meta.json5 b/playlet-lib/src/images/icons/filters-black.svg.meta.json5 index badf3443..6cfea6e9 100644 --- a/playlet-lib/src/images/icons/filters-black.svg.meta.json5 +++ b/playlet-lib/src/images/icons/filters-black.svg.meta.json5 @@ -1,9 +1,9 @@ { - inputHash: 'b88a05052cd01cb7a89bd6802418d79e', + inputHash: 'ed4c9f819d239f42552388b35703d49d', outputs: [ { outputFilePath: 'images/icons/filters-black.png', - outputHash: 'f0a7539ae840c00a2d91292f993bb75e', + outputHash: 'b468f7bd2996a1c1f0acbfdc6512b1a5', width: 64, height: 64, }, diff --git a/playlet-lib/src/images/icons/filters-white.png b/playlet-lib/src/images/icons/filters-white.png index 9dddcff4..e667140b 100644 Binary files a/playlet-lib/src/images/icons/filters-white.png and b/playlet-lib/src/images/icons/filters-white.png differ diff --git a/playlet-lib/src/images/icons/filters-white.svg b/playlet-lib/src/images/icons/filters-white.svg index a81e0702..229ffaaa 100644 --- a/playlet-lib/src/images/icons/filters-white.svg +++ b/playlet-lib/src/images/icons/filters-white.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/playlet-lib/src/images/icons/filters-white.svg.meta.json5 b/playlet-lib/src/images/icons/filters-white.svg.meta.json5 index cc9430a3..812acf0c 100644 --- a/playlet-lib/src/images/icons/filters-white.svg.meta.json5 +++ b/playlet-lib/src/images/icons/filters-white.svg.meta.json5 @@ -1,9 +1,9 @@ { - inputHash: 'df7918a3b43642f707cc0d9fcfd2d9ee', + inputHash: 'a213d2aa04eb7063f173e6a75ed466de', outputs: [ { outputFilePath: 'images/icons/filters-white.png', - outputHash: '914e2c8da9772c23c24bebbd39c918f2', + outputHash: '1a9c02d5597920100003614d70d54c0f', width: 64, height: 64, }, diff --git a/playlet-lib/src/images/icons/home.png b/playlet-lib/src/images/icons/home.png index ba904591..93c37151 100644 Binary files a/playlet-lib/src/images/icons/home.png and b/playlet-lib/src/images/icons/home.png differ diff --git a/playlet-lib/src/images/icons/home.svg b/playlet-lib/src/images/icons/home.svg index d1433d61..2808bdab 100644 --- a/playlet-lib/src/images/icons/home.svg +++ b/playlet-lib/src/images/icons/home.svg @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/playlet-lib/src/images/icons/home.svg.meta.json5 b/playlet-lib/src/images/icons/home.svg.meta.json5 index ec9c5e38..9f1e5e59 100644 --- a/playlet-lib/src/images/icons/home.svg.meta.json5 +++ b/playlet-lib/src/images/icons/home.svg.meta.json5 @@ -1,9 +1,9 @@ { - inputHash: '788d5e9ddc5a26953392afa17a85a05c', + inputHash: '095d37a85c2c612e2cd361b3e9ade2cd', outputs: [ { outputFilePath: 'images/icons/home.png', - outputHash: '55f237e441ea693c152fbf0fd52a98d2', + outputHash: '930a8bde6f292ca4b8fb7a43adb53a5f', width: 48, height: 48, }, diff --git a/playlet-lib/src/images/icons/info.png b/playlet-lib/src/images/icons/info.png index 5519d32f..a1364d57 100644 Binary files a/playlet-lib/src/images/icons/info.png and b/playlet-lib/src/images/icons/info.png differ diff --git a/playlet-lib/src/images/icons/info.svg b/playlet-lib/src/images/icons/info.svg index f761a958..7363148c 100644 --- a/playlet-lib/src/images/icons/info.svg +++ b/playlet-lib/src/images/icons/info.svg @@ -1,4 +1,4 @@ \ No newline at end of file + style="enable-background:new 0 0 122.88 122.88" xml:space="preserve"> \ No newline at end of file diff --git a/playlet-lib/src/images/icons/info.svg.meta.json5 b/playlet-lib/src/images/icons/info.svg.meta.json5 index 6a12f456..4ed24187 100644 --- a/playlet-lib/src/images/icons/info.svg.meta.json5 +++ b/playlet-lib/src/images/icons/info.svg.meta.json5 @@ -1,9 +1,9 @@ { - inputHash: '92a5720049ca36c38c695969534c2bb5', + inputHash: 'd25e6795ca6071843960c2c5271bb94e', outputs: [ { outputFilePath: 'images/icons/info.png', - outputHash: '4362586ae18f53144b5921d318634d31', + outputHash: '30a6659ef33d02857fb80d07683d25cb', width: 48, height: 48, }, diff --git a/playlet-lib/src/images/icons/phone.png b/playlet-lib/src/images/icons/phone.png index b811d3e4..f001de30 100644 Binary files a/playlet-lib/src/images/icons/phone.png and b/playlet-lib/src/images/icons/phone.png differ diff --git a/playlet-lib/src/images/icons/phone.svg b/playlet-lib/src/images/icons/phone.svg index 40c6593b..eee5f77a 100644 --- a/playlet-lib/src/images/icons/phone.svg +++ b/playlet-lib/src/images/icons/phone.svg @@ -1,42 +1,12 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/playlet-lib/src/images/icons/phone.svg.meta.json5 b/playlet-lib/src/images/icons/phone.svg.meta.json5 index f51d39a0..c83888d8 100644 --- a/playlet-lib/src/images/icons/phone.svg.meta.json5 +++ b/playlet-lib/src/images/icons/phone.svg.meta.json5 @@ -1,9 +1,9 @@ { - inputHash: 'e6318f56ce4c0cc637cf0cc3180a2013', + inputHash: 'f684b19a8b10a485f4d878e052805c74', outputs: [ { outputFilePath: 'images/icons/phone.png', - outputHash: '0492b3133fc6475224bae712e1129471', + outputHash: 'd51aaf82ba70b964f40dd364a72f4240', width: 48, height: 48, }, diff --git a/playlet-lib/src/images/icons/search.png b/playlet-lib/src/images/icons/search.png index ca22c83c..06e58834 100644 Binary files a/playlet-lib/src/images/icons/search.png and b/playlet-lib/src/images/icons/search.png differ diff --git a/playlet-lib/src/images/icons/search.svg b/playlet-lib/src/images/icons/search.svg index 31b0ce86..e5c7555f 100644 --- a/playlet-lib/src/images/icons/search.svg +++ b/playlet-lib/src/images/icons/search.svg @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/playlet-lib/src/images/icons/search.svg.meta.json5 b/playlet-lib/src/images/icons/search.svg.meta.json5 index e1c26236..b6d0413d 100644 --- a/playlet-lib/src/images/icons/search.svg.meta.json5 +++ b/playlet-lib/src/images/icons/search.svg.meta.json5 @@ -1,9 +1,9 @@ { - inputHash: 'dede98d4bf3c835836c82c485600108c', + inputHash: '050f0c067e484901f96312da575a2cd6', outputs: [ { outputFilePath: 'images/icons/search.png', - outputHash: 'da7de20ee8700756ff8ab6c806682853', + outputHash: '20246ba2da61c2a47af4e49a45845fd2', width: 48, height: 48, }, diff --git a/playlet-lib/src/images/icons/settings.png b/playlet-lib/src/images/icons/settings.png index 1204d17a..1815bdcf 100644 Binary files a/playlet-lib/src/images/icons/settings.png and b/playlet-lib/src/images/icons/settings.png differ diff --git a/playlet-lib/src/images/icons/settings.svg b/playlet-lib/src/images/icons/settings.svg index d0b2382c..beca049f 100644 --- a/playlet-lib/src/images/icons/settings.svg +++ b/playlet-lib/src/images/icons/settings.svg @@ -13,29 +13,29 @@ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> - - - - + + + + \ No newline at end of file diff --git a/playlet-lib/src/images/icons/settings.svg.meta.json5 b/playlet-lib/src/images/icons/settings.svg.meta.json5 index bbc28ab6..cfb39f2c 100644 --- a/playlet-lib/src/images/icons/settings.svg.meta.json5 +++ b/playlet-lib/src/images/icons/settings.svg.meta.json5 @@ -1,9 +1,9 @@ { - inputHash: '4a523fd829e2c489df85d5db106889a2', + inputHash: 'ca987d3d31f4ec1d3cf9f4e9622a546f', outputs: [ { outputFilePath: 'images/icons/settings.png', - outputHash: '07b98411ee36a3ccf3004e727d53d4f8', + outputHash: 'ed76df0b00cf8d419f413859170c6120', width: 48, height: 48, }, diff --git a/playlet-lib/src/images/icons/star.png b/playlet-lib/src/images/icons/star.png index b373e462..d3f3010e 100644 Binary files a/playlet-lib/src/images/icons/star.png and b/playlet-lib/src/images/icons/star.png differ diff --git a/playlet-lib/src/images/icons/star.svg b/playlet-lib/src/images/icons/star.svg index d19fe73d..9ac85156 100644 --- a/playlet-lib/src/images/icons/star.svg +++ b/playlet-lib/src/images/icons/star.svg @@ -1,5 +1,5 @@ - \ No newline at end of file diff --git a/playlet-lib/src/images/icons/star.svg.meta.json5 b/playlet-lib/src/images/icons/star.svg.meta.json5 index 26a73ae3..5a233736 100644 --- a/playlet-lib/src/images/icons/star.svg.meta.json5 +++ b/playlet-lib/src/images/icons/star.svg.meta.json5 @@ -1,9 +1,9 @@ { - inputHash: '74103c34870ccaeae6d5b3282fabdc98', + inputHash: 'c2960b9197693b44f1e2816d31c15021', outputs: [ { outputFilePath: 'images/icons/star.png', - outputHash: '18773e4f645b0b92e8eb91524b3ac278', + outputHash: '4e34693fe0b241c10d281f1189820209', width: 48, height: 48, }, diff --git a/playlet-lib/src/images/icons/test-failed.png b/playlet-lib/src/images/icons/test-failed.png index 2f059021..ad8eca90 100644 Binary files a/playlet-lib/src/images/icons/test-failed.png and b/playlet-lib/src/images/icons/test-failed.png differ diff --git a/playlet-lib/src/images/icons/test-passed.png b/playlet-lib/src/images/icons/test-passed.png index 29a1d37e..59f48145 100644 Binary files a/playlet-lib/src/images/icons/test-passed.png and b/playlet-lib/src/images/icons/test-passed.png differ diff --git a/playlet-lib/src/source/QrCode/QRCode.exports.bs b/playlet-lib/src/source/QrCode/QRCode.exports.bs index f3fa90d4..4fbf659b 100644 --- a/playlet-lib/src/source/QrCode/QRCode.exports.bs +++ b/playlet-lib/src/source/QrCode/QRCode.exports.bs @@ -17,9 +17,9 @@ namespace QrCode function QRErrorCorrectionLevel() as object return { - L: 1, - M: 0, - Q: 3, + L: 1 + M: 0 + Q: 3 H: 2 } end function diff --git a/playlet-lib/src/source/QrCode/QRData_AlphaNumeric.bs b/playlet-lib/src/source/QrCode/QRData_AlphaNumeric.bs index e12adbdb..8a9c8ed3 100644 --- a/playlet-lib/src/source/QrCode/QRData_AlphaNumeric.bs +++ b/playlet-lib/src/source/QrCode/QRData_AlphaNumeric.bs @@ -6,50 +6,50 @@ namespace QrCode m.mode = QrCode.QRMode.AlphaNumeric m.CHAR_TABLE = { - "0": 0, - "1": 1, - "2": 2, - "3": 3, - "4": 4, - "5": 5, - "6": 6, - "7": 7, - "8": 8, - "9": 9, - "A": 10, - "B": 11, - "C": 12, - "D": 13, - "E": 14, - "F": 15, - "G": 16, - "H": 17, - "I": 18, - "J": 19, - "K": 20, - "L": 21, - "M": 22, - "N": 23, - "O": 24, - "P": 25, - "Q": 26, - "R": 27, - "S": 28, - "T": 29, - "U": 30, - "V": 31, - "W": 32, - "X": 33, - "Y": 34, - "Z": 35, - " ": 36, - "$": 37, - "%": 38, - "*": 39, - "+": 40, - "-": 41, - ".": 42, - "/": 43, + "0": 0 + "1": 1 + "2": 2 + "3": 3 + "4": 4 + "5": 5 + "6": 6 + "7": 7 + "8": 8 + "9": 9 + "A": 10 + "B": 11 + "C": 12 + "D": 13 + "E": 14 + "F": 15 + "G": 16 + "H": 17 + "I": 18 + "J": 19 + "K": 20 + "L": 21 + "M": 22 + "N": 23 + "O": 24 + "P": 25 + "Q": 26 + "R": 27 + "S": 28 + "T": 29 + "U": 30 + "V": 31 + "W": 32 + "X": 33 + "Y": 34 + "Z": 35 + " ": 36 + "$": 37 + "%": 38 + "*": 39 + "+": 40 + "-": 41 + ".": 42 + "/": 43 ":": 44 } end function diff --git a/playlet-lib/src/source/QrCode/QRData_Numeric.bs b/playlet-lib/src/source/QrCode/QRData_Numeric.bs index 87ceb5f3..4baa4ef7 100644 --- a/playlet-lib/src/source/QrCode/QRData_Numeric.bs +++ b/playlet-lib/src/source/QrCode/QRData_Numeric.bs @@ -6,15 +6,15 @@ namespace QrCode m.mode = QrCode.QRMode.Numeric m.CHAR_TABLE = { - "0": 0, - "1": 1, - "2": 2, - "3": 3, - "4": 4, - "5": 5, - "6": 6, - "7": 7, - "8": 8, + "0": 0 + "1": 1 + "2": 2 + "3": 3 + "4": 4 + "5": 5 + "6": 6 + "7": 7 + "8": 8 "9": 9 } end function diff --git a/playlet-lib/src/source/QrCode/QRRSBlock.bs b/playlet-lib/src/source/QrCode/QRRSBlock.bs index 5c747463..ec715b58 100644 --- a/playlet-lib/src/source/QrCode/QRRSBlock.bs +++ b/playlet-lib/src/source/QrCode/QRRSBlock.bs @@ -4,9 +4,9 @@ namespace QrCode function new() m.ERROR_CORRECTION_LEVEL_OFFSETS = { - L: 0, - M: 1, - Q: 2, + L: 0 + M: 1 + Q: 2 H: 3 } @@ -284,7 +284,7 @@ namespace QrCode dataCount = rsBlock[index + 2] for j = 0 to count - 1 step 1 result.push({ - totalCount: totalCount, + totalCount: totalCount dataCount: dataCount }) end for diff --git a/playlet-lib/src/source/QrCode/QrImage.bs b/playlet-lib/src/source/QrCode/QrImage.bs index 4aa4b099..46d4214b 100644 --- a/playlet-lib/src/source/QrCode/QrImage.bs +++ b/playlet-lib/src/source/QrCode/QrImage.bs @@ -54,8 +54,8 @@ namespace QrCode black = &H000000ff bitmap = createObject("roBitmap", { - width: qrSize, - height: qrSize, + width: qrSize + height: qrSize AlphaEnable: false }) bitmap.clear(white) diff --git a/playlet-lib/src/source/services/ApplicationInfo.bs b/playlet-lib/src/source/services/ApplicationInfo.bs index 36d9577d..228ab4f3 100644 --- a/playlet-lib/src/source/services/ApplicationInfo.bs +++ b/playlet-lib/src/source/services/ApplicationInfo.bs @@ -32,10 +32,10 @@ class ApplicationInfo function GetAppInfo() as object if m.appInfo = invalid m.appInfo = { - id: m.roAppInfo.GetID(), - app_version: m.roAppInfo.GetVersion(), - app_git_commit_hash: m.roAppInfo.GetValue("git_commit_sha"), - lib_version: m.GetLibVersion(), + id: m.roAppInfo.GetID() + app_version: m.roAppInfo.GetVersion() + app_git_commit_hash: m.roAppInfo.GetValue("git_commit_sha") + lib_version: m.GetLibVersion() lib_git_commit_hash: m.GetLibGitCommitHash() } @@ -64,20 +64,20 @@ class ApplicationInfo function GetDeviceInfo() as object if m.deviceInfo = invalid m.deviceInfo = { - model: m.roDeviceInfo.GetModel(), - model_display_name: m.roDeviceInfo.GetModelDisplayName(), - model_type: m.roDeviceInfo.GetModelType(), - model_details: m.roDeviceInfo.GetModelDetails(), - os_version: m.roDeviceInfo.GetOSVersion(), - display_type: m.roDeviceInfo.GetDisplayType(), - display_mode: m.roDeviceInfo.GetDisplayMode(), - display_aspect_ratio: m.roDeviceInfo.GetDisplayAspectRatio(), - display_size: m.roDeviceInfo.GetDisplaySize(), - video_mode: m.roDeviceInfo.GetVideoMode(), - ui_resolution: m.roDeviceInfo.GetUIResolution(), - graphics_platform: m.roDeviceInfo.GetGraphicsPlatform(), - internet_status: m.roDeviceInfo.GetInternetStatus(), - user_country_code: m.roDeviceInfo.GetUserCountryCode(), + model: m.roDeviceInfo.GetModel() + model_display_name: m.roDeviceInfo.GetModelDisplayName() + model_type: m.roDeviceInfo.GetModelType() + model_details: m.roDeviceInfo.GetModelDetails() + os_version: m.roDeviceInfo.GetOSVersion() + display_type: m.roDeviceInfo.GetDisplayType() + display_mode: m.roDeviceInfo.GetDisplayMode() + display_aspect_ratio: m.roDeviceInfo.GetDisplayAspectRatio() + display_size: m.roDeviceInfo.GetDisplaySize() + video_mode: m.roDeviceInfo.GetVideoMode() + ui_resolution: m.roDeviceInfo.GetUIResolution() + graphics_platform: m.roDeviceInfo.GetGraphicsPlatform() + internet_status: m.roDeviceInfo.GetInternetStatus() + user_country_code: m.roDeviceInfo.GetUserCountryCode() friendly_name: m.roDeviceInfo.GetFriendlyName() } end if diff --git a/playlet-lib/src/source/services/HttpClient.bs b/playlet-lib/src/source/services/HttpClient.bs index bc32fb78..d2102a15 100644 --- a/playlet-lib/src/source/services/HttpClient.bs +++ b/playlet-lib/src/source/services/HttpClient.bs @@ -90,7 +90,7 @@ namespace HttpClient end if m._queryParams[key] = { - value: valueArray, + value: valueArray arrayType: arrayType } @@ -624,8 +624,8 @@ namespace HttpClientCache end if return { - statusCode: metadata.statusCode, - headers: headers, + statusCode: metadata.statusCode + headers: headers body: body } end function @@ -672,9 +672,9 @@ namespace HttpClientCache body = ValidString(response.Text()) cacheMetadata = { - timestamp: timestamp, - statusCode: response.StatusCode(), - headers: jsonHeaders.Len(), + timestamp: timestamp + statusCode: response.StatusCode() + headers: jsonHeaders.Len() body: body.Len() } diff --git a/playlet-lib/src/source/services/XmlObject.bs b/playlet-lib/src/source/services/XmlObject.bs index 07d327f3..90c8343c 100644 --- a/playlet-lib/src/source/services/XmlObject.bs +++ b/playlet-lib/src/source/services/XmlObject.bs @@ -18,8 +18,8 @@ class XmlObject function Node(name as string, attributes = invalid as object) as boolean newNode = { - name: name, - attributes: attributes, + name: name + attributes: attributes children: [] } diff --git a/playlet-lib/src/source/utils/DisposableObserve.bs b/playlet-lib/src/source/utils/DisposableObserve.bs index d2256132..71f786e5 100644 --- a/playlet-lib/src/source/utils/DisposableObserve.bs +++ b/playlet-lib/src/source/utils/DisposableObserve.bs @@ -5,7 +5,7 @@ function DisposableObserveField(node as object, field as string, callback as str m._disposableObserveFields = [] end if m._disposableObserveFields.push({ - node: node, + node: node field: field }) end function @@ -17,7 +17,7 @@ function DisposableObserveFieldScoped(node as object, field as string, callback m._disposableObserveFieldsScoped = [] end if m._disposableObserveFieldsScoped.push({ - node: node, + node: node field: field }) end function diff --git a/tools/generate-sponsorblock-config.js b/tools/generate-sponsorblock-config.js index 45a5cf9f..9e2cd278 100644 --- a/tools/generate-sponsorblock-config.js +++ b/tools/generate-sponsorblock-config.js @@ -133,7 +133,7 @@ playletConfig.categoryList.forEach(categoryId => { category.title = englishLocale[`category_${categoryId}`].message category.short_title = englishLocale[`category_${categoryId}_short`]?.message ?? category.title; category.categorySupport = configExample.categorySupport[categoryId]; - category.color = getColor(barTypes[categoryId]); + category.color = getColor(barTypes[categoryId]).toUpperCase(); playletConfig.categories[categoryId] = category; });