diff --git a/docs/changelog.md b/docs/changelog.md
index 10404985..5f8935c2 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -11,7 +11,7 @@ title: Changelog
### misc
-* thanks to a user, we now have Krita (.kra, .krz) support! it even pulls thumbnails]
+* thanks to a user, we now have Krita (.kra, .krz) support! it even pulls thumbnails!
* thanks to another user, we now have SVG (.svg) support! it even generates thumbnails!
* I think I fixed a comparison statement calculator divide-by-zero error in the duplicate filter when you compare a file with a resolution with a file without one
diff --git a/docs/old_changelog.html b/docs/old_changelog.html
index 3eea789a..7eb85c64 100644
--- a/docs/old_changelog.html
+++ b/docs/old_changelog.html
@@ -38,7 +38,7 @@
misc
- - thanks to a user, we now have Krita (.kra, .krz) support! it even pulls thumbnails]
+ - thanks to a user, we now have Krita (.kra, .krz) support! it even pulls thumbnails!
- thanks to another user, we now have SVG (.svg) support! it even generates thumbnails!
- I think I fixed a comparison statement calculator divide-by-zero error in the duplicate filter when you compare a file with a resolution with a file without one
petitions overview
diff --git a/hydrus/core/HydrusFileHandling.py b/hydrus/core/HydrusFileHandling.py
index c2480eb3..79ba7d3c 100644
--- a/hydrus/core/HydrusFileHandling.py
+++ b/hydrus/core/HydrusFileHandling.py
@@ -5,7 +5,18 @@ import struct
from hydrus.core import HydrusAudioHandling
from hydrus.core import HydrusClipHandling
from hydrus.core import HydrusKritaHandling
-from hydrus.core import HydrusSVGHandling
+
+try:
+
+ from hydrus.core import HydrusSVGHandling
+
+ SVG_OK = True
+
+except:
+
+ SVG_OK = False
+
+
from hydrus.core import HydrusConstants as HC
from hydrus.core import HydrusData
from hydrus.core import HydrusDocumentHandling
@@ -184,6 +195,11 @@ def GenerateThumbnailBytes( path, target_resolution, mime, duration, num_frames,
try:
+ if not SVG_OK:
+
+ raise Exception( 'No SVG thumbs' )
+
+
thumbnail_bytes = HydrusSVGHandling.GenerateThumbnailBytesFromSVGPath( path, target_resolution, clip_rect = clip_rect )
except Exception as e:
@@ -360,11 +376,14 @@ def GetFileInfo( path, mime = None, ok_to_look_for_hydrus_updates = False ):
elif mime == HC.APPLICATION_KRITA:
( width, height ) = HydrusKritaHandling.GetKraProperties( path )
-
+
elif mime == HC.IMAGE_SVG:
-
- ( width, height ) = HydrusSVGHandling.GetSVGResolution( path )
-
+
+ if SVG_OK:
+
+ ( width, height ) = HydrusSVGHandling.GetSVGResolution( path )
+
+
elif mime == HC.APPLICATION_FLASH:
( ( width, height ), duration, num_frames ) = HydrusFlashHandling.GetFlashProperties( path )