Fix a couple issues with CBZ files (#1529)
* Set cbz resolution to None, None when it can't be determined * Don't consider the `__MACOSX` directory for cbz
This commit is contained in:
parent
832b90569c
commit
31211945d9
|
@ -45,6 +45,10 @@ def GetCoverPagePath( zip_handle: zipfile.ZipFile ):
|
|||
|
||||
for path in all_file_paths:
|
||||
|
||||
if path.startswith('__MACOSX/'):
|
||||
|
||||
continue
|
||||
|
||||
if '.' in path:
|
||||
|
||||
ext_with_dot = '.' + path.split( '.' )[-1]
|
||||
|
@ -161,6 +165,10 @@ def ZipLooksLikeCBZ( path_to_zip ):
|
|||
|
||||
filename = zip_info.filename
|
||||
|
||||
if filename.startswith('__MACOSX/'):
|
||||
|
||||
continue
|
||||
|
||||
if '/' in filename:
|
||||
|
||||
directory_path = '/'.join( filename.split( '/' )[:-1] )
|
||||
|
|
|
@ -484,7 +484,7 @@ def GetFileInfo( path, mime = None, ok_to_look_for_hydrus_updates = False ):
|
|||
|
||||
except:
|
||||
|
||||
( width, height ) = ( 100, 100 )
|
||||
( width, height ) = ( None, None )
|
||||
|
||||
finally:
|
||||
|
||||
|
|
Loading…
Reference in New Issue