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"