From 66876301315a10eddeb2522af0ec8e376d046428 Mon Sep 17 00:00:00 2001 From: Etoh Date: Tue, 2 Jul 2013 00:35:28 +0100 Subject: [PATCH] Make duration difference an absolute value so threshold check always works --- syncplay/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncplay/client.py b/syncplay/client.py index 4958cb0..5db91bd 100644 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -430,7 +430,7 @@ class SyncplayUser(object): return False sameName = stripfilename(self.file['name']) == stripfilename(file_['name']) sameSize = self.file['size'] == file_['size'] - sameDuration = int(self.file['duration']) - int(file_['duration']) < constants.DIFFFERENT_DURATION_THRESHOLD + sameDuration = abs(int(self.file['duration']) - int(file_['duration'])) < constants.DIFFFERENT_DURATION_THRESHOLD return sameName and sameSize and sameDuration def __lt__(self, other):