mirror of
https://github.com/Syncplay/syncplay
synced 2024-12-15 03:15:17 +00:00
Don't wipe password when joining public server (but only send passwords to private servers)
This commit is contained in:
parent
cdbc6ac7c7
commit
70e7ff291e
@ -1,4 +1,4 @@
|
||||
version = '1.5.0'
|
||||
milestone = 'Yoitsu'
|
||||
release_number = '40'
|
||||
release_number = '41'
|
||||
projectURL = 'http://syncplay.pl/'
|
||||
|
@ -92,6 +92,8 @@ class SyncplayClient(object):
|
||||
if config['password']:
|
||||
config['password'] = hashlib.md5(config['password']).hexdigest()
|
||||
self._serverPassword = config['password']
|
||||
self._host = u"{}:{}".format(config['host'],config['port'])
|
||||
self._publicServers = config["publicServers"]
|
||||
if not config['file']:
|
||||
self.__getUserlistOnLogon = True
|
||||
else:
|
||||
@ -634,7 +636,20 @@ class SyncplayClient(object):
|
||||
self.userlist.showUserList()
|
||||
|
||||
def getPassword(self):
|
||||
return self._serverPassword
|
||||
if self.thisIsPublicServer():
|
||||
return ""
|
||||
else:
|
||||
return self._serverPassword
|
||||
|
||||
def thisIsPublicServer(self):
|
||||
self._publicServers = []
|
||||
if self._publicServers and self._host in self._publicServers:
|
||||
return True
|
||||
i = 0
|
||||
for server in constants.FALLBACK_PUBLIC_SYNCPLAY_SERVERS:
|
||||
if server[1] == self._host:
|
||||
return True
|
||||
i += 1
|
||||
|
||||
def setPosition(self, position):
|
||||
if self._lastPlayerUpdate:
|
||||
|
@ -62,7 +62,8 @@ class ConfigurationGetter(object):
|
||||
"showSameRoomOSD" : True,
|
||||
"showNonControllerOSD" : False,
|
||||
"showContactInfo" : True,
|
||||
"showDurationNotification" : True
|
||||
"showDurationNotification" : True,
|
||||
"publicServers" : []
|
||||
}
|
||||
|
||||
self._defaultConfig = self._config.copy()
|
||||
@ -115,6 +116,7 @@ class ConfigurationGetter(object):
|
||||
"perPlayerArguments",
|
||||
"mediaSearchDirectories",
|
||||
"trustedDomains",
|
||||
"publicServers",
|
||||
]
|
||||
|
||||
self._numeric = [
|
||||
@ -137,7 +139,7 @@ class ConfigurationGetter(object):
|
||||
"autoplayInitialState", "mediaSearchDirectories",
|
||||
"sharedPlaylistEnabled", "loopAtEndOfPlaylist",
|
||||
"loopSingleFiles",
|
||||
"onlySwitchToTrustedDomains", "trustedDomains"],
|
||||
"onlySwitchToTrustedDomains", "trustedDomains","publicServers"],
|
||||
"gui": ["showOSD", "showOSDWarnings", "showSlowdownOSD",
|
||||
"showDifferentRoomOSD", "showSameRoomOSD",
|
||||
"showNonControllerOSD", "showDurationNotification"],
|
||||
|
@ -396,6 +396,7 @@ class ConfigDialog(QtGui.QDialog):
|
||||
self.config['file'] = os.path.abspath(self.mediapathTextbox.text())
|
||||
else:
|
||||
self.config['file'] = unicode(self.mediapathTextbox.text())
|
||||
self.config['publicServers'] = self.publicServerAddresses
|
||||
|
||||
self.pressedclosebutton = False
|
||||
self.close()
|
||||
@ -1053,7 +1054,6 @@ class ConfigDialog(QtGui.QDialog):
|
||||
if (self.hostCombobox.currentText() == "" and self.serverpassTextbox.text() == "") or unicode(self.hostCombobox.currentText()) in self.publicServerAddresses:
|
||||
self.serverpassLabel.hide()
|
||||
self.serverpassTextbox.hide()
|
||||
self.serverpassTextbox.setText("")
|
||||
else:
|
||||
self.serverpassLabel.show()
|
||||
self.serverpassTextbox.show()
|
||||
|
Loading…
Reference in New Issue
Block a user