Replace image pipeline with profile-driven variants
- add image normalization profiles and thumbnail profiles - generate source, full-size variant, and thumbnail image artifacts - rewrite canonical image URLs through the first configured profile - emit explicit image Media RSS groups with named thumbnails - preserve legacy image paths when image conversion is disabled - cover cache-hit source paths, inline image handling, and thumbnail export
This commit is contained in:
parent
7316d4723f
commit
525393272e
13 changed files with 1299 additions and 124 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from dataclasses import dataclass
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any, List, TypedDict
|
||||
|
||||
|
||||
|
|
@ -8,7 +8,7 @@ class MediaVariant(TypedDict, total=False):
|
|||
type: str
|
||||
medium: str
|
||||
isDefault: str
|
||||
fileSize: str
|
||||
fileSize: int | str
|
||||
bitrate: int | float | str
|
||||
samplingrate: int | str
|
||||
channels: int | str
|
||||
|
|
@ -29,18 +29,39 @@ class TranscodedMediaFile(TypedDict):
|
|||
variants: List[MediaVariant]
|
||||
|
||||
|
||||
class ThumbnailVariant(TypedDict, total=False):
|
||||
url: str
|
||||
path: str
|
||||
width: int | str
|
||||
height: int | str
|
||||
slot: str
|
||||
type: str
|
||||
|
||||
|
||||
class TranscodedImageFile(TypedDict):
|
||||
url: str
|
||||
path: str
|
||||
checksum: str | None
|
||||
status: str
|
||||
published_url: str
|
||||
source_path: str
|
||||
variants: List[MediaVariant]
|
||||
thumbnails: List[ThumbnailVariant]
|
||||
|
||||
|
||||
@dataclass
|
||||
class ElementItem:
|
||||
feed_name: str
|
||||
el: Any
|
||||
image_urls: List[str]
|
||||
images: List[Any]
|
||||
images: List[TranscodedImageFile]
|
||||
file_urls: List[str]
|
||||
files: List[Any]
|
||||
audio_urls: List[str]
|
||||
audios: List[TranscodedMediaFile]
|
||||
video_urls: List[str]
|
||||
videos: List[TranscodedMediaFile]
|
||||
media_image_urls: List[str] = field(default_factory=list)
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
@ -48,4 +69,5 @@ class ChannelElementItem:
|
|||
feed_name: str
|
||||
el: Any
|
||||
image_urls: List[str]
|
||||
images: List[Any]
|
||||
images: List[TranscodedImageFile]
|
||||
media_image_urls: List[str] = field(default_factory=list)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue