fix(user/imports.cr): splitting error fixed

This commit is contained in:
ThatMatrix 2024-07-11 03:32:06 +02:00
parent 8288878c55
commit 7eb166fd4d

View File

@ -33,7 +33,7 @@ struct Invidious::User
# Parse a CSV Google Takeout - Youtube Playlist file # Parse a CSV Google Takeout - Youtube Playlist file
def parse_playlist_export_csv(user : User, playlist_name : String, raw_input : String) def parse_playlist_export_csv(user : User, playlist_name : String, raw_input : String)
# Split the input into head and body content # Split the input into head and body content
raw_head, raw_body = raw_input.split("\n\n", limit: 2, remove_empty: true) raw_head, raw_body = raw_input.split("\n", limit: 2, remove_empty: true)
# Create the playlist from the head content # Create the playlist from the head content
csv_head = CSV.new(raw_head.strip('\n'), headers: true) csv_head = CSV.new(raw_head.strip('\n'), headers: true)