Merge branch 'master' of mara.ddp.net:photoassistant

This commit is contained in:
2021-01-10 17:50:54 +11:00
3 changed files with 10 additions and 5 deletions

View File

@@ -21,7 +21,6 @@ from settings import Settings
# Utility Functions for Files
################################################################################
def md5(fname):
print("Trying to MD5 - {}".format(fname))
hash_md5 = hashlib.md5()
with open(fname, "rb") as f:
for chunk in iter(lambda: f.read(4096), b""):
@@ -79,7 +78,6 @@ def photos():
fsize = round(os.stat(file).st_size/(1024*1024))
view_list.append( Photos( name=file, type=ftype, size_MB=fsize, hash=fhash ))
print(file_list)
return render_template("photos.html", page_title='View Photos', view_path=view_path, file_list=view_list, alert=st.GetAlert(), message=st.GetMessage() )
@@ -88,7 +86,6 @@ def isImage(file):
img = Image.open(file)
return True
except:
print('not an image')
return False
def isVideo(file):
@@ -98,5 +95,5 @@ def isVideo(file):
if track.track_type == "Video":
return True
return False
except:
except Exception as e:
return False