summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamantaz Fox <coding@samantaz.fr>2021-10-11 23:52:57 +0200
committerSamantaz Fox <coding@samantaz.fr>2021-10-11 23:52:57 +0200
commit678b10dbcfc71fd9001915892586de8c62357976 (patch)
treeb469da22b04053958cfd6e565a3774c3c848d758
parenta1d6411f1f7232c98a17e9d3f17d61a771068780 (diff)
downloadinvidious-678b10dbcfc71fd9001915892586de8c62357976.tar.gz
invidious-678b10dbcfc71fd9001915892586de8c62357976.tar.bz2
invidious-678b10dbcfc71fd9001915892586de8c62357976.zip
Lookback 50 videos
-rw-r--r--src/invidious/routes/api/v1/misc.cr4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/invidious/routes/api/v1/misc.cr b/src/invidious/routes/api/v1/misc.cr
index da5a940c..80b59fd5 100644
--- a/src/invidious/routes/api/v1/misc.cr
+++ b/src/invidious/routes/api/v1/misc.cr
@@ -47,9 +47,8 @@ module Invidious::Routes::API::V1::Misc
end
# includes into the playlist a maximum of 20 videos, before the offset
- lookback = 20
if offset > 0
- lookback = offset < lookback ? offset : lookback
+ lookback = offset < 50 ? offset : 50
response = playlist.to_json(offset - lookback, locale)
json_response = JSON.parse(response)
else
@@ -58,6 +57,7 @@ module Invidious::Routes::API::V1::Misc
# First we find the actual offset, and then we lookback
# it shouldn't happen often though
+ lookback = 0
response = playlist.to_json(offset, locale, video_id: video_id)
json_response = JSON.parse(response)