diff --git a/app/api/routes/content.py b/app/api/routes/content.py index 602c58e..fa3048d 100644 --- a/app/api/routes/content.py +++ b/app/api/routes/content.py @@ -42,6 +42,8 @@ async def s_api_v1_content_view(request, content_address: str): if known_key: opts['key_hash'] = known_key.seed_hash + opts['have_licenses'] = [] + have_access = False if request.ctx.user: user_wallet_address = request.ctx.user.wallet_address(request.ctx.db_session) @@ -56,6 +58,8 @@ async def s_api_v1_content_view(request, content_address: str): '?seconds_limit=30' if not have_access else '' ) } + if have_access: + opts['have_licenses'].append('listen') content_meta = content['encrypted_content'].json_format() content_metadata = StoredContent.from_cid(request.ctx.db_session, content_meta.get('metadata_cid') or None)