Update routes/trending.js

This commit is contained in:
obvtiger 2025-08-07 08:49:42 +02:00
parent 8c2e1bd15b
commit 93f7de7352

View file

@ -26,6 +26,10 @@ function trendingRouteHandler(app) {
const videoId = item.url.replace("/watch?v=", ""); const videoId = item.url.replace("/watch?v=", "");
item.thumbnail = `/api/thumbnail/${videoId}`; item.thumbnail = `/api/thumbnail/${videoId}`;
} }
if (item.uploaderUrl && item.uploaderUrl.startsWith("/channel/")) {
const uploaderUrl = item.uploaderUrl.replace("/channel/", "");
item.uploaderUrl = uploaderUrl;
}
}); });
cachedData = jsonData; cachedData = jsonData;