diff options
Diffstat (limited to 'src/invidious.cr')
| -rw-r--r-- | src/invidious.cr | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 169c4f12..285d4394 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -1028,7 +1028,7 @@ post "/login" do |env| user, sid = create_user(sid, email, password) user_array = user.to_a - user_array[5] = user_array[5].to_json + user_array[4] = user_array[4].to_json args = arg_array(user_array) PG_DB.exec("INSERT INTO users VALUES (#{args})", user_array) @@ -1375,10 +1375,8 @@ get "/subscription_manager" do |env| subscriptions = [] of InvidiousChannel user.subscriptions.each do |ucid| - begin - subscriptions << get_channel(ucid, PG_DB, false, false) - rescue ex - next + if channel = PG_DB.query_one?("SELECT * FROM channels WHERE id = $1", ucid, as: InvidiousChannel) + subscriptions << channel end end subscriptions.sort_by! { |channel| channel.author.downcase } @@ -3950,14 +3948,13 @@ end error 500 do |env| error_message = <<-END_HTML - Looks like you've found a bug in Invidious. Feel free to open a new issue - <a href="https://github.com/omarroth/invidious/issues/github.com/omarroth/invidious"> + Looks like you've found a bug in Invidious. Feel free to open a new issue + <a href="https://github.com/omarroth/invidious/issues"> here </a> or send an email to <a href="mailto:omarroth@protonmail.com"> - omarroth@protonmail.com - </a>. + omarroth@protonmail.com</a>. END_HTML templated "error" end |
