Merge branch 'main' of github.com:TagStudioDev/TagStudio

This commit is contained in:
Travis Abendshien
2024-11-05 10:25:30 -08:00
3 changed files with 10 additions and 11 deletions

View File

@@ -190,7 +190,7 @@ As of writing (Alpha v9.3.0) the project is in a useable state, however it lacks
### What Features Are You Planning on Adding?
> [!IMPORTANT]
> See the [Planned Features](/docs/updates/planned_features.md) documentation for the latest feature lists. The lists here are currently being migrated over there with individual pages for larger features.
> See the [Roadmap](/docs/updates/roadmap.md) documentation for the latest feature lists. The lists here are currently being migrated over there with individual pages for larger features.
Of the several features I have planned for the project, these are broken up into “priority” features and “future” features. Priority features were originally intended for the first public release, however are currently absent from the Alpha v9.x.x builds.

View File

@@ -207,7 +207,7 @@ class MediaCategories:
".rw2",
}
_IMAGE_VECTOR_SET: set[str] = {".svg"}
_IMAGE_SET: set[str] = {
_IMAGE_RASTER_SET: set[str] = {
".apng",
".avif",
".bmp",
@@ -392,9 +392,14 @@ class MediaCategories:
extensions=_IMAGE_VECTOR_SET,
is_iana=False,
)
IMAGE_RASTER_TYPES: MediaCategory = MediaCategory(
media_type=MediaType.IMAGE,
extensions=_IMAGE_RASTER_SET,
is_iana=False,
)
IMAGE_TYPES: MediaCategory = MediaCategory(
media_type=MediaType.IMAGE,
extensions=_IMAGE_SET | _IMAGE_RAW_SET | _IMAGE_VECTOR_SET,
extensions=_IMAGE_RASTER_SET | _IMAGE_RAW_SET | _IMAGE_VECTOR_SET,
is_iana=True,
)
INSTALLER_TYPES: MediaCategory = MediaCategory(

View File

@@ -625,13 +625,7 @@ class PreviewPanel(QWidget):
self.preview_gif.show()
image = None
if (
MediaCategories.is_ext_in_category(ext, MediaCategories.IMAGE_TYPES)
and MediaCategories.is_ext_in_category(ext, MediaCategories.IMAGE_RAW_TYPES)
and MediaCategories.is_ext_in_category(
ext, MediaCategories.IMAGE_VECTOR_TYPES
)
):
if MediaCategories.is_ext_in_category(ext, MediaCategories.IMAGE_RASTER_TYPES):
image = Image.open(str(filepath))
elif MediaCategories.is_ext_in_category(ext, MediaCategories.IMAGE_RAW_TYPES):
try:
@@ -668,7 +662,7 @@ class PreviewPanel(QWidget):
# Stats for specific file types are displayed here.
if image and (
MediaCategories.is_ext_in_category(
ext, MediaCategories.IMAGE_TYPES, mime_fallback=True
ext, MediaCategories.IMAGE_RASTER_TYPES, mime_fallback=True
)
or MediaCategories.is_ext_in_category(
ext, MediaCategories.VIDEO_TYPES, mime_fallback=True