From 9cbd4eb2540228fec72b112e00760d24f0e31238 Mon Sep 17 00:00:00 2001 From: Jakub Janeczko Date: Sat, 6 Jun 2020 11:30:26 +0200 Subject: [PATCH] server: Some devices use capital I in {start,end}Items --- ycast/server.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ycast/server.py b/ycast/server.py index 9f7827b..e3315f3 100644 --- a/ycast/server.py +++ b/ycast/server.py @@ -73,6 +73,8 @@ def get_stations_page(stations, request): def get_paged_elements(items, requestargs): if requestargs.get('startitems'): offset = int(requestargs.get('startitems')) - 1 + elif requestargs.get('startItems'): + offset = int(requestargs.get('startItems')) - 1 elif requestargs.get('start'): offset = int(requestargs.get('start')) - 1 else: @@ -82,6 +84,8 @@ def get_paged_elements(items, requestargs): return [] if requestargs.get('enditems'): limit = int(requestargs.get('enditems')) + elif requestargs.get('endItems'): + limit = int(requestargs.get('endItems')) elif requestargs.get('start') and requestargs.get('howmany'): limit = int(requestargs.get('start')) - 1 + int(requestargs.get('howmany')) else: