Skip to content

Commit

Permalink
Fix sorting upcoming subscriptions (#3485)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunkyProgrammer authored May 6, 2023
1 parent 1b45f25 commit 9003b82
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/renderer/views/Subscriptions/Subscriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 9003b82

Please sign in to comment.