diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-11-13 19:11:16 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-11-13 19:11:16 -0600 |
| commit | 47ed8bd13fa3fcada98f1e20e69f39a35f035ae1 (patch) | |
| tree | 502fa62800d8838b477c198ff159ec3a008a6c5f | |
| parent | 44e9b4ac2a11db5b7202f1f3cec61469f35d1567 (diff) | |
| download | invidious-47ed8bd13fa3fcada98f1e20e69f39a35f035ae1.tar.gz invidious-47ed8bd13fa3fcada98f1e20e69f39a35f035ae1.tar.bz2 invidious-47ed8bd13fa3fcada98f1e20e69f39a35f035ae1.zip | |
Add channel sort to '/api/v1/channels/videos'
| -rw-r--r-- | src/invidious.cr | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 83824869..0139d34a 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -2584,6 +2584,8 @@ end ucid = env.params.url["ucid"] page = env.params.query["page"]?.try &.to_i? page ||= 1 + sort_by = env.params.query["sort_by"]?.try &.downcase + sort_by ||= "newest" begin author, ucid, auto_generated = get_about_info(ucid) @@ -2593,7 +2595,7 @@ end end begin - videos, count = get_60_videos(ucid, page, auto_generated) + videos, count = get_60_videos(ucid, page, auto_generated, sort_by) rescue ex error_message = {"error" => ex.message}.to_json halt env, status_code: 500, response: error_message |
