Skip to content

Commit fc4e124

Browse files
committed
Merge branch 'main' of github.com:TagStudioDev/TagStudio
2 parents 15bf354 + 0358f51 commit fc4e124

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ As of writing (Alpha v9.3.0) the project is in a useable state, however it lacks
190190
### What Features Are You Planning on Adding?
191191

192192
> [!IMPORTANT]
193-
> 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.
193+
> 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.
194194
195195
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.
196196

tagstudio/src/core/media_types.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class MediaCategories:
207207
".rw2",
208208
}
209209
_IMAGE_VECTOR_SET: set[str] = {".svg"}
210-
_IMAGE_SET: set[str] = {
210+
_IMAGE_RASTER_SET: set[str] = {
211211
".apng",
212212
".avif",
213213
".bmp",
@@ -392,9 +392,14 @@ class MediaCategories:
392392
extensions=_IMAGE_VECTOR_SET,
393393
is_iana=False,
394394
)
395+
IMAGE_RASTER_TYPES: MediaCategory = MediaCategory(
396+
media_type=MediaType.IMAGE,
397+
extensions=_IMAGE_RASTER_SET,
398+
is_iana=False,
399+
)
395400
IMAGE_TYPES: MediaCategory = MediaCategory(
396401
media_type=MediaType.IMAGE,
397-
extensions=_IMAGE_SET | _IMAGE_RAW_SET | _IMAGE_VECTOR_SET,
402+
extensions=_IMAGE_RASTER_SET | _IMAGE_RAW_SET | _IMAGE_VECTOR_SET,
398403
is_iana=True,
399404
)
400405
INSTALLER_TYPES: MediaCategory = MediaCategory(

tagstudio/src/qt/widgets/preview_panel.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -625,13 +625,7 @@ def update_widgets(self) -> bool:
625625
self.preview_gif.show()
626626

627627
image = None
628-
if (
629-
MediaCategories.is_ext_in_category(ext, MediaCategories.IMAGE_TYPES)
630-
and MediaCategories.is_ext_in_category(ext, MediaCategories.IMAGE_RAW_TYPES)
631-
and MediaCategories.is_ext_in_category(
632-
ext, MediaCategories.IMAGE_VECTOR_TYPES
633-
)
634-
):
628+
if MediaCategories.is_ext_in_category(ext, MediaCategories.IMAGE_RASTER_TYPES):
635629
image = Image.open(str(filepath))
636630
elif MediaCategories.is_ext_in_category(ext, MediaCategories.IMAGE_RAW_TYPES):
637631
try:
@@ -668,7 +662,7 @@ def update_widgets(self) -> bool:
668662
# Stats for specific file types are displayed here.
669663
if image and (
670664
MediaCategories.is_ext_in_category(
671-
ext, MediaCategories.IMAGE_TYPES, mime_fallback=True
665+
ext, MediaCategories.IMAGE_RASTER_TYPES, mime_fallback=True
672666
)
673667
or MediaCategories.is_ext_in_category(
674668
ext, MediaCategories.VIDEO_TYPES, mime_fallback=True

0 commit comments

Comments
 (0)