[pitivi] medialibrary: Force quoting URIs right before computing the thumbnail hash



commit 4c10b27b4cd1b90a53b7760bf0907419226c8725
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date:   Tue Jan 22 17:14:03 2013 -0500

    medialibrary: Force quoting URIs right before computing the thumbnail hash
    
    This prevents a case where the URI provided by GES in a project file
    would not match what the f.d.o. thumbnail spec requires.

 pitivi/medialibrary.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index 3c55a76..fe1977c 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -46,7 +46,7 @@ from pitivi.mediafilespreviewer import PreviewWidget
 from pitivi.dialogs.filelisterrordialog import FileListErrorDialog
 from pitivi.dialogs.clipmediaprops import clipmediapropsDialog
 from pitivi.utils.ui import beautify_length
-from pitivi.utils.misc import PathWalker
+from pitivi.utils.misc import PathWalker, quote_uri
 from pitivi.utils.signal import SignalGroup
 from pitivi.utils.loggable import Loggable
 import pitivi.utils.ui as dnd
@@ -533,7 +533,7 @@ class MediaLibraryWidget(Gtk.VBox, Loggable):
             # $XDG_CACHE_HOME/thumbnails will be used, otherwise
             # $HOME/.cache/thumbnails will be used."
             # Older version of the spec also mentioned $HOME/.thumbnails
-            thumbnail_hash = md5(info.get_uri()).hexdigest()
+            thumbnail_hash = md5(quote_uri(info.get_uri())).hexdigest()
             try:
                 thumb_dir = os.environ['XDG_CACHE_HOME']
                 thumbnail, thumbnail_large = self._getThumbnailInDir(thumb_dir, thumbnail_hash)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]