Fix sorting upcoming subscriptions (#3485)

This commit is contained in:
ChunkyProgrammer
2023-05-06 14:31:12 +00:00
committed by GitHub
parent 1b45f25985
commit 9003b825e5
@@ -357,7 +357,13 @@ export default defineComponent({
invidiousAPICall(subscriptionsPayload).then(async (result) => {
resolve(await Promise.all(result.videos.map((video) => {
video.publishedDate = new Date(video.published * 1000)
if (video.liveNow) {
video.publishedDate = new Date().getTime()
} else if (video.isUpcoming) {
video.publishedDate = new Date(video.premiereTimestamp * 1000)
} else {
video.publishedDate = new Date(video.published * 1000)
}
return video
})))
}).catch((err) => {