Remove useless arguments from playlist-related functions

This commit is contained in:
Samantaz Fox
2022-01-19 18:34:35 +01:00
parent 2ae074a9a4
commit 5e3c9cf290
6 changed files with 30 additions and 38 deletions

View File

@@ -6,9 +6,9 @@ module Invidious::Routes::Embed
if plid = env.params.query["list"]?.try &.gsub(/[^a-zA-Z0-9_-]/, "")
begin
playlist = get_playlist(plid, locale: locale)
playlist = get_playlist(plid)
offset = env.params.query["index"]?.try &.to_i? || 0
videos = get_playlist_videos(playlist, offset: offset, locale: locale)
videos = get_playlist_videos(playlist, offset: offset)
rescue ex
return error_template(500, ex)
end
@@ -60,9 +60,9 @@ module Invidious::Routes::Embed
if plid
begin
playlist = get_playlist(plid, locale: locale)
playlist = get_playlist(plid)
offset = env.params.query["index"]?.try &.to_i? || 0
videos = get_playlist_videos(playlist, offset: offset, locale: locale)
videos = get_playlist_videos(playlist, offset: offset)
rescue ex
return error_template(500, ex)
end