From e11da0e96372bb04bf1f512ccb90e601e950fd0f Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 6 May 2011 02:43:54 -0400 Subject: [PATCH] Hash tag back. Garbage collection. --- scanner/PhotoAlbum.py | 2 ++ web/js/010-debugger.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scanner/PhotoAlbum.py b/scanner/PhotoAlbum.py index 023158f..4fd9f0d 100644 --- a/scanner/PhotoAlbum.py +++ b/scanner/PhotoAlbum.py @@ -4,6 +4,7 @@ import json import os.path from PIL import Image from PIL.ExifTags import TAGS +import gc class Album(object): def __init__(self, path): @@ -127,6 +128,7 @@ class Photo(object): pass self._attributes[decoded] = value def _thumbnail(self, image, thumb_path, size, square=False): + gc.collect() thumb_path = os.path.join(thumb_path, image_cache(self._path, size, square)) print "Thumbing %s" % thumb_path if os.path.exists(thumb_path) and file_mtime(thumb_path) >= self._attributes["DateTimeFile"]: diff --git a/web/js/010-debugger.js b/web/js/010-debugger.js index 8af0305..ecac65a 100644 --- a/web/js/010-debugger.js +++ b/web/js/010-debugger.js @@ -66,7 +66,7 @@ $(document).ready(function() { $(document.body).html("Wrong picture."); return; } - $("#photo").html(""); + $("#photo").html(""); $("#album").fadeOut(); $("#photo").fadeIn(); }