Skip to content

Commit

Permalink
forgot to commit media types
Browse files Browse the repository at this point in the history
  • Loading branch information
BPplays committed Aug 21, 2024
1 parent c0459a7 commit 2c4e35d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tagstudio/src/core/media_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class MediaType(str, Enum):
IMAGE_RAW: str = "image_raw"
IMAGE_VECTOR: str = "image_vector"
IMAGE: str = "image"
IMAGE_ANIMATION: str = "image_animation"
INSTALLER: str = "installer"
MATERIAL: str = "material"
MODEL: str = "model"
Expand Down Expand Up @@ -203,6 +204,13 @@ class MediaCategories:
".tiff",
".webp",
}
_IMAGE_ANIMATION_SET: set[str] = {
".apng",
".png",
".gif",
".jxl",
".webp",
}
_INSTALLER_SET: set[str] = {".appx", ".msi", ".msix"}
_MATERIAL_SET: set[str] = {".mtl"}
_MODEL_SET: set[str] = {".3ds", ".fbx", ".obj", ".stl"}
Expand Down Expand Up @@ -329,9 +337,14 @@ class MediaCategories:
)
IMAGE_TYPES: MediaCategory = MediaCategory(
media_type=MediaType.IMAGE,
extensions=_IMAGE_SET | _IMAGE_RAW_SET | _IMAGE_VECTOR_SET,
extensions=_IMAGE_SET | _IMAGE_RAW_SET | _IMAGE_VECTOR_SET | _IMAGE_ANIMATION_SET,
is_iana=True,
)
IMAGE_ANIMATION_TYPES: MediaCategory = MediaCategory(
media_type=MediaType.IMAGE_ANIMATION,
extensions=_IMAGE_ANIMATION_SET,
is_iana=False,
)
INSTALLER_TYPES: MediaCategory = MediaCategory(
media_type=MediaType.INSTALLER,
extensions=_INSTALLER_SET,
Expand Down Expand Up @@ -406,6 +419,7 @@ class MediaCategories:
FONT_TYPES,
IMAGE_RAW_TYPES,
IMAGE_TYPES,
IMAGE_ANIMATION_TYPES,
IMAGE_VECTOR_TYPES,
INSTALLER_TYPES,
MATERIAL_TYPES,
Expand Down

0 comments on commit 2c4e35d

Please sign in to comment.