Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e59e45e310 | ||
|
|
2548fb9097 | ||
|
|
1cb80f71b5 | ||
|
|
0a7a6c65e2 | ||
|
|
529b915d7f | ||
|
|
a76a2cb77f | ||
|
|
707739b901 | ||
|
|
8c72258879 | ||
|
|
d245c072e9 | ||
|
|
0f000590a0 | ||
|
|
93c1e48d39 | ||
|
|
d6c7d81347 | ||
|
|
331f2ff3cb | ||
|
|
6c42fbe056 | ||
|
|
7e8c828007 |
No files matched your search
@@ -5,6 +5,25 @@ 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.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.18.1] - 2024-01-02
|
||||
|
||||
### Fixed
|
||||
|
||||
- A rare bug that causes the app to crash when displaying video cells
|
||||
- A rare bug where a long press can cause a crash
|
||||
- [Attempt] to fix a crash caused by execution timeout when stopping a video takes too long
|
||||
- Unsupported subtitles (subtitles that can be rendered will not be used)
|
||||
|
||||
### Removed
|
||||
|
||||
- `Funny` and `News` from the Home screen.
|
||||
- These are not standard feeds (like `Trending`), and are just search results for `Funny` and `News`. They were added in earlier Playlet versions to have more content in the Home screen.
|
||||
- If you like to add these two feeds to your bookmarks:
|
||||
- Search for `Funny` (or `News`)
|
||||
- Set the `Sort by` filter to `Upload date`
|
||||
- Press and hold the `Ok` button while a video from the search result is selected
|
||||
- Choose the `Add to "Search - Funny"` option
|
||||
|
||||
## [0.18.0] - 2023-12-28
|
||||
|
||||
### Added
|
||||
|
||||
@@ -2,7 +2,7 @@ openapi: 3.0.0
|
||||
|
||||
info:
|
||||
title: Playlet Web API
|
||||
version: 0.18.0
|
||||
version: 0.18.1
|
||||
description:
|
||||
Playlet Web API is a RESTful API for controlling the Playlet app on
|
||||
Roku devices. The API is intended to be used by the Playlet web app, but can
|
||||
|
||||
Generated
+10
-10
@@ -1,21 +1,21 @@
|
||||
{
|
||||
"name": "playlet",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.1",
|
||||
"hasInstallScript": true,
|
||||
"devDependencies": {
|
||||
"@rokucommunity/bslint": "^0.8.13",
|
||||
"@types/crypto-js": "^4.2.1",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/node": "^20.10.5",
|
||||
"@types/node": "^20.10.6",
|
||||
"@types/xml2js": "^0.4.14",
|
||||
"argparse": "^2.0.1",
|
||||
"brighterscript": "0.65.14",
|
||||
"brighterscript": "0.65.15",
|
||||
"brighterscript-formatter": "^1.6.36",
|
||||
"convert-svg-to-png": "^0.6.4",
|
||||
"cross-fetch": "^4.0.0",
|
||||
@@ -370,9 +370,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.10.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz",
|
||||
"integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==",
|
||||
"version": "20.10.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.6.tgz",
|
||||
"integrity": "sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
@@ -728,9 +728,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/brighterscript": {
|
||||
"version": "0.65.14",
|
||||
"resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.65.14.tgz",
|
||||
"integrity": "sha512-DVbFFp/ESu3Ow1LNsELTrmf4S/8bmXUTP9Z3R3VW21WRed392pur9ZU+tiz8w0Z0BaKjPOi+JD13P+PWkEq8zw==",
|
||||
"version": "0.65.15",
|
||||
"resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.65.15.tgz",
|
||||
"integrity": "sha512-WDnHaeCQclDG8wic1SCLYavnZDSjjzHcWxo+efwYkvyTjZivPoGWXbEulsYM3Nm9VawPuWWwzVqzHiN0Y4RvxQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@rokucommunity/bslib": "^0.1.1",
|
||||
|
||||
+3
-3
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "playlet",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.1",
|
||||
"description": "Unofficial Youtube client for Roku",
|
||||
"devDependencies": {
|
||||
"@rokucommunity/bslint": "^0.8.13",
|
||||
"@types/crypto-js": "^4.2.1",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/node": "^20.10.5",
|
||||
"@types/node": "^20.10.6",
|
||||
"@types/xml2js": "^0.4.14",
|
||||
"argparse": "^2.0.1",
|
||||
"brighterscript": "0.65.14",
|
||||
"brighterscript": "0.65.15",
|
||||
"brighterscript-formatter": "^1.6.36",
|
||||
"convert-svg-to-png": "^0.6.4",
|
||||
"cross-fetch": "^4.0.0",
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "playlet-app",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet-app",
|
||||
"version": "0.18.0"
|
||||
"version": "0.18.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet-app",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.1",
|
||||
"description": "Unofficial Youtube client for Roku",
|
||||
"scripts": {
|
||||
"prebuild": "rm -rf build/playlet-app",
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import "LoadingMessages.bs"
|
||||
|
||||
' TODO:P2 Add a "logQueue" field to the scene, and push it to the logger later when playlet-lib is loaded
|
||||
' Alternatively, just log to the console and the known log file in cachefs
|
||||
' TODO:P2 log the playlet-lib load status and load speed to the log queue
|
||||
function Init() as void
|
||||
m.scene = m.top.getScene()
|
||||
m.top.backgroundColor = "#242424FF"
|
||||
|
||||
@@ -3,7 +3,7 @@ title=Playlet
|
||||
# Do not update version manually, it is auto updated from package.json
|
||||
major_version=0
|
||||
minor_version=18
|
||||
build_version=00000
|
||||
build_version=00001
|
||||
|
||||
ui_resolutions=hd
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
' Playlet (App to play videos from an Invidious server on Roku TVs)
|
||||
' Copyright (C) 2023 Brahim Hadriche
|
||||
' Copyright (C) 2024 Brahim Hadriche
|
||||
|
||||
' This program is free software: you can redistribute it and/or modify
|
||||
' it under the terms of the GNU Affero General Public License as published by
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "playlet-lib",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet-lib",
|
||||
"version": "0.18.0"
|
||||
"version": "0.18.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet-lib",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.1",
|
||||
"description": "Unofficial Youtube client for Roku",
|
||||
"scripts": {
|
||||
"prebuild": "rm -rf build/playlet-lib",
|
||||
|
||||
@@ -185,9 +185,6 @@ function InitializeTabs()
|
||||
playlists: function(authorId as string, author as string) as object
|
||||
return CreateChannelFeed("Playlists", "channel_playlists", authorId, author)
|
||||
end function
|
||||
channels: function(authorId as string, author as string) as object
|
||||
return CreateChannelFeed("Channels", "channel_channels", authorId, author)
|
||||
end function
|
||||
}
|
||||
end function
|
||||
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
m.titleLabel = m.top.FindNode("titleLabel")
|
||||
m.authorLabel = m.top.FindNode("authorLabel")
|
||||
m.updatedLabel = m.top.FindNode("updatedLabel")
|
||||
m.videoCountRect = m.top.FindNode("videoCountRect")
|
||||
m.videoCountLabel = m.top.FindNode("videoCountLabel")
|
||||
m.thumbnail = m.top.FindNode("thumbnail")
|
||||
m.thumbnail.failedBitmapUri = "pkg:/images/thumbnail-missing.jpg"
|
||||
end function
|
||||
|
||||
function OnContentSet() as void
|
||||
@@ -17,23 +12,28 @@ function OnContentSet() as void
|
||||
return
|
||||
end if
|
||||
|
||||
m.titleLabel.text = content.title
|
||||
m.top.title = content.title
|
||||
' NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation.
|
||||
m.authorLabel.text = content._author
|
||||
m.updatedLabel.text = content.updatedText
|
||||
m.top.author = content._author
|
||||
m.top.updated = content.updatedText
|
||||
|
||||
m.thumbnail.uri = content.thumbnail
|
||||
m.top.thumbnailUri = content.thumbnail
|
||||
|
||||
SetVideoCount(content.videoCountText)
|
||||
end function
|
||||
|
||||
function SetVideoCount(videoCountText as string)
|
||||
function SetVideoCount(videoCountText as string) as void
|
||||
m.top.videoCount = videoCountText
|
||||
|
||||
label = m.videoCountLabel
|
||||
rect = m.videoCountRect
|
||||
|
||||
if label = invalid or rect = invalid
|
||||
return
|
||||
end if
|
||||
|
||||
rectParent = rect.getParent()
|
||||
|
||||
label.text = videoCountText
|
||||
size = label.localBoundingRect()
|
||||
|
||||
rect.width = size.width + 16
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
<interface>
|
||||
<field id="itemContent" type="node" onChange="OnContentSet" />
|
||||
<field id="type" type="string" value="playlist" />
|
||||
<field id="title" type="string" alias="titleLabel.text" />
|
||||
<field id="author" type="string" alias="authorLabel.text" />
|
||||
<field id="updated" type="string" alias="updatedLabel.text" />
|
||||
<field id="thumbnailUri" type="uri" alias="thumbnail.uri" />
|
||||
<field id="videoCount" type="string" alias="videoCountLabel.text" />
|
||||
</interface>
|
||||
<children>
|
||||
<LayoutGroup
|
||||
@@ -10,7 +15,8 @@
|
||||
id="thumbnail"
|
||||
loadDisplayMode="scaleToZoom"
|
||||
width="350"
|
||||
height="196">
|
||||
height="196"
|
||||
failedBitmapUri="pkg:/images/thumbnail-missing.jpg">
|
||||
<Rectangle
|
||||
id="videoCountRect"
|
||||
width="60"
|
||||
|
||||
@@ -3,19 +3,8 @@ import "pkg:/source/utils/TimeUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
FindChildren()
|
||||
end function
|
||||
|
||||
function FindChildren()
|
||||
' TODO:P2 use component properties with alias instead of FindNode
|
||||
m.titleLabel = m.top.FindNode("titleLabel")
|
||||
m.authorLabel = m.top.FindNode("authorLabel")
|
||||
m.viewCountDateLabel = m.top.FindNode("viewCountDateLabel")
|
||||
m.liveRect = m.top.FindNode("liveRect")
|
||||
m.upcomingRect = m.top.FindNode("upcomingRect")
|
||||
m.durationRect = m.top.FindNode("durationRect")
|
||||
m.durationLabel = m.top.FindNode("durationLabel")
|
||||
m.thumbnail = m.top.FindNode("thumbnail")
|
||||
end function
|
||||
|
||||
function OnContentSet() as void
|
||||
@@ -25,50 +14,51 @@ function OnContentSet() as void
|
||||
return
|
||||
end if
|
||||
|
||||
if m.titleLabel = invalid
|
||||
FindChildren()
|
||||
end if
|
||||
|
||||
m.titleLabel.text = content.title
|
||||
m.authorLabel.text = content.author
|
||||
m.top.title = content.title
|
||||
m.top.author = content.author
|
||||
|
||||
if content.isUpcoming = true
|
||||
m.viewCountDateLabel.text = content.premiereTimestampText
|
||||
m.top.viewCountDate = content.premiereTimestampText
|
||||
else if not StringUtils.IsNullOrEmpty(content.publishedText)
|
||||
label = content.publishedText
|
||||
if not StringUtils.IsNullOrEmpty(content.viewCountText)
|
||||
label = `${label} • ${content.viewCountText}`
|
||||
end if
|
||||
m.viewCountDateLabel.text = label
|
||||
m.top.viewCountDate = label
|
||||
else
|
||||
m.viewCountDateLabel.text = ""
|
||||
m.top.viewCountDate = ""
|
||||
end if
|
||||
|
||||
m.thumbnail.uri = content.thumbnail
|
||||
m.top.thumbnailUri = content.thumbnail
|
||||
|
||||
m.durationRect.visible = false
|
||||
m.upcomingRect.visible = false
|
||||
m.liveRect.visible = false
|
||||
m.top.durationRectVisible = false
|
||||
m.top.upcomingRectVisible = false
|
||||
m.top.liveRectVisible = false
|
||||
|
||||
if ValidInt(content.lengthSeconds) <> 0
|
||||
SetDurationText(content.lengthText)
|
||||
m.durationRect.visible = true
|
||||
m.top.durationRectVisible = true
|
||||
else
|
||||
if content.isUpcoming = true
|
||||
m.upcomingRect.visible = true
|
||||
m.top.upcomingRectVisible = true
|
||||
else if content.liveNow
|
||||
m.liveRect.visible = true
|
||||
m.top.liveRectVisible = true
|
||||
end if
|
||||
end if
|
||||
end function
|
||||
|
||||
function SetDurationText(text as string)
|
||||
function SetDurationText(text as string) as void
|
||||
m.top.duration = text
|
||||
|
||||
label = m.durationLabel
|
||||
rect = m.durationRect
|
||||
|
||||
if label = invalid or rect = invalid
|
||||
return
|
||||
end if
|
||||
|
||||
rectParent = rect.getParent()
|
||||
|
||||
label.text = text
|
||||
size = label.localBoundingRect()
|
||||
|
||||
rect.width = size.width + 16
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
<interface>
|
||||
<field id="itemContent" type="node" onChange="OnContentSet" />
|
||||
<field id="type" type="string" value="video" />
|
||||
<field id="title" type="string" alias="titleLabel.text" />
|
||||
<field id="author" type="string" alias="authorLabel.text" />
|
||||
<field id="viewCountDate" type="string" alias="viewCountDateLabel.text" />
|
||||
<field id="liveRectVisible" type="boolean" alias="liveRect.visible" />
|
||||
<field id="upcomingRectVisible" type="boolean" alias="upcomingRect.visible" />
|
||||
<field id="durationRectVisible" type="boolean" alias="durationRect.visible" />
|
||||
<field id="duration" type="string" alias="durationLabel.text" />
|
||||
<field id="thumbnailUri" type="string" alias="thumbnail.uri" />
|
||||
</interface>
|
||||
<children>
|
||||
<LayoutGroup
|
||||
|
||||
@@ -123,16 +123,21 @@ function OnRowItemLongPressed(index as object) as void
|
||||
return
|
||||
end if
|
||||
|
||||
if not IsArray(index) or index.count() <> 2
|
||||
LogWarn("Invalid index:", index)
|
||||
return
|
||||
end if
|
||||
|
||||
rowIndex = index[0]
|
||||
rowItemIndex = index[1]
|
||||
|
||||
if rowIndex < 0 or rowIndex >= content.GetChildCount()
|
||||
if not IsInt(rowIndex) or rowIndex < 0 or rowIndex >= content.GetChildCount()
|
||||
LogWarn("Invalid row index:", rowIndex)
|
||||
return
|
||||
end if
|
||||
row = content.GetChild(rowIndex)
|
||||
|
||||
if rowItemIndex < 0 or rowItemIndex >= row.GetChildCount()
|
||||
if not IsInt(rowItemIndex) or rowItemIndex < 0 or rowItemIndex >= row.GetChildCount()
|
||||
LogWarn("Invalid row item index:", rowItemIndex)
|
||||
return
|
||||
end if
|
||||
|
||||
@@ -164,6 +164,7 @@ function SetCaptions(metadata as object, service as object, contentNode as objec
|
||||
if metadata.captions.Count() = 0
|
||||
return
|
||||
end if
|
||||
|
||||
' TODO:P2 we don't need to read and parse this every time
|
||||
isoLanguageList = ParseJson(ReadAsciiFile("libpkg:/config/ISO-639-1-to-ISO-639-2T.json5"))
|
||||
instance = service.GetInstance()
|
||||
@@ -171,9 +172,25 @@ function SetCaptions(metadata as object, service as object, contentNode as objec
|
||||
subtitleTracks = []
|
||||
|
||||
for each caption in metadata.captions
|
||||
code = caption.language_code
|
||||
if StringUtils.IsNullOrEmpty(code)
|
||||
continue for
|
||||
end if
|
||||
|
||||
if code.InStr("-") <> -1
|
||||
code = code.Split("-")[0]
|
||||
end if
|
||||
|
||||
if code.len() = 2
|
||||
if not isoLanguageList.DoesExist(code)
|
||||
continue for
|
||||
end if
|
||||
code = isoLanguageList[code]
|
||||
end if
|
||||
|
||||
subtitleTracks.Push({
|
||||
Description: caption.label
|
||||
Language: isoLanguageList[caption.language_code] ?? caption.language_code
|
||||
Language: code
|
||||
TrackName: instance + caption.url
|
||||
})
|
||||
end for
|
||||
|
||||
@@ -15,12 +15,22 @@ function Init()
|
||||
|
||||
' videoPlayingSuccess indicates if we started playing a video successfully
|
||||
' We use it to detect if we should try another link for a video, or if another error
|
||||
' occurred (such as a next work error)
|
||||
' occurred (such as a network error)
|
||||
m.videoPlayingSuccess = false
|
||||
' ignoreNextFinishedState indicates if we should ignore the next finished state
|
||||
' This is used to prevent the video from playing the next video when we are
|
||||
' still trying to find a working stream url
|
||||
m.ignoreNextFinishedState = false
|
||||
|
||||
' asyncStopSemantics available since Roku OS 12.5
|
||||
' It is set to true because stopping synchronously causes timeout and crash
|
||||
' Usually we would need to wait for the video state to move to "stopping" then to "stopped"
|
||||
' before considering the video node closed, and creating a new one.
|
||||
' However, since we have a task to load video details, there should be enough time for the
|
||||
' video node to close before we create a new one.
|
||||
if m.top.hasField("asyncStopSemantics")
|
||||
m.top.asyncStopSemantics = true
|
||||
end if
|
||||
end function
|
||||
|
||||
function OnNodeReady()
|
||||
@@ -35,7 +45,6 @@ function OnNodeReady()
|
||||
|
||||
m.container.observeFieldScoped("fullscreen", FuncName(OnFullScreenChange))
|
||||
m.top.ObserveField("state", FuncName(OnVideoPlayerStateChange))
|
||||
m.top.observeField("control", FuncName(OnControlChange))
|
||||
|
||||
SponsorBlock.SetupSponsorBlock()
|
||||
end function
|
||||
@@ -117,6 +126,15 @@ function MarkVideoWatched(videoId as string)
|
||||
end function
|
||||
|
||||
function Close(_unused as dynamic)
|
||||
if m.videoContentTask <> invalid
|
||||
m.videoContentTask.cancel = true
|
||||
m.videoContentTask = invalid
|
||||
end if
|
||||
if m.sponsorBlockTask <> invalid
|
||||
m.sponsorBlockTask.cancel = true
|
||||
m.sponsorBlockTask = invalid
|
||||
end if
|
||||
|
||||
m.top.control = "stop"
|
||||
m.top.content = invalid
|
||||
parent = m.top.getParent()
|
||||
@@ -126,19 +144,6 @@ function Close(_unused as dynamic)
|
||||
SponsorBlock.RemoveNotifcation(m.notifications)
|
||||
end function
|
||||
|
||||
function OnControlChange()
|
||||
if m.top.control = "stop"
|
||||
if m.videoContentTask <> invalid
|
||||
m.videoContentTask.cancel = true
|
||||
m.videoContentTask = invalid
|
||||
end if
|
||||
if m.sponsorBlockTask <> invalid
|
||||
m.sponsorBlockTask.cancel = true
|
||||
m.sponsorBlockTask = invalid
|
||||
end if
|
||||
end if
|
||||
end function
|
||||
|
||||
function OnVideoPlayerStateChange() as void
|
||||
state = m.top.state
|
||||
content = m.top.content
|
||||
|
||||
@@ -1,186 +1,64 @@
|
||||
// Language codes from ISO 639-1 to ISO 639-2T.
|
||||
// Only includes a subset of the supported languages, as indicated
|
||||
// in https://www.ccfonts.com/cinecav-styles/
|
||||
// Languages covered
|
||||
// Albanian, Avar, Basque, Basque, Belarusian, Bosnian, Breton, Bulgarian, Buryat,
|
||||
// Catalan, Chamorro, Chichewa, Croatian, Cyrillic, Czech, Danish, Dutch, English,
|
||||
// Estonian, Faroese, Finnish, French, Frisian, Galician, German, Greek, Hungarian,
|
||||
// Icelandic, Irish, Italian, Kalmyk, Kurdish, Kyrgyz, Latvian, Lithuanian, Macedonian,
|
||||
// Malagasy, Maltese, Montenegrin, Norwegian, Ossetian, Polish, Portuguese, Romani,
|
||||
// Romanian, Russian, Serbian, Slovak, Slovenian, Spanish, Tajik, Tatar, Turkish,
|
||||
// Ukrainian & Welsh.
|
||||
// Some of the languages don't seem to have a 2 letter code, so they are not on the list.
|
||||
{
|
||||
aa: "aar",
|
||||
ab: "abk",
|
||||
af: "afr",
|
||||
ak: "aka",
|
||||
sq: "alb",
|
||||
am: "amh",
|
||||
ar: "ara",
|
||||
an: "arg",
|
||||
hy: "hye",
|
||||
as: "asm",
|
||||
av: "ava",
|
||||
ae: "ave",
|
||||
ay: "aym",
|
||||
az: "aze",
|
||||
ba: "bak",
|
||||
bm: "bam",
|
||||
eu: "eus",
|
||||
be: "bel",
|
||||
bn: "ben",
|
||||
bh: "bih",
|
||||
bi: "bis",
|
||||
bo: "tib",
|
||||
bs: "bos",
|
||||
br: "bre",
|
||||
bg: "bul",
|
||||
my: "mya",
|
||||
ca: "cat",
|
||||
cs: "cze",
|
||||
ch: "cha",
|
||||
ce: "che",
|
||||
zh: "zho",
|
||||
cu: "chu",
|
||||
cv: "chv",
|
||||
kw: "cor",
|
||||
co: "cos",
|
||||
cr: "cre",
|
||||
cy: "wel",
|
||||
da: "dan",
|
||||
de: "ger",
|
||||
dv: "div",
|
||||
nl: "dut",
|
||||
dz: "dzo",
|
||||
el: "gre",
|
||||
en: "eng",
|
||||
eo: "epo",
|
||||
et: "est",
|
||||
ee: "ewe",
|
||||
fo: "fao",
|
||||
fa: "per",
|
||||
fj: "fij",
|
||||
fi: "fin",
|
||||
fr: "fra",
|
||||
fy: "fry",
|
||||
ff: "ful",
|
||||
ka: "geo",
|
||||
gd: "gla",
|
||||
ga: "gle",
|
||||
gl: "glg",
|
||||
gv: "glv",
|
||||
gn: "grn",
|
||||
gu: "guj",
|
||||
ht: "hat",
|
||||
ha: "hau",
|
||||
he: "heb",
|
||||
hz: "her",
|
||||
hi: "hin",
|
||||
ho: "hmo",
|
||||
hr: "hrv",
|
||||
hu: "hun",
|
||||
ig: "ibo",
|
||||
is: "ice",
|
||||
io: "ido",
|
||||
ii: "iii",
|
||||
iu: "iku",
|
||||
ie: "ile",
|
||||
ia: "ina",
|
||||
id: "ind",
|
||||
ik: "ipk",
|
||||
it: "ita",
|
||||
jv: "jav",
|
||||
ja: "jpn",
|
||||
kl: "kal",
|
||||
kn: "kan",
|
||||
ks: "kas",
|
||||
kr: "kau",
|
||||
kk: "kaz",
|
||||
km: "khm",
|
||||
ki: "kik",
|
||||
rw: "kin",
|
||||
ky: "kir",
|
||||
kv: "kom",
|
||||
kg: "kon",
|
||||
ko: "kor",
|
||||
kj: "kua",
|
||||
ku: "kur",
|
||||
lo: "lao",
|
||||
la: "lat",
|
||||
lv: "lav",
|
||||
li: "lim",
|
||||
ln: "lin",
|
||||
lt: "lit",
|
||||
lb: "ltz",
|
||||
lu: "lub",
|
||||
lg: "lug",
|
||||
mk: "mkd",
|
||||
mh: "mah",
|
||||
ml: "mal",
|
||||
mi: "mri",
|
||||
mr: "mar",
|
||||
ms: "may",
|
||||
mg: "mlg",
|
||||
mt: "mlt",
|
||||
mn: "mon",
|
||||
na: "nau",
|
||||
nv: "nav",
|
||||
nr: "nbl",
|
||||
nd: "nde",
|
||||
ng: "ndo",
|
||||
ne: "nep",
|
||||
nn: "nno",
|
||||
nb: "nob",
|
||||
no: "nor",
|
||||
ny: "nya",
|
||||
oc: "oci",
|
||||
oj: "oji",
|
||||
or: "ori",
|
||||
om: "orm",
|
||||
os: "oss",
|
||||
pa: "pan",
|
||||
pi: "pli",
|
||||
pl: "pol",
|
||||
pt: "por",
|
||||
ps: "pus",
|
||||
qu: "que",
|
||||
rm: "roh",
|
||||
ro: "ron",
|
||||
rn: "run",
|
||||
ru: "rus",
|
||||
sg: "sag",
|
||||
sa: "san",
|
||||
si: "sin",
|
||||
sk: "slk",
|
||||
sl: "slv",
|
||||
se: "sme",
|
||||
sm: "smo",
|
||||
sn: "sna",
|
||||
sd: "snd",
|
||||
so: "som",
|
||||
st: "sot",
|
||||
es: "spa",
|
||||
sc: "srd",
|
||||
sr: "srp",
|
||||
ss: "ssw",
|
||||
su: "sun",
|
||||
sw: "swa",
|
||||
sv: "swe",
|
||||
ty: "tah",
|
||||
ta: "tam",
|
||||
tt: "tat",
|
||||
te: "tel",
|
||||
tg: "tgk",
|
||||
tl: "tgl",
|
||||
th: "tha",
|
||||
ti: "tir",
|
||||
to: "ton",
|
||||
tn: "tsn",
|
||||
ts: "tso",
|
||||
tk: "tuk",
|
||||
tr: "tur",
|
||||
tw: "twi",
|
||||
ug: "uig",
|
||||
uk: "ukr",
|
||||
ur: "urd",
|
||||
uz: "uzb",
|
||||
ve: "ven",
|
||||
vi: "vie",
|
||||
vo: "vol",
|
||||
wa: "wln",
|
||||
wo: "wol",
|
||||
xh: "xho",
|
||||
yi: "yid",
|
||||
yo: "yor",
|
||||
za: "zha",
|
||||
zu: "zul",
|
||||
sq: "sqi", // Albanian
|
||||
av: "ava", // Avar
|
||||
eu: "eus", // Basque
|
||||
be: "bel", // Belarusian
|
||||
bs: "bos", // Bosnian
|
||||
br: "bre", // Breton
|
||||
bg: "bul", // Bulgarian
|
||||
ca: "cat", // Catalan
|
||||
ch: "cha", // Chamorro
|
||||
ny: "nya", // Chichewa
|
||||
hr: "hrv", // Croatian
|
||||
cu: "chu", // Cyrillic
|
||||
cs: "ces", // Czech
|
||||
da: "dan", // Danish
|
||||
nl: "nld", // Dutch
|
||||
en: "eng", // English
|
||||
et: "est", // Estonian
|
||||
fo: "fao", // Faroese
|
||||
fi: "fin", // Finnish
|
||||
fr: "fra", // French
|
||||
fy: "fry", // Frisian
|
||||
gl: "glg", // Galician
|
||||
de: "deu", // German
|
||||
el: "ell", // Greek
|
||||
hu: "hun", // Hungarian
|
||||
is: "isl", // Icelandic
|
||||
ga: "gle", // Irish
|
||||
it: "ita", // Italian
|
||||
ku: "kur", // Kurdish
|
||||
ky: "kir", // Kyrgyz
|
||||
lv: "lav", // Latvian
|
||||
lt: "lit", // Lithuanian
|
||||
mk: "mkd", // Macedonian
|
||||
mg: "mlg", // Malagasy
|
||||
mt: "mlt", // Maltese
|
||||
no: "nor", // Norwegian
|
||||
os: "oss", // Ossetian
|
||||
pl: "pol", // Polish
|
||||
pt: "por", // Portuguese
|
||||
ro: "ron", // Romanian
|
||||
ru: "rus", // Russian
|
||||
sr: "srp", // Serbian
|
||||
sk: "slk", // Slovak
|
||||
sl: "slv", // Slovenian
|
||||
es: "spa", // Spanish
|
||||
tg: "tgk", // Tajik
|
||||
tt: "tat", // Tatar
|
||||
tr: "tur", // Turkish
|
||||
uk: "ukr", // Ukrainian
|
||||
cy: "cym", // Welsh
|
||||
}
|
||||
@@ -46,26 +46,6 @@
|
||||
apiType: Invidious
|
||||
endpoint: popular
|
||||
|
||||
- title: Funny
|
||||
feedSources:
|
||||
- id: inv_search_funny
|
||||
title: Search - Funny
|
||||
apiType: Invidious
|
||||
endpoint: search
|
||||
queryParams:
|
||||
q: Funny
|
||||
sort_by: upload_date
|
||||
|
||||
- title: News
|
||||
feedSources:
|
||||
- id: inv_search_news
|
||||
title: Search - News
|
||||
apiType: Invidious
|
||||
endpoint: search
|
||||
queryParams:
|
||||
q: News
|
||||
sort_by: upload_date
|
||||
|
||||
- title: Playlists
|
||||
feedSources:
|
||||
- id: inv_auth_playlists
|
||||
|
||||
@@ -194,15 +194,6 @@ channel_podcasts:
|
||||
paginationType: Continuation
|
||||
tryCount: 3
|
||||
|
||||
# TODO:P1 related channels are no longer working
|
||||
# https://github.com/iv-org/invidious/issues/4275
|
||||
channel_channels:
|
||||
title: Related channels
|
||||
url: /api/v1/channels/{ucid}/channels
|
||||
responseHandler: ChannelRelatedChannelsHandler
|
||||
paginationType: Continuation
|
||||
tryCount: 3
|
||||
|
||||
watch_history:
|
||||
title: Watch history
|
||||
url: /api/v1/auth/history
|
||||
|
||||
@@ -3,7 +3,7 @@ title=PlayletLib
|
||||
# Do not update version manually, it is auto updated from package.json
|
||||
major_version=0
|
||||
minor_version=18
|
||||
build_version=00000
|
||||
build_version=00001
|
||||
|
||||
ui_resolutions=hd
|
||||
|
||||
|
||||
Generated
+10
-10
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"name": "playlet-web",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet-web",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.1",
|
||||
"devDependencies": {
|
||||
"@sveltejs/vite-plugin-svelte": "^3.0.1",
|
||||
"@tailwindcss/typography": "^0.5.10",
|
||||
"@tsconfig/svelte": "^5.0.2",
|
||||
"@vitejs/plugin-legacy": "^5.2.0",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"daisyui": "^4.4.23",
|
||||
"daisyui": "^4.4.24",
|
||||
"dotenv": "^16.3.1",
|
||||
"ip": "^1.1.8",
|
||||
"postcss": "^8.4.32",
|
||||
@@ -25,7 +25,7 @@
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^5.0.10",
|
||||
"vite-tsconfig-paths": "^4.2.2"
|
||||
"vite-tsconfig-paths": "^4.2.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@alloc/quick-lru": {
|
||||
@@ -2925,9 +2925,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/daisyui": {
|
||||
"version": "4.4.23",
|
||||
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-4.4.23.tgz",
|
||||
"integrity": "sha512-IFQRGoGoAke8chxPcDqQJFldVVd51JL7b4mRA3LqsLexW/6xicZzz9X3GXdGdnYsu8QPxZN4uzQZ5fwRNYXOSg==",
|
||||
"version": "4.4.24",
|
||||
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-4.4.24.tgz",
|
||||
"integrity": "sha512-u/B3484J08V7N0rIYymnC+SyxOjlYQL+2vyhHWV+/KC+VaUcbEF2Z3H06eCPgdTiZ0J+ml44aH7wBhIymPFQ+g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"css-selector-tokenizer": "^0.8",
|
||||
@@ -4632,9 +4632,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vite-tsconfig-paths": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.2.2.tgz",
|
||||
"integrity": "sha512-dq0FjyxHHDnp0uS3P12WEOX2W7NeuLzX9AWP38D7Zw2CTbFErapwQVlCiT5DMJcVWKQ1MMdTe92PZl/rBQ7qcw==",
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.2.3.tgz",
|
||||
"integrity": "sha512-xVsA2xe6QSlzBujtWF8q2NYexh7PAUYfzJ4C8Axpe/7d2pcERYxuxGgph9F4f0iQO36g5tyGq6eBUYIssdUrVw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"debug": "^4.1.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet-web",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -14,7 +14,7 @@
|
||||
"@tsconfig/svelte": "^5.0.2",
|
||||
"@vitejs/plugin-legacy": "^5.2.0",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"daisyui": "^4.4.23",
|
||||
"daisyui": "^4.4.24",
|
||||
"dotenv": "^16.3.1",
|
||||
"ip": "^1.1.8",
|
||||
"postcss": "^8.4.32",
|
||||
@@ -26,6 +26,6 @@
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^5.0.10",
|
||||
"vite-tsconfig-paths": "^4.2.2"
|
||||
"vite-tsconfig-paths": "^4.2.3"
|
||||
}
|
||||
}
|
||||
@@ -119,10 +119,6 @@ export class PlayletApi {
|
||||
return await response.json();
|
||||
}
|
||||
|
||||
static async updateInstance(instance) {
|
||||
return await PlayletApi.putJson(`${PlayletApi.host()}/api/preferences`, { "invidious.instance": instance });
|
||||
}
|
||||
|
||||
static async setPlayletLibVersion(tag) {
|
||||
if (tag !== "") {
|
||||
const urls = [{
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
<div class="h-6">
|
||||
<SearchIcon />
|
||||
</div>
|
||||
<span class="text-xs">Search</span>
|
||||
</button>
|
||||
<button
|
||||
on:click={() => setScreen("home")}
|
||||
@@ -39,6 +40,7 @@
|
||||
<div class="h-6">
|
||||
<HomeIcon />
|
||||
</div>
|
||||
<span class="text-xs">Home</span>
|
||||
</button>
|
||||
<button
|
||||
on:click={() => setScreen("bookmarks")}
|
||||
@@ -47,6 +49,7 @@
|
||||
<div class="h-6">
|
||||
<BookmarksIcon />
|
||||
</div>
|
||||
<span class="text-xs">Bookmarks</span>
|
||||
</button>
|
||||
<button
|
||||
on:click={() => setScreen("settings")}
|
||||
@@ -55,6 +58,7 @@
|
||||
<div class="h-6">
|
||||
<SettingsIcon />
|
||||
</div>
|
||||
<span class="text-xs">Settings</span>
|
||||
</button>
|
||||
<button
|
||||
on:click={() => setScreen("remote")}
|
||||
@@ -63,6 +67,7 @@
|
||||
<div class="h-6">
|
||||
<RemoteIcon />
|
||||
</div>
|
||||
<span class="text-xs">Remote</span>
|
||||
</button>
|
||||
<button
|
||||
on:click={() => setScreen("info")}
|
||||
@@ -71,5 +76,6 @@
|
||||
<div class="h-6">
|
||||
<InfoIcon />
|
||||
</div>
|
||||
<span class="text-xs">Info</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -9,6 +9,7 @@
|
||||
export let playlistThumbnail: string | undefined = undefined;
|
||||
export let videoCount: number | undefined = undefined;
|
||||
export let videos: any[] | undefined = undefined;
|
||||
export let updated: number | undefined = undefined;
|
||||
|
||||
// svelte-ignore unused-export-let
|
||||
export let type: string = undefined;
|
||||
@@ -19,6 +20,46 @@
|
||||
playletStateStore.subscribe((value) => {
|
||||
invidiousInstance = value?.invidious?.current_instance;
|
||||
});
|
||||
|
||||
function GetUpdatedText(updated) {
|
||||
if (typeof updated !== "number") {
|
||||
return "";
|
||||
}
|
||||
|
||||
const span = Math.floor(Date.now() / 1000) - updated;
|
||||
if (span < 1) {
|
||||
return "";
|
||||
}
|
||||
|
||||
let count = "";
|
||||
const totalDays = Math.floor(span / 86400);
|
||||
if (totalDays > 365) {
|
||||
const years = Math.floor(totalDays / 365);
|
||||
count = years > 1 ? `${years} years` : "1 year";
|
||||
} else if (totalDays > 30) {
|
||||
const months = Math.floor(totalDays / 30);
|
||||
count = months > 1 ? `${months} months` : "1 month";
|
||||
} else if (totalDays > 7) {
|
||||
const weeks = Math.floor(totalDays / 7);
|
||||
count = weeks > 1 ? `${weeks} weeks` : "1 week";
|
||||
} else if (totalDays > 1) {
|
||||
count = `${totalDays} days`;
|
||||
} else if (span > 3600) {
|
||||
const hours = Math.floor(span / 3600);
|
||||
count = hours > 1 ? `${hours} hours` : "1 hour";
|
||||
} else if (span > 60) {
|
||||
const minutes = Math.floor(span / 60);
|
||||
count = minutes > 1 ? `${minutes} minutes` : "1 minute";
|
||||
} else {
|
||||
count = span > 1 ? `${span} seconds` : "1 second";
|
||||
}
|
||||
|
||||
if (count === "") {
|
||||
return "";
|
||||
}
|
||||
|
||||
return `Updated ${count} ago`;
|
||||
}
|
||||
</script>
|
||||
|
||||
<button class="w-80 p-2" on:click={modal.show()}>
|
||||
@@ -33,6 +74,7 @@
|
||||
<div class="card-body">
|
||||
<h3 class="card-title text-base line-clamp-2 min-h-12">{title}</h3>
|
||||
<div class="font-semibold">{author}</div>
|
||||
<div>{GetUpdatedText(updated)}</div>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
@@ -78,7 +78,7 @@ export class BindingsPlugin implements CompilerPlugin {
|
||||
|
||||
const program = event.program;
|
||||
const scope = program.getFirstScopeForFile(event.file);
|
||||
if (!isXmlScope(scope)) {
|
||||
if (!scope || !isXmlScope(scope)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user