mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
Updated csv reading as per feedback and ran
Signed-off-by: thtmnisamnstr <gavinj1984@gmail.com>
This commit is contained in:
parent
3341929060
commit
fffdaa1410
1 changed files with 26 additions and 27 deletions
|
@ -51,8 +51,8 @@ struct Invidious::User
|
|||
Invidious::Database::Playlists.update_description(playlist.id, description)
|
||||
|
||||
# Add each video to the playlist from the body content
|
||||
CSV.each_row(raw_body) do |row|
|
||||
if row.size >= 1
|
||||
csv_body = CSV.new(raw_body, headers: true)
|
||||
csv_body.each do |row|
|
||||
video_id = row[0]
|
||||
if playlist
|
||||
next if !video_id
|
||||
|
@ -80,7 +80,6 @@ struct Invidious::User
|
|||
Invidious::Database::Playlists.update_video_added(playlist.id, playlist_video.index)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return playlist
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue