diff --git a/src/invidious/channels/channels.cr b/src/invidious/channels/channels.cr index 264ef5dab..c1a275298 100644 --- a/src/invidious/channels/channels.cr +++ b/src/invidious/channels/channels.cr @@ -228,15 +228,15 @@ def fetch_channel(ucid, pull_all_videos : Bool) # If there is no update for the video, only update the views if database_video.size > 0 && updated == database_video[0].updated - video = database_video[0] - video.views = views + video = database_video[0] + video.views = views else channel_video = videos .select(SearchVideo) .select(&.id.== video_id)[0]? - # Not a video, either a short of a livestream - # Fetch invididual for info + # Not a video, either a short or a livestream + # Fetch individual for info if channel_video.nil? short_or_live = fetch_video(video_id, "") video_type = short_or_live.video_type diff --git a/src/invidious/routes/feeds.cr b/src/invidious/routes/feeds.cr index 230986167..4d2d90311 100644 --- a/src/invidious/routes/feeds.cr +++ b/src/invidious/routes/feeds.cr @@ -438,7 +438,7 @@ module Invidious::Routes::Feeds live_now: video.live_now, premiere_timestamp: video.premiere_timestamp, views: video.views, - video_type: VideoType::Video + video_type: video.video_type }) was_insert = Invidious::Database::ChannelVideos.insert(video, with_premiere_timestamp: true) diff --git a/src/invidious/users.cr b/src/invidious/users.cr index 395dee3a9..d9e15dc48 100644 --- a/src/invidious/users.cr +++ b/src/invidious/users.cr @@ -33,6 +33,8 @@ def get_subscription_feed(user, max_results = 40, page = 1) if user.preferences.hide_shorts types_to_fetch.delete(VideoType::Short) end + # Note: hide_livestreams also hides scheduled/premiere videos (VideoType::Scheduled), + # since they are typically upcoming livestreams. if user.preferences.hide_livestreams [VideoType::Livestream, VideoType::Scheduled].each { |v| types_to_fetch.delete(v) } end