[gnome-music/wip/merge: 274/343] albumArtCache: update regexps for brackets
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/merge: 274/343] albumArtCache: update regexps for brackets
- Date: Thu, 25 Jul 2013 11:35:40 +0000 (UTC)
commit abc3ed634f65b9045d8245a9f36b4a4a189d252f
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Thu Jul 18 17:55:38 2013 +0200
albumArtCache: update regexps for brackets
gnomemusic/albumArtCache.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gnomemusic/albumArtCache.py b/gnomemusic/albumArtCache.py
index c5e0528..b93c588 100644
--- a/gnomemusic/albumArtCache.py
+++ b/gnomemusic/albumArtCache.py
@@ -12,10 +12,10 @@ class AlbumArtCache:
instance = None
degrees = pi / 180
- brackets = re.compile('\[*?.*?]\}', re.DOTALL)
- curly_brackets = re.compile('\{*?.*?\}', re.DOTALL)
- angle_brackets = re.compile('\<*?.*?\>', re.DOTALL)
- parentheses = re.compile('\(*?.*?\)', re.DOTALL)
+ brackets = re.compile('\[(.*?)\]', re.DOTALL)
+ curly_brackets = re.compile('\{(.*?)\}', re.DOTALL)
+ angle_brackets = re.compile('\<(.*?)\>', re.DOTALL)
+ parentheses = re.compile('\((.*?)\)', re.DOTALL)
@classmethod
def get_default(self):
@@ -240,7 +240,7 @@ class AlbumArtCache:
string = self.angle_brackets.sub('', string)
string = self.parentheses.sub('', string)
# Strip invalid chars
- return string.strip('_! #$^&*+=|\\\/\"\'?~')
+ return string.strip('_! #$^&*+=|\\\/\"\'?~').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]