|
|
|
@ -390,9 +390,8 @@ get "/playlist" do |env|
|
|
|
|
|
page = env.params.query["page"]?.try &.to_i?
|
|
|
|
|
page ||= 1
|
|
|
|
|
|
|
|
|
|
playlist = fetch_playlist(plid)
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
|
playlist = fetch_playlist(plid)
|
|
|
|
|
videos = fetch_playlist_videos(plid, page, playlist.video_count)
|
|
|
|
|
rescue ex
|
|
|
|
|
error_message = ex.message
|
|
|
|
@ -2823,9 +2822,9 @@ get "/api/v1/playlists/:plid" do |env|
|
|
|
|
|
page = env.params.query["page"]?.try &.to_i?
|
|
|
|
|
page ||= 1
|
|
|
|
|
|
|
|
|
|
playlist = fetch_playlist(plid)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
|
playlist = fetch_playlist(plid)
|
|
|
|
|
videos = fetch_playlist_videos(plid, page, playlist.video_count)
|
|
|
|
|
rescue ex
|
|
|
|
|
error_message = {"error" => "Playlist is empty"}.to_json
|
|
|
|
|