client.py sameDuration check: round for formatTime consistency

This commit is contained in:
Etoh 2013-07-19 11:04:23 +01:00
parent 9cf76b28fc
commit 27d6be217c

View File

@ -430,7 +430,7 @@ class SyncplayUser(object):
return False
sameName = stripfilename(self.file['name']) == stripfilename(file_['name'])
sameSize = self.file['size'] == file_['size']
sameDuration = abs(int(self.file['duration']) - int(file_['duration'])) < constants.DIFFFERENT_DURATION_THRESHOLD
sameDuration = abs(round(self.file['duration']) - round(file_['duration'])) < constants.DIFFFERENT_DURATION_THRESHOLD
return sameName and sameSize and sameDuration
def __lt__(self, other):