diff --git a/syncplay/client.py b/syncplay/client.py index 4a1d427..d439b7b 100644 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -210,7 +210,7 @@ class SyncplayClient(object): self._playerPosition = position self._playerPaused = paused currentLength = self.userlist.currentUser.file["duration"] if self.userlist.currentUser.file else 0 - if pauseChange and paused and currentLength > 10 and abs(position - currentLength ) < 5: + if pauseChange and paused and currentLength > constants.PLAYLIST_LOAD_NEXT_FILE_MINIMUM_LENGTH and abs(position - currentLength ) < constants.PLAYLIST_LOAD_NEXT_FILE_TIME_FROM_END_THRESHOLD: self.loadNextFileInPlaylist() elif pauseChange and utils.meetsMinVersion(self.serverVersion, constants.USER_READY_MIN_VERSION): pauseChange = self._toggleReady(pauseChange, paused) diff --git a/syncplay/constants.py b/syncplay/constants.py index b3eba57..869d9c9 100644 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -17,6 +17,8 @@ SHOW_TOOLTIPS = True WARN_ABOUT_MISSING_STRINGS = False # (If debug mode is enabled) FALLBACK_INITIAL_LANGUAGE = "en" FALLBACK_PUBLIC_SYNCPLAY_SERVERS = [[u'syncplay.pl:8995 (France)', u'syncplay.pl:8995'],[u'syncplay.pl:8996 (France)', u'syncplay.pl:8996'],[u'syncplay.pl:8997 (France)', u'syncplay.pl:8997'],[u'syncplay.pl:8998 (France)', u'syncplay.pl:8998'],[u'syncplay.pl:8999 (France)', u'syncplay.pl:8999']] +PLAYLIST_LOAD_NEXT_FILE_MINIMUM_LENGTH = 10 # Seconds +PLAYLIST_LOAD_NEXT_FILE_TIME_FROM_END_THRESHOLD = 5 # Seconds (only triggered if file is paused, e.g. due to EOF) #Overriden by config SHOW_OSD = True # Sends Syncplay messages to media player OSD