Add another reason code
This commit is contained in:
parent
71fa5ad6b6
commit
e43a67b0d5
1 changed files with 1 additions and 1 deletions
2
app.py
2
app.py
|
@ -305,7 +305,7 @@ def proxy(video_id):
|
||||||
return Response("Video not found", status=404)
|
return Response("Video not found", status=404)
|
||||||
|
|
||||||
reason_code = params.get('reasonCode', '').upper()
|
reason_code = params.get('reasonCode', '').upper()
|
||||||
if reason_code in ['HIDDEN_VIDEO', 'ADMINISTRATOR_DELETE_VIDEO', 'RIGHT_HOLDER_DELETE_VIDEO']:
|
if reason_code in ['HIDDEN_VIDEO', 'ADMINISTRATOR_DELETE_VIDEO', 'RIGHT_HOLDER_DELETE_VIDEO', 'DELETED_VIDEO']:
|
||||||
logger.warning(f"{video_id}: Video is hidden or deleted ({reason_code}) - returning 404")
|
logger.warning(f"{video_id}: Video is hidden or deleted ({reason_code}) - returning 404")
|
||||||
return Response("Video not found", status=404)
|
return Response("Video not found", status=404)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue