Author: duncan
Date: Sat Dec 30 00:58:52 2006
New Revision: 8865
Modified:
branches/rel-1/freevo/src/video/videoitem.py
Log:
total should be a number not a string
Modified: branches/rel-1/freevo/src/video/videoitem.py
==============================================================================
--- branches/rel-1/freevo/src/video/videoitem.py (original)
+++ branches/rel-1/freevo/src/video/videoitem.py Sat Dec 30 00:58:52 2006
@@ -218,13 +218,13 @@
return aspect
if key == 'runtime':
- total = ''
+ total = 0
if self.info['runtime']:
-
length = self.info['runtime']
-
- if length.find('min') == -1:
+ if not length:
+ length = ''
+ if length.find('min') > 0:
length = '%s min' % length
if length.find('/') > 0:
length = length[:length.find('/')].rstrip()
@@ -232,11 +232,9 @@
length = length[length.find(':')+1:]
if length == '0 min':
length = ''
-
total = length
elif self.subitems:
- total = 0
for s in self.subitems:
if s.info['length']:
length = s.info['length']
@@ -248,16 +246,13 @@
total += length
except ValueError, TypeError:
pass
-
total = "%s min" % str(int(total / 60))
else:
-
if self.info['length']:
total = self.info['length']
elif hasattr(self, 'length'):
total = self.length
-
total = "%s min" % str(int(total / 60))
return total
-------------------------------------------------------------------------
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