From a2f79a163f899022ff4106b0c045c951d84d4244 Mon Sep 17 00:00:00 2001 From: simonphoenix96 Date: Sat, 27 Feb 2021 18:58:55 +0100 Subject: [PATCH] integrate legacy yt xml subscription import with new json sub import --- src/invidious.cr | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index 563a3768..fb1d168e 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -760,10 +760,16 @@ post "/data_control" do |env| end end when "import_youtube" - subscriptions = JSON.parse(body) - - user.subscriptions += subscriptions.as_a.compact_map do |entry| - entry["snippet"]["resourceId"]["channelId"].as_s + if body[0..4] == "