removed debugs, added medainfo library to README for installation, added first-pass of thumbnauil, but no code for the actual thumbnail data yet

This commit is contained in:
2021-01-10 17:49:12 +11:00
parent 6807e44228
commit 2e4aec7772
3 changed files with 9 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""):
@@ -78,7 +77,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() )
@@ -87,7 +85,6 @@ def isImage(file):
img = Image.open(file)
return True
except:
print('not an image')
return False
def isVideo(file):
@@ -97,5 +94,5 @@ def isVideo(file):
if track.track_type == "Video":
return True
return False
except:
except Exception as e:
return False