added general case for handling additional media file types

This commit is contained in:
Tristan Lee
2022-04-06 10:36:18 -05:00
parent 2383359a6d
commit 3fd841f76a

View File

@@ -6,7 +6,6 @@
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
import json
from dataclasses import dataclass
from urllib.parse import unquote
from polyphemus import api
@@ -94,9 +93,9 @@ class OdyseeVideo:
elif 'image' in full_video_info['value']:
video_type = 'image'
duration = None
else:
raise KeyError(f'nether `video`, `audio`, nor `claim_hash` keys are in `full_video_info["value"]`, only {full_video_info["value"].keys()}')
video_type = 'other'
duration = None
if 'signing_channel' in full_video_info:
channel_name = full_video_info['signing_channel'].get('name')