Author: duncan
Date: Sat Dec 30 17:10:26 2006
New Revision: 8874

Modified:
   branches/rel-1/freevo/ChangeLog
   branches/rel-1/freevo/freevo_config.py
   branches/rel-1/freevo/local_conf.py.example
   branches/rel-1/freevo/src/directory.py

Log:
[ 1602952 ] Ability to disable Freevo's smart grouping (with patch)
Patch, modified, from Ryan Roth applied


Modified: branches/rel-1/freevo/ChangeLog
==============================================================================
--- branches/rel-1/freevo/ChangeLog     (original)
+++ branches/rel-1/freevo/ChangeLog     Sat Dec 30 17:10:26 2006
@@ -31,9 +31,10 @@
  * New Shuttle VFD plug-in (F#1619761)
  * New XM online plugin (F#1580412)
  * New weather helper to grab the weather using cron (F#1603052)
- * New webserver library, allows playing/viewing on local and host machines 
(F#1592806)
+ * New webserver library, allows playing/viewing on your local machine 
(F#1592806)
  * New webserver remote, allows controlling freevo from a web page (F#1624110)
  * Updated cdbackup plug-in to accept CD_RIP_CASE and CD_RIP_REPLACE_SPACE 
(F#1616046)
+ * Updated directory configuration to allow disabling of smart abbreviated 
item names (F#1602952)
  * Updated idlebar clock plug-in to allow CLOCK_FORMAT to be used (F#1605951)
  * Updated idlebar diskfree plug-in to allow the bar colours levels to be set 
(F#1605953)
  * Updated DEBUGGING, IP, PORT, UID and GUI based on helper name (F#1580628)

Modified: branches/rel-1/freevo/freevo_config.py
==============================================================================
--- branches/rel-1/freevo/freevo_config.py      (original)
+++ branches/rel-1/freevo/freevo_config.py      Sat Dec 30 17:10:26 2006
@@ -818,6 +818,12 @@
 DIRECTORY_SMART_SORT = 0
 
 #
+# Should files in directories have smart names?
+# This removes the first part of the names when identical
+#
+DIRECTORY_SMART_NAMES = 1
+
+#
 # Should Freevo autoplay an item if only one item is in the directory?
 #
 DIRECTORY_AUTOPLAY_SINGLE_ITEM = 1

Modified: branches/rel-1/freevo/local_conf.py.example
==============================================================================
--- branches/rel-1/freevo/local_conf.py.example (original)
+++ branches/rel-1/freevo/local_conf.py.example Sat Dec 30 17:10:26 2006
@@ -486,6 +486,12 @@
 # DIRECTORY_SMART_SORT = 0
 
 #
+# Should files in directories have smart names?
+# This removes the first part of the names when identical
+#
+# DIRECTORY_SMART_NAMES = 1
+
+#
 # Should Freevo autoplay an item if only one item is in the directory?
 #
 # DIRECTORY_AUTOPLAY_SINGLE_ITEM = 1

Modified: branches/rel-1/freevo/src/directory.py
==============================================================================
--- branches/rel-1/freevo/src/directory.py      (original)
+++ branches/rel-1/freevo/src/directory.py      Sat Dec 30 17:10:26 2006
@@ -66,6 +66,9 @@
                  ('DIRECTORY_SMART_SORT', _('Directory Smart Sort'),
                   _('Use a smarter way to sort the items.'), False),
 
+                 ('DIRECTORY_SMART_NAMES', _('Directory Smart Names'),
+                  _('Use a smarter way to abbreviate the name of the items.'), 
True),
+
                  ('DIRECTORY_USE_MEDIAID_TAG_NAMES', _('Use MediaID Tag 
Names'),
                   _('Use the names from the media files tags as display 
name.'), False),
 
@@ -642,19 +645,20 @@
                 self.dir_items.append(d)
 
         # remove same beginning from all play_items
-        substr = ''
-        if len(self.play_items) > 4 and len(self.play_items[0].name) > 5:
-            substr = self.play_items[0].name[:-5].lower()
-            for i in self.play_items[1:]:
-                if len(i.name) > 5:
-                    substr = util.find_start_string(i.name.lower(), substr)
-                    if not substr or len(substr) < 10:
+        if self.DIRECTORY_SMART_NAMES:
+            substr = ''
+            if len(self.play_items) > 4 and len(self.play_items[0].name) > 5:
+                substr = self.play_items[0].name[:-5].lower()
+                for i in self.play_items[1:]:
+                    if len(i.name) > 5:
+                        substr = util.find_start_string(i.name.lower(), substr)
+                        if not substr or len(substr) < 10:
+                            break
+                    else:
                         break
                 else:
-                    break
-            else:
-                for i in self.play_items:
-                    i.name = util.remove_start_string(i.name, substr)
+                    for i in self.play_items:
+                        i.name = util.remove_start_string(i.name, substr)
         
         #
         # sort all items

-------------------------------------------------------------------------
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