diff --git a/README b/README index beb1e55..4f910e9 100644 --- a/README +++ b/README @@ -1,6 +1,10 @@ In here we can put instructions on how to run this / any general info + +ubuntu packages: + sudo apt-get install -y mediainfo + pip packages: * pymediainfo * PIL (should be there by default) - * \ No newline at end of file + * diff --git a/photos.py b/photos.py index 43e1661..032d6b6 100644 --- a/photos.py +++ b/photos.py @@ -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 diff --git a/templates/photos.html b/templates/photos.html index 6e1c99b..5ca9703 100644 --- a/templates/photos.html +++ b/templates/photos.html @@ -16,6 +16,9 @@ {% endif %}  {{obj.name}} + {% if obj.type=="Image" %} + + {% endif %} {{obj.size_MB}}{{obj.hash}} {% endfor %}