Author: dmeyer
Date: Thu Feb 15 11:50:31 2007
New Revision: 2489

Modified:
   trunk/beacon/src/item.py
   trunk/beacon/src/utils.py

Log:
do not strip ext for dirs (patch by Harm Geerts)

Modified: trunk/beacon/src/item.py
==============================================================================
--- trunk/beacon/src/item.py    (original)
+++ trunk/beacon/src/item.py    Thu Feb 15 11:50:31 2007
@@ -130,7 +130,7 @@
             t = self._beacon_data.get('title')
             if t:
                 return t
-            return str_to_unicode(get_title(self._beacon_data['name']))
+            return str_to_unicode(get_title(self._beacon_data['name'], 
self.isfile()))
 
         if request and not self._beacon_id:
             log.info('requesting data for %s', self)

Modified: trunk/beacon/src/utils.py
==============================================================================
--- trunk/beacon/src/utils.py   (original)
+++ trunk/beacon/src/utils.py   Thu Feb 15 11:50:31 2007
@@ -55,14 +55,14 @@
     return result
 
 
-def get_title(name):
+def get_title(name, strip=True):
     """
     Convert name into a nice title
     """
     if len(name) < 2:
         return name
 
-    if name.find('.') > 0 and not name.endswith('.'):
+    if strip and name.find('.') > 0 and not name.endswith('.'):
         name = name[:name.rfind('.')]
 
     # TODO: take more hints

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