diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2797a7ed..b6b04233 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
-- Nothing worth mentioning yet.
+### Removed
+
+- Trending endpoints from code base
## [0.44.3] - 2025-11-14
diff --git a/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTestingJob.bs b/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTestingJob.bs
index c9540e8b..79227f72 100644
--- a/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTestingJob.bs
+++ b/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTestingJob.bs
@@ -324,7 +324,7 @@ end function
function CanFetchWithCors(instance as string, testNode as object, cancellation as object) as void
try
- url = `${instance}/api/v1/trending`
+ url = `${instance}/api/v1/popular`
response = HttpClient.Get(url).NoCache().Cancellation(cancellation).Await()
if not response.IsSuccess()
diff --git a/playlet-lib/src/components/Services/Innertube/InnertubeService.bs b/playlet-lib/src/components/Services/Innertube/InnertubeService.bs
index fa7e49e4..8bd5cde4 100644
--- a/playlet-lib/src/components/Services/Innertube/InnertubeService.bs
+++ b/playlet-lib/src/components/Services/Innertube/InnertubeService.bs
@@ -267,63 +267,6 @@ namespace InnertubeService
return Innertube.Search(query, options)
end function
- function GetTrending(options = invalid as object) as object
- cancellation = OptionUtils.Get(options, "cancellation")
- trendingType = LCase(OptionUtils.GetOrDefault(options, "type", ""))
- disableShorts = OptionUtils.GetOrDefault(options, "disableShorts", false)
- raw = OptionUtils.GetOrDefault(options, "raw", false)
- browseId = "FEtrending"
-
- params = ""
- if trendingType = "music"
- ' {"44:proto": {"3:string": "ytma_charts"}}
- params = "4gINGgt5dG1hX2NoYXJ0cw%3D%3D"
- else if trendingType = "gaming"
- ' {"44:proto": {"3:string": "gaming_corpus_most_popular"}}
- params = "4gIcGhpnYW1pbmdfY29ycHVzX21vc3RfcG9wdWxhcg%3D%3D"
- else if trendingType = "movies"
- ' {"44:proto": {"3:string": "trailers"}}
- params = "4gIKGgh0cmFpbGVycw%3D%3D"
- end if
-
- request = Innertube.CreateBrowseRequest(browseId, Innertube.ClientType.WEB, { params: params })
- request.Cancellation(cancellation)
-
- if raw
- request.LogCurlCommand(true)
- request.NoCache()
- end if
-
- response = request.Await()
- if not response.IsSuccess()
- return {
- error: response.ErrorMessage()
- }
- end if
-
- if raw
- return response.Json()
- end if
-
- feeds = Innertube.ParseResponseDataForFeeds(response.Json(), {
- response: response
- disableCreatorOnTheRise: true
- disableShorts: disableShorts
- browseId: browseId
- })
-
- result = {
- feeds: feeds
- }
-
- cacheControl = Innertube.ParseResponseForCacheControl(response)
- if cacheControl <> invalid
- result["cache-control"] = cacheControl
- end if
-
- return result
- end function
-
function GetHome(options = invalid as object) as object
return GetBrowseAuthenticatedPage("FEwhat_to_watch", options)
end function
diff --git a/playlet-lib/src/components/Services/Preferences/Preferences.bs b/playlet-lib/src/components/Services/Preferences/Preferences.bs
index 5214ca50..5306cb11 100644
--- a/playlet-lib/src/components/Services/Preferences/Preferences.bs
+++ b/playlet-lib/src/components/Services/Preferences/Preferences.bs
@@ -162,6 +162,20 @@ function MigrateExistingPreferences(userPrefs as object) as boolean
isDirty = true
end if
+ if userPrefs.__version = 5
+ filteredLayout = []
+ homeScreenLayout = ValidArray(userPrefs["misc.home_screen_layout"])
+ for each item in homeScreenLayout
+ if item.id = "trending" or item.id = "trending_music" or item.id = "trending_gaming" or item.id = "trending_movies"
+ continue for
+ end if
+ filteredLayout.Push(item)
+ end for
+ userPrefs["misc.home_screen_layout"] = filteredLayout
+ userPrefs.__version = 6
+ isDirty = true
+ end if
+
' TODO:P2 handle case where saved preferences version is higher than current version (e.g. user downgraded)
#if DEBUG
diff --git a/playlet-lib/src/components/Services/Preferences/Preferences.xml b/playlet-lib/src/components/Services/Preferences/Preferences.xml
index c7decefe..44ccfc12 100644
--- a/playlet-lib/src/components/Services/Preferences/Preferences.xml
+++ b/playlet-lib/src/components/Services/Preferences/Preferences.xml
@@ -5,7 +5,7 @@
user prefs saved need to be migrated. If the version is less than the
current version, a migration is needed.
-->
-
+
diff --git a/playlet-lib/src/components/VideoFeed/VideoRowListRowContentJob.bs b/playlet-lib/src/components/VideoFeed/VideoRowListRowContentJob.bs
index 70db3084..fc46bf3d 100644
--- a/playlet-lib/src/components/VideoFeed/VideoRowListRowContentJob.bs
+++ b/playlet-lib/src/components/VideoFeed/VideoRowListRowContentJob.bs
@@ -230,10 +230,11 @@ function RemoveSingleFailedRow(error as dynamic, feedSource as object, feedSourc
end if
isError = error = Invidious.ERROR_NOT_AUTHENTICATED
+ ' Invidious admins disable endpoints sometimes
isError = isError or error.instr("Administrator has disabled this endpoint") <> -1
isError = isError or error.instr("API disabled") <> -1
- isError = isError or feedSource.id.instr("inv_trending") <> -1
- isError = isError or feedSource.id.instr("inv_popular") <> -1
+ ' Playlet not supporting popular
+ isError = isError or feedSource.id = "inv_popular"
if not isError
return false
end if
diff --git a/playlet-lib/src/components/Web/PlayletWebServer/Middleware/PlayletInvidiousBackendRouter.bs b/playlet-lib/src/components/Web/PlayletWebServer/Middleware/PlayletInvidiousBackendRouter.bs
index eb02fa9e..c6443e18 100644
--- a/playlet-lib/src/components/Web/PlayletWebServer/Middleware/PlayletInvidiousBackendRouter.bs
+++ b/playlet-lib/src/components/Web/PlayletWebServer/Middleware/PlayletInvidiousBackendRouter.bs
@@ -253,9 +253,8 @@ namespace Http
return true
end function
- @get("/playlet-invidious-backend/api/v1/trending")
@get("/playlet-invidious-backend/api/v1/popular")
- function GetTrending(context as object) as boolean
+ function GetPopular(context as object) as boolean
request = context.request
response = context.response
@@ -264,40 +263,10 @@ namespace Http
return m.GetAuthRecommended(context)
end if
- raw = request.query.raw <> invalid
-
- options = {
- "disableShorts": m.preferences["content_feed.disable_shorts"]
- raw: raw
- type: request.query.type
- }
-
- result = InnertubeService.GetTrending(options)
- if raw
- response.Json(result)
- return true
- end if
-
- if result.error <> invalid
- response.Json(result)
- response.http_code = 500
- return true
- end if
-
- if not IsArray(result.feeds) or result.feeds.Count() = 0
- response.Json({
- "error": "Failed to get trending feed"
- })
- response.http_code = 500
- return true
- end if
-
- response.Json(ValidArray(result.feeds[0].items))
-
- if result.DoesExist("cache-control")
- response.headers["cache-control"] = result["cache-control"]
- end if
-
+ response.Json({
+ "error": "Playlet built-in Invidious backend does not support popular videos."
+ })
+ response.http_code = 400
return true
end function
diff --git a/playlet-lib/src/config/default_home_layout.yaml b/playlet-lib/src/config/default_home_layout.yaml
index 7d676eee..2b601ef2 100644
--- a/playlet-lib/src/config/default_home_layout.yaml
+++ b/playlet-lib/src/config/default_home_layout.yaml
@@ -14,44 +14,6 @@
apiType: Invidious
endpoint: auth_recommended
-- title: Trending
- id: trending
- feedSources:
- - id: inv_trending
- title: Trending
- apiType: Invidious
- endpoint: trending
-
-- title: Trending - Music
- id: trending_music
- feedSources:
- - id: inv_trending_music
- title: Trending - Music
- apiType: Invidious
- endpoint: trending
- queryParams:
- type: Music
-
-- title: Trending - Gaming
- id: trending_gaming
- feedSources:
- - id: inv_trending_gaming
- title: Trending - Gaming
- apiType: Invidious
- endpoint: trending
- queryParams:
- type: Gaming
-
-- title: Trending - Movies
- id: trending_movies
- feedSources:
- - id: inv_trending_movies
- title: Trending - Movies
- apiType: Invidious
- endpoint: trending
- queryParams:
- type: Movies
-
- title: Popular
id: popular
feedSources:
diff --git a/playlet-lib/src/config/invidious_video_api.yaml b/playlet-lib/src/config/invidious_video_api.yaml
index c8c6ffed..f21631b6 100644
--- a/playlet-lib/src/config/invidious_video_api.yaml
+++ b/playlet-lib/src/config/invidious_video_api.yaml
@@ -1,17 +1,3 @@
-trending:
- title: Trending
- url: /api/v1/trending
- cacheSeconds: 21600 # 6 hours
- queryParams:
- type:
- type:
- - Music
- - Gaming
- - Movies
- region:
- type: "#ISO3166"
- default: GetUserCountryCode
-
popular:
title: Popular
url: /api/v1/popular
diff --git a/playlet-lib/src/config/preferences.json5 b/playlet-lib/src/config/preferences.json5
index 9aae1fbe..940d9919 100644
--- a/playlet-lib/src/config/preferences.json5
+++ b/playlet-lib/src/config/preferences.json5
@@ -243,22 +243,6 @@
id: "recommended",
enabled: true,
},
- {
- id: "trending",
- enabled: true,
- },
- {
- id: "trending_music",
- enabled: true,
- },
- {
- id: "trending_gaming",
- enabled: true,
- },
- {
- id: "trending_movies",
- enabled: true,
- },
{
id: "popular",
enabled: true,
diff --git a/playlet-lib/src/locale/de_DE/translations.ts b/playlet-lib/src/locale/de_DE/translations.ts
index 04749c4c..c17f68e2 100644
--- a/playlet-lib/src/locale/de_DE/translations.ts
+++ b/playlet-lib/src/locale/de_DE/translations.ts
@@ -312,22 +312,6 @@
Watch history
Wiedergabeverlauf
-
- Trending
- Trends
-
-
- Trending - Movies
- Trends - Filme
-
-
- Trending - Music
- Trends - Musik
-
-
- Trending - Gaming
- Trends - Gaming
-
Popular
Populär
diff --git a/playlet-lib/src/locale/en_US/translations.ts b/playlet-lib/src/locale/en_US/translations.ts
index c5335d4a..4ea0a087 100644
--- a/playlet-lib/src/locale/en_US/translations.ts
+++ b/playlet-lib/src/locale/en_US/translations.ts
@@ -88,22 +88,6 @@
Watch history
Watch history
-
- Trending
- Trending
-
-
- Trending - Movies
- Trending - Movies
-
-
- Trending - Music
- Trending - Music
-
-
- Trending - Gaming
- Trending - Gaming
-
Popular
Popular
diff --git a/playlet-lib/src/locale/es_ES/translations.ts b/playlet-lib/src/locale/es_ES/translations.ts
index db008e60..384bb374 100644
--- a/playlet-lib/src/locale/es_ES/translations.ts
+++ b/playlet-lib/src/locale/es_ES/translations.ts
@@ -80,22 +80,6 @@
Watch history
Ver el historial
-
- Trending
- Tendencias
-
-
- Trending - Movies
- Tendencias - Películas
-
-
- Trending - Music
- Tendencias - Música
-
-
- Trending - Gaming
- Tendencias - Juegos
-
Popular
Popular
diff --git a/playlet-lib/src/locale/es_MX/translations.ts b/playlet-lib/src/locale/es_MX/translations.ts
index 0bfe478c..b1d238b6 100644
--- a/playlet-lib/src/locale/es_MX/translations.ts
+++ b/playlet-lib/src/locale/es_MX/translations.ts
@@ -36,10 +36,6 @@
Filters
Filtros
-
- Trending - Music
- Tendencias - Música
-
Login to Invidious in order to view Subscriptions, Playlists, and use the Watch history.
Accede a Invidious para ver tus suscripciones, playlists, y usar el historial de reproducción.
@@ -80,18 +76,6 @@
Watch history
Historial de reproducción
-
- Trending
- Tendencias
-
-
- Trending - Movies
- Tendencias - Películas
-
-
- Trending - Gaming
- Tendencias - Videojuegos
-
Edit
Editar
diff --git a/playlet-lib/src/locale/fr_CA/translations.ts b/playlet-lib/src/locale/fr_CA/translations.ts
index cd47c409..c76340ea 100644
--- a/playlet-lib/src/locale/fr_CA/translations.ts
+++ b/playlet-lib/src/locale/fr_CA/translations.ts
@@ -76,22 +76,6 @@
Watch history
Historique
-
- Trending
- Tendances
-
-
- Trending - Movies
- Tendances - Films
-
-
- Trending - Music
- Tendances - Musique
-
-
- Trending - Gaming
- Tendances - Jeux vidéo
-
Popular
Populaire
diff --git a/playlet-lib/src/locale/pt_BR/translations.ts b/playlet-lib/src/locale/pt_BR/translations.ts
index 17aade3f..64fef4ec 100644
--- a/playlet-lib/src/locale/pt_BR/translations.ts
+++ b/playlet-lib/src/locale/pt_BR/translations.ts
@@ -140,22 +140,6 @@
Watch history
Histórico de assistidos
-
- Trending
- Em alta
-
-
- Trending - Movies
- Em alta - Flimes
-
-
- Trending - Music
- Em alta - Música
-
-
- Trending - Gaming
- Em alta - Jogos
-
Popular
Popular
diff --git a/playlet-lib/src/source/utils/Locale.bs b/playlet-lib/src/source/utils/Locale.bs
index ef885e85..764a0610 100644
--- a/playlet-lib/src/source/utils/Locale.bs
+++ b/playlet-lib/src/source/utils/Locale.bs
@@ -41,10 +41,6 @@ namespace Locale
Recommended = "Recommended"
Playlists = "Playlists"
WatchHistory = "Watch history"
- Trending = "Trending"
- TrendingMovies = "Trending - Movies"
- TrendingMusic = "Trending - Music"
- TrendingGaming = "Trending - Gaming"
Popular = "Popular"
Videos = "Videos"
Shorts = "Shorts"
diff --git a/tools/invidious/docker-compose.yml b/tools/invidious/docker-compose.yml
index d4d3ab07..67c8753e 100644
--- a/tools/invidious/docker-compose.yml
+++ b/tools/invidious/docker-compose.yml
@@ -32,7 +32,7 @@ services:
# Use the key generated in the 2nd step
hmac_key: $INVIDIOUS_HMAC_KEY
healthcheck:
- test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1
+ test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/popular || exit 1
interval: 30s
timeout: 5s
retries: 2