plugin file: 'size' key is not added anymore in progress'data if size is 0 or not specified in SatFile

This commit is contained in:
Goffi 2015-11-15 23:11:38 +01:00
commit b419399ba2

View file

@ -97,7 +97,10 @@ class SatFile(object):
return self._file.tell()
def getProgress(self, progress_id, profile):
return {'position': self._file.tell(), 'size': self.size or -1}
ret = {'position': self._file.tell()}
if self.size:
ret['size'] = self.size
return ret
class FilePlugin(object):