From d3eca5ff202bc569f63387601d5e4403890b0fad Mon Sep 17 00:00:00 2001 From: ThatMatrix Date: Thu, 11 Jul 2024 02:41:08 +0200 Subject: [PATCH] Fix(user/importers): Fixed typos --- docker-compose.yml | 2 +- src/invidious/user/imports.cr | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index afda8726..8c302681 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,7 +30,7 @@ services: # domain: # https_only: false # statistics_enabled: false - hmac_key: "CHANGE_ME!!" + hmac_key: "ahyeef5xahyohliefi3A" healthcheck: test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1 interval: 30s diff --git a/src/invidious/user/imports.cr b/src/invidious/user/imports.cr index 0a4408fb..04dba18a 100644 --- a/src/invidious/user/imports.cr +++ b/src/invidious/user/imports.cr @@ -33,7 +33,7 @@ struct Invidious::User # Parse a CSV Google Takeout - Youtube Playlist file def parse_playlist_export_csv(user : User, playlist_name : String, raw_input : String) # Split the input into head and body content - raw_head, raw_body = raw_input.strip('\n').split("\n\n", limit: 2, remove_empty: true) + raw_head, raw_body = raw_input.split("\n\n", limit: 2, remove_empty: true) # Create the playlist from the head content csv_head = CSV.new(raw_head.strip('\n'), headers: true) @@ -205,7 +205,7 @@ struct Invidious::User extension = filename_array.last if extension == "csv" || type == "text/csv" - playlist = parse_playlist_export_csv(user, playlist_name,playlist_name, body) + playlist = parse_playlist_export_csv(user, playlist_name, body) if playlist return true else @@ -217,7 +217,6 @@ struct Invidious::User end def from_youtube_wh(user : User, body : String, filename : String, type : String) : Bool - filename = filename.split(".") extension = filename.split(".").last if extension == "json" || type == "application/json"