2024-04-18 11:57:24 +02:00
|
|
|
from dataclasses import dataclass
|
2026-03-31 14:14:46 +02:00
|
|
|
from typing import Any, List, TypedDict
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class MediaVariant(TypedDict, total=False):
|
|
|
|
|
url: str
|
|
|
|
|
path: str
|
|
|
|
|
type: str
|
|
|
|
|
medium: str
|
|
|
|
|
isDefault: str
|
|
|
|
|
fileSize: str
|
|
|
|
|
bitrate: int | float | str
|
|
|
|
|
samplingrate: int | str
|
|
|
|
|
channels: int | str
|
|
|
|
|
duration: str
|
|
|
|
|
width: int | str
|
|
|
|
|
height: int | str
|
|
|
|
|
framerate: str
|
|
|
|
|
expression: str
|
|
|
|
|
lang: str
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TranscodedMediaFile(TypedDict):
|
|
|
|
|
url: str
|
|
|
|
|
path: str
|
|
|
|
|
checksum: str | None
|
|
|
|
|
status: str
|
|
|
|
|
published_url: str
|
|
|
|
|
variants: List[MediaVariant]
|
2024-04-18 11:57:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@dataclass
|
|
|
|
|
class ElementItem:
|
2024-04-18 15:27:00 +02:00
|
|
|
feed_name: str
|
2024-04-18 11:57:24 +02:00
|
|
|
el: Any
|
2024-04-18 15:27:00 +02:00
|
|
|
image_urls: List[str]
|
|
|
|
|
images: List[Any]
|
|
|
|
|
file_urls: List[str]
|
|
|
|
|
files: List[Any]
|
|
|
|
|
audio_urls: List[str]
|
2026-03-31 14:14:46 +02:00
|
|
|
audios: List[TranscodedMediaFile]
|
2024-04-18 15:27:00 +02:00
|
|
|
video_urls: List[str]
|
2026-03-31 14:14:46 +02:00
|
|
|
videos: List[TranscodedMediaFile]
|
2024-04-18 11:57:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@dataclass
|
|
|
|
|
class ChannelElementItem:
|
2024-04-18 15:27:00 +02:00
|
|
|
feed_name: str
|
2024-04-18 11:57:24 +02:00
|
|
|
el: Any
|
2024-04-18 15:27:00 +02:00
|
|
|
image_urls: List[str]
|
|
|
|
|
images: List[Any]
|