From aa63c3f70ed98a12a2915de94fd9afbf476b7ccb Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Mon, 4 Mar 2019 10:46:58 -0600 Subject: [PATCH] Update formatting and default feed menu --- src/invidious.cr | 6 +++--- src/invidious/helpers/helpers.cr | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index a19a742b..4154f3ee 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -2319,7 +2319,7 @@ get "/feed/playlist/:plid" do |env| document end -# Add support for subscribing to channels via PubSubHubbub +# Support push notifications via PubSubHubbub get "/feed/webhook/:token" do |env| verify_token = env.params.url["token"] @@ -2363,11 +2363,11 @@ post "/feed/webhook/:token" do |env| rss.xpath_nodes("//feed/entry").each do |entry| id = entry.xpath_node("videoid").not_nil!.content - video = get_video(id, PG_DB, proxies) + video = get_video(id, PG_DB, proxies, region: nil) video = ChannelVideo.new(id, video.title, video.published, Time.now, video.ucid, video.author, video.length_seconds) PG_DB.exec("UPDATE users SET notifications = notifications || $1 \ - WHERE updated < $2 AND $3 = ANY(subscriptions) AND $1 <> ALL(notifications)", video.id, video.published, video.ucid) + WHERE updated < $2 AND $3 = ANY(subscriptions) AND $1 <> ALL(notifications)", video.id, video.published, video.ucid) video_array = video.to_a args = arg_array(video_array) diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.cr index 3574e5cc..3cc4d9cf 100644 --- a/src/invidious/helpers/helpers.cr +++ b/src/invidious/helpers/helpers.cr @@ -17,7 +17,7 @@ user: String, domain: String?, # Domain to be used for links to resources on the site where an absolute URL is required use_pubsub_feeds: {type: Bool, default: false}, # Subscribe to channels using PubSubHubbub (requires domain, hmac_key) default_home: {type: String, default: "Top"}, - feed_menu: {type: Array(String), default: ["Popular", "Top", "Trending"]}, + feed_menu: {type: Array(String), default: ["Popular", "Top", "Trending", "Subscriptions"]}, top_enabled: {type: Bool, default: true}, captcha_enabled: {type: Bool, default: true}, login_enabled: {type: Bool, default: true},