[gnome-music/wip/merge: 276/343] albumArtCache: remove double spaces
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/merge: 276/343] albumArtCache: remove double spaces
- Date: Thu, 25 Jul 2013 11:35:50 +0000 (UTC)
commit 21132b70840dcfa29844d9e782a8a01dcf1a5cd7
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Thu Jul 18 19:53:25 2013 +0200
albumArtCache: remove double spaces
gnomemusic/albumArtCache.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/albumArtCache.py b/gnomemusic/albumArtCache.py
index b93c588..ad6e6e1 100644
--- a/gnomemusic/albumArtCache.py
+++ b/gnomemusic/albumArtCache.py
@@ -240,7 +240,11 @@ class AlbumArtCache:
string = self.angle_brackets.sub('', string)
string = self.parentheses.sub('', string)
# Strip invalid chars
- return string.strip('_! #$^&*+=|\\\/\"\'?~').strip().lower()
+ string = string.strip('_! #$^&*+=|\\\/\"\'?~')
+ # Remove double spaces
+ string = string.replace(' ', ' ')
+ # Remove trailing spaces and convert to lowercase
+ return string.strip().lower()
def get_from_uri(self, uri, artist, album, width, height, callback):
if not uri:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]