Add readyAtStart config option

This commit is contained in:
Et0h 2014-12-06 19:14:52 +00:00
parent 0a924ac299
commit ebeaa92724
4 changed files with 14 additions and 6 deletions

View File

@ -413,7 +413,7 @@ class SyncplayClient(object):
if self.userlist.currentUser.isReady() is not None: if self.userlist.currentUser.isReady() is not None:
self._protocol.setReady(self.userlist.currentUser.isReady()) self._protocol.setReady(self.userlist.currentUser.isReady())
else: else:
self._protocol.setReady(False) self._protocol.setReady(self._config['readyAtStart'])
self.reIdentifyAsController() self.reIdentifyAsController()
def getRoom(self): def getRoom(self):

View File

@ -156,6 +156,7 @@ en = {
"fastforwardondesync-label" : "Fast-forward if lagging behind (recommended)", "fastforwardondesync-label" : "Fast-forward if lagging behind (recommended)",
"dontslowdownwithme-label" : "Never slow down or rewind others (experimental)", "dontslowdownwithme-label" : "Never slow down or rewind others (experimental)",
"pauseonleave-label" : "Pause when user leaves (e.g. if they are disconnected)", "pauseonleave-label" : "Pause when user leaves (e.g. if they are disconnected)",
"readyatstart-label" : "Set me as 'ready to watch' by default",
"forceguiprompt-label" : "Don't always show this dialog", # (Inverted) "forceguiprompt-label" : "Don't always show this dialog", # (Inverted)
"nostore-label" : "Don't store this configuration", # (Inverted) "nostore-label" : "Don't store this configuration", # (Inverted)
"showosd-label" : "Enable OSD Messages", "showosd-label" : "Enable OSD Messages",
@ -250,6 +251,7 @@ en = {
"slowondesync-tooltip" : "Reduce playback rate temporarily when needed to bring you back in sync with other viewers. Not supported on MPC-HC.", "slowondesync-tooltip" : "Reduce playback rate temporarily when needed to bring you back in sync with other viewers. Not supported on MPC-HC.",
"dontslowdownwithme-tooltip" : "Means others do not get slowed down or rewinded if your playback is lagging. Useful for room controllers.", "dontslowdownwithme-tooltip" : "Means others do not get slowed down or rewinded if your playback is lagging. Useful for room controllers.",
"pauseonleave-tooltip" : "Pause playback if you get disconnected or someone leaves from your room.", "pauseonleave-tooltip" : "Pause playback if you get disconnected or someone leaves from your room.",
"readyatstart-tooltip" : "Set yourself as 'ready' at start (otherwise you are set as 'not ready' until you change your readiness state)",
"forceguiprompt-tooltip" : "Configuration dialogue is not shown when opening a file with Syncplay.", # (Inverted) "forceguiprompt-tooltip" : "Configuration dialogue is not shown when opening a file with Syncplay.", # (Inverted)
"nostore-tooltip" : "Run Syncplay with the given configuration, but do not permanently store the changes.", # (Inverted) "nostore-tooltip" : "Run Syncplay with the given configuration, but do not permanently store the changes.", # (Inverted)
"rewindondesync-tooltip" : "Jump back when needed to get back in sync. Disabling this option can result in major desyncs!", "rewindondesync-tooltip" : "Jump back when needed to get back in sync. Disabling this option can result in major desyncs!",

View File

@ -44,6 +44,7 @@ class ConfigurationGetter(object):
"filenamePrivacyMode": constants.PRIVACY_SENDRAW_MODE, "filenamePrivacyMode": constants.PRIVACY_SENDRAW_MODE,
"filesizePrivacyMode": constants.PRIVACY_SENDRAW_MODE, "filesizePrivacyMode": constants.PRIVACY_SENDRAW_MODE,
"pauseOnLeave": False, "pauseOnLeave": False,
"readyAtStart": False,
"clearGUIData": False, "clearGUIData": False,
"language" : "", "language" : "",
"resetConfig" : False, "resetConfig" : False,
@ -77,6 +78,7 @@ class ConfigurationGetter(object):
"noStore", "noStore",
"dontSlowDownWithMe", "dontSlowDownWithMe",
"pauseOnLeave", "pauseOnLeave",
"readyAtStart",
"clearGUIData", "clearGUIData",
"rewindOnDesync", "rewindOnDesync",
"slowOnDesync", "slowOnDesync",
@ -102,7 +104,7 @@ class ConfigurationGetter(object):
self._iniStructure = { self._iniStructure = {
"server_data": ["host", "port", "password"], "server_data": ["host", "port", "password"],
"client_settings": ["name", "room", "playerPath", "slowdownThreshold", "rewindThreshold", "fastforwardThreshold", "slowOnDesync", "rewindOnDesync", "fastforwardOnDesync", "dontSlowDownWithMe", "forceGuiPrompt", "filenamePrivacyMode", "filesizePrivacyMode", "pauseOnLeave"], "client_settings": ["name", "room", "playerPath", "slowdownThreshold", "rewindThreshold", "fastforwardThreshold", "slowOnDesync", "rewindOnDesync", "fastforwardOnDesync", "dontSlowDownWithMe", "forceGuiPrompt", "filenamePrivacyMode", "filesizePrivacyMode", "pauseOnLeave", "readyAtStart"],
"gui": ["showOSD", "showOSDWarnings", "showSlowdownOSD", "showDifferentRoomOSD", "showSameRoomOSD", "showNonControllerOSD", "showContactInfo" , "showDurationNotification"], "gui": ["showOSD", "showOSDWarnings", "showSlowdownOSD", "showDifferentRoomOSD", "showSameRoomOSD", "showNonControllerOSD", "showContactInfo" , "showDurationNotification"],
"general": ["language"] "general": ["language"]
} }

View File

@ -545,17 +545,21 @@ class ConfigDialog(QtGui.QDialog):
self.othersyncSettingsLayout.addWidget(self.pauseonleaveCheckbox, 1, 0, 1, 2, Qt.AlignLeft) self.othersyncSettingsLayout.addWidget(self.pauseonleaveCheckbox, 1, 0, 1, 2, Qt.AlignLeft)
self.pauseonleaveCheckbox.setObjectName("pauseOnLeave") self.pauseonleaveCheckbox.setObjectName("pauseOnLeave")
self.readyatstartCheckbox = QCheckBox(getMessage("readyatstart-label"))
self.othersyncSettingsLayout.addWidget(self.readyatstartCheckbox, 2, 0, 1, 2, Qt.AlignLeft)
self.readyatstartCheckbox.setObjectName("readyAtStart")
self.dontslowwithmeCheckbox = QCheckBox(getMessage("dontslowdownwithme-label")) self.dontslowwithmeCheckbox = QCheckBox(getMessage("dontslowdownwithme-label"))
self.dontslowwithmeCheckbox.setObjectName("dontSlowDownWithMe") self.dontslowwithmeCheckbox.setObjectName("dontSlowDownWithMe")
self.othersyncSettingsLayout.addWidget(self.dontslowwithmeCheckbox, 2, 0, 1, 2, Qt.AlignLeft) self.othersyncSettingsLayout.addWidget(self.dontslowwithmeCheckbox, 3, 0, 1, 2, Qt.AlignLeft)
self.fastforwardThresholdLabel.setObjectName("fastforward-threshold") self.fastforwardThresholdLabel.setObjectName("fastforward-threshold")
self.fastforwardThresholdSpinbox.setObjectName("fastforward-threshold") self.fastforwardThresholdSpinbox.setObjectName("fastforward-threshold")
self.othersyncSettingsLayout.addWidget(self.fastforwardCheckbox, 3, 0,1,2, Qt.AlignLeft) self.othersyncSettingsLayout.addWidget(self.fastforwardCheckbox, 4, 0,1,2, Qt.AlignLeft)
self.othersyncSettingsLayout.addWidget(self.fastforwardThresholdLabel, 4, 0, 1, 1, Qt.AlignLeft) self.othersyncSettingsLayout.addWidget(self.fastforwardThresholdLabel, 5, 0, 1, 1, Qt.AlignLeft)
self.othersyncSettingsLayout.addWidget(self.fastforwardThresholdSpinbox, 4, 1, Qt.AlignLeft) self.othersyncSettingsLayout.addWidget(self.fastforwardThresholdSpinbox, 5, 1, Qt.AlignLeft)
self.subitems['fastforwardOnDesync'] = ["fastforward-threshold"] self.subitems['fastforwardOnDesync'] = ["fastforward-threshold"]
self.othersyncSettingsGroup.setLayout(self.othersyncSettingsLayout) self.othersyncSettingsGroup.setLayout(self.othersyncSettingsLayout)