Author: duncan
Date: Fri Dec 15 11:20:34 2006
New Revision: 8730

Modified:
   branches/rel-1/freevo/src/audio/plugins/cdbackup.py

Log:
Corrected an error when CD_RIP_CASE is the default None


Modified: branches/rel-1/freevo/src/audio/plugins/cdbackup.py
==============================================================================
--- branches/rel-1/freevo/src/audio/plugins/cdbackup.py (original)
+++ branches/rel-1/freevo/src/audio/plugins/cdbackup.py Fri Dec 15 11:20:34 2006
@@ -287,18 +287,19 @@
                                  'album': album,
                                  'genre': genre }
 
-        if config.CD_RIP_CASE.lower() == 'lower':
-            user_rip_path_prefs['artist'] = 
user_rip_path_prefs['artist'].lower()
-            user_rip_path_prefs['album'] = user_rip_path_prefs['album'].lower()
-            user_rip_path_prefs['genre'] = user_rip_path_prefs['genre'].lower()
-        elif config.CD_RIP_CASE.lower() == 'upper':
-            user_rip_path_prefs['artist'] = 
user_rip_path_prefs['artist'].upper()
-            user_rip_path_prefs['album'] = user_rip_path_prefs['album'].upper()
-            user_rip_path_prefs['genre'] = user_rip_path_prefs['genre'].upper()
-        elif config.CD_RIP_CASE.lower() == 'title':
-            user_rip_path_prefs['artist'] = 
user_rip_path_prefs['artist'].title()
-            user_rip_path_prefs['album'] = user_rip_path_prefs['album'].title()
-            user_rip_path_prefs['genre'] = user_rip_path_prefs['genre'].title()
+        if config.CD_RIP_CASE:
+            if config.CD_RIP_CASE.lower() == 'lower':
+                user_rip_path_prefs['artist'] = 
user_rip_path_prefs['artist'].lower()
+                user_rip_path_prefs['album'] = 
user_rip_path_prefs['album'].lower()
+                user_rip_path_prefs['genre'] = 
user_rip_path_prefs['genre'].lower()
+            elif config.CD_RIP_CASE.lower() == 'upper':
+                user_rip_path_prefs['artist'] = 
user_rip_path_prefs['artist'].upper()
+                user_rip_path_prefs['album'] = 
user_rip_path_prefs['album'].upper()
+                user_rip_path_prefs['genre'] = 
user_rip_path_prefs['genre'].upper()
+            elif config.CD_RIP_CASE.lower() == 'title':
+                user_rip_path_prefs['artist'] = 
user_rip_path_prefs['artist'].title()
+                user_rip_path_prefs['album'] = 
user_rip_path_prefs['album'].title()
+                user_rip_path_prefs['genre'] = 
user_rip_path_prefs['genre'].title()
 
         if config.CD_RIP_REPLACE_SPACE:
             user_rip_path_prefs['artist'] = 
user_rip_path_prefs['artist'].replace(' ', config.CD_RIP_REPLACE_SPACE)
@@ -368,12 +369,13 @@
 
             path_tail = path_tail_temp % user_rip_path_prefs
 
-            if config.CD_RIP_CASE.lower() == 'lower':
-                path_tail = path_tail.lower()
-            elif config.CD_RIP_CASE.lower() == 'upper':
-                path_tail = path_tail.upper()
-            elif config.CD_RIP_CASE.lower() == 'title':
-                path_tail = path_tail.title()
+            if config.CD_RIP_CASE:
+                if config.CD_RIP_CASE.lower() == 'lower':
+                    path_tail = path_tail.lower()
+                elif config.CD_RIP_CASE.lower() == 'upper':
+                    path_tail = path_tail.upper()
+                elif config.CD_RIP_CASE.lower() == 'title':
+                    path_tail = path_tail.title()
 
             if config.CD_RIP_REPLACE_SPACE:
                 path_tail = path_tail.replace(' ', config.CD_RIP_REPLACE_SPACE)

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to