tubesync
tubesync copied to clipboard
Create a `Thumbnail` model
This requires the Codec data to be populated:
- #1458
Orientation is one of:
landscapeportrait
Thumbnail table partial example:
| extension | Codec |
min_height | max_height | resized_height | min_width | max_width | resized_width | orientation | resized |
|---|---|---|---|---|---|---|---|---|---|
jpg |
[Codec.pk of <thumbnail,jpg>] | 360 | 1080 | NULL |
480 | 1920 | NULL |
landscape |
False |
webp |
[Codec.pk of <thumbnail,webp>] | 360 | 1080 | 720 | 480 | 1920 | 1280 | landscape |
False |
This requires the Codec data from #1458 to be populated first. I'd handle this by creating the Thumbnail model with the specified fields and orientation choices, linking it to the Codec table. Can have a PR up in a day after the prerequisite is merged. I've implemented similar media metadata models in Django projects before.
I look forward to seeing your pull request.