mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Move DB queries related to playlists in a separate module (2/3)
This commit is contained in:
parent
3deafe9f8d
commit
46d08237c6
7 changed files with 108 additions and 20 deletions
|
@ -790,7 +790,7 @@ post "/data_control" do |env|
|
|||
next if !privacy
|
||||
|
||||
playlist = create_playlist(PG_DB, title, privacy, user)
|
||||
PG_DB.exec("UPDATE playlists SET description = $1 WHERE id = $2", description, playlist.id)
|
||||
Invidious::Database::Playlists.update_description(playlist.id, description)
|
||||
|
||||
videos = item["videos"]?.try &.as_a?.try &.each_with_index do |video_id, idx|
|
||||
raise InfoException.new("Playlist cannot have more than 500 videos") if idx > 500
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue