This commit is contained in:
DiMartinoXBMC committed 2015-08-03 22:56:30 +03:00
1 parent 39783a1c8a
commit 5fc39a7c13
2 files changed
+63 -59

No files matched your search

+5 -1
View File
@@ -446,7 +446,11 @@ class AbstractFile(object):
if not self._rate:
d = self.duration
if d:
self._rate = self.size / d.total_seconds()
if hasattr(d, 'total_seconds'):
total_seconds=d.total_seconds()
else:
total_seconds=(d.microseconds + (d.seconds + d.days * 24 * 3600) * 10**6) / 10**6
self._rate = self.size / total_seconds
return self._rate
def __str__(self):