[pitivi] Use urlsafe_b64encode to generate thumbnail names.
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi] Use urlsafe_b64encode to generate thumbnail names.
- Date: Thu, 30 Apr 2009 12:18:40 -0400 (EDT)
commit aa962042a623643bda275270445c7eddb644260b
Author: Alessandro Decina <alessandro d gmail com>
Date: Mon Apr 27 17:42:54 2009 +0200
Use urlsafe_b64encode to generate thumbnail names.
Fixes #576872.
---
pitivi/discoverer.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/pitivi/discoverer.py b/pitivi/discoverer.py
index 1c3752d..d798aeb 100644
--- a/pitivi/discoverer.py
+++ b/pitivi/discoverer.py
@@ -32,6 +32,7 @@ gobject.threads_init()
import gst
import gst.pbutils
import tempfile
+from base64 import urlsafe_b64encode
from pitivi.log.loggable import Loggable
from pitivi.factories.file import FileSourceFactory, PictureFileSourceFactory
@@ -390,7 +391,7 @@ class Discoverer(object, Signallable, Loggable):
def _getThumbnailFilenameFromPad(self, pad):
tmp = tempfile.gettempdir()
name = '%s.%s' % (self.current_uri, pad.get_name())
- name = name.encode('base64').replace('\n', '') + '.png'
+ name = urlsafe_b64encode(name) + '.png'
filename = os.path.join(tmp, name)
return filename
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]