Skip to content

Invidious is an alternative front-end to YouTube

Fix videos being incorrectly labelled as isUpcoming = true (#5800)

absidue9e8d102c943a
diff --git a/src/invidious/helpers/serialized_yt_data.cr b/src/invidious/helpers/serialized_yt_data.cr
index 9d0cc588..17dff566 100644
--- a/src/invidious/helpers/serialized_yt_data.cr
+++ b/src/invidious/helpers/serialized_yt_data.cr
@@ -148,7 +148,7 @@ struct SearchVideo
end
def upcoming?
- premiere_timestamp ? true : false
+ premiere_timestamp.try { |t| t.to_unix > 0 } ? true : false
end
end