audiothek

alternative frontend for ardaudiothek.de  https://audiothek.ce9e.org/
git clone https://git.ce9e.org/audiothek.git

commit
4c659ac4f404b85376e4893f3d70b14087a6ae8e
parent
944474db2f86602bcb899164bad1a5a2a5a4d9c7
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2023-12-22 08:42
allow to pass offset

Diffstat

M audiothek.py 8 ++++++--

1 files changed, 6 insertions, 2 deletions


diff --git a/audiothek.py b/audiothek.py

@@ -5,6 +5,8 @@ from xml.sax.saxutils import escape
    5     5 from aiohttp import web
    6     6 import aiohttp
    7     7 
   -1     8 COUNT = 20
   -1     9 
    8    10 QUERY = """
    9    11 query ProgramSetEpisodesQuery($id:ID!, $offset:Int!, $count:Int!) {
   10    12 	result:programSet(id:$id) {
@@ -67,13 +69,15 @@ def render_feed(show, episodes):
   67    69 
   68    70 
   69    71 async def feed(request):
   -1    72 	offset = int(request.query.get('offset', '0'), 10)
   -1    73 
   70    74 	url = 'https://api.ardaudiothek.de/graphql'
   71    75 	params = {
   72    76 		'query': QUERY,
   73    77 		'variables': json.dumps({
   74    78 			'id': request.match_info['id'],
   75    -1 			'offset': 0,
   76    -1 			'count': 20,
   -1    79 			'offset': offset,
   -1    80 			'count': COUNT,
   77    81 		}),
   78    82 	}
   79    83