Skip to content

feat: add AssetType/AssetCodec choices and Codec model#1422

Open
P-r-e-m-i-u-m wants to merge 9 commits intomeeb:issue/1419/design-generic-modelsfrom
P-r-e-m-i-u-m:issue/1420/asset-types-choices
Open

feat: add AssetType/AssetCodec choices and Codec model#1422
P-r-e-m-i-u-m wants to merge 9 commits intomeeb:issue/1419/design-generic-modelsfrom
P-r-e-m-i-u-m:issue/1420/asset-types-choices

Conversation

@P-r-e-m-i-u-m
Copy link

Closes #1420
Closes #1421

Changes

tubesync/sync/choices.py

  • Added AssetType choices: thumbnail, audio, video
  • Added AssetCodec choices: jpeg, opus, vp9, av1

tubesync/sync/models/codec.py

  • Added new Codec model with asset_type and codec fields
  • Uses AssetType and AssetCodec choices
  • UUID primary key
  • Unique together constraint on (asset_type, codec)

tubesync/sync/models/__init__.py

  • Exported Codec from the models package

Signed-off-by: 🄂ʏᴇᴅ 🄰ʙᴅᴜʟ 🄰ᴍᴀ🄝 ✧ <amanbaba9404522@gmail.com>
Signed-off-by: 🄂ʏᴇᴅ 🄰ʙᴅᴜʟ 🄰ᴍᴀ🄝 ✧ <amanbaba9404522@gmail.com>
Copy link
Collaborator

@tcely tcely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing for subtitles in your changes?

I know there are multiple subtitle codecs, but I don't look at them often enough to have memorized those.

I think thumbnails are at least png or jpg, but there may be others that are used.

@github-project-automation github-project-automation bot moved this to In Progress in Status Mar 15, 2026
@tcely tcely added this to the Expanded site support milestone Mar 15, 2026
@tcely tcely added help wanted Extra attention is needed waiting-on-author More details or answers are needed from the author of this issue labels Mar 15, 2026
@tcely tcely changed the base branch from main to issue/1419/design-generic-models March 15, 2026 16:53
tcely and others added 4 commits March 15, 2026 12:59
Add `MP4A`, also known as: `M4A`
Add `AVC1` from the `YouTube_VideoCodec` earlier in this file.
Add `AV1` from the `YouTube_VideoCodec` earlier in this file.
…pe/AssetCodec

Signed-off-by: 🄂ʏᴇᴅ 🄰ʙᴅᴜʟ 🄰ᴍᴀ🄝 ✧ <amanbaba9404522@gmail.com>
@P-r-e-m-i-u-m
Copy link
Author

"Added SUBTITLE to AssetType and added PNG, VTT, SRT, ASS codecs to AssetCodec to cover thumbnails and subtitles. Ready for re-review @tcely

@P-r-e-m-i-u-m P-r-e-m-i-u-m requested a review from tcely March 15, 2026 17:15
@tcely tcely removed the waiting-on-author More details or answers are needed from the author of this issue label Mar 15, 2026
Copy link
Collaborator

@tcely tcely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add .ttml and .webp

tcely added 2 commits March 15, 2026 13:32
Switch to `.jpg` and add `.webp`
@github-project-automation github-project-automation bot moved this from In Progress to Ready in Status Mar 15, 2026
@tcely
Copy link
Collaborator

tcely commented Mar 15, 2026

This looks good to me.

@P-r-e-m-i-u-m
Is there anything else you want to add or cleanup?

@tcely tcely requested a review from meeb March 15, 2026 17:34
@P-r-e-m-i-u-m
Copy link
Author

"Looks good to me! Nothing else to add. Thanks for the suggestions @tcely

Switch to a text value aligned with the extension.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed

Projects

Status: Ready

Development

Successfully merging this pull request may close these issues.

Create a Codec model Add asset types to choices

2 participants