Skip to content

Commit

Permalink
Use raw filename for MAL updates (not hashed/masked), but give warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Et0h committed Nov 8, 2013
1 parent 52a44b9 commit 48169b6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion syncplay/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def __init__(self, playerClass, ui, config):
self.userlist = SyncplayUserlist(self.ui, self)
self._protocol = None
self._player = None
self.givenmalprivacywarning = False
if(config['room'] == None or config['room'] == ''):
config['room'] = config['name'] # ticket #58
self.defaultRoom = config['room']
Expand Down Expand Up @@ -300,10 +301,16 @@ def updateFile(self, filename, duration, path):
size = os.path.getsize(path)
except OSError: #file not accessible (stream?)
size = 0
rawfilename = filename
filename, size = self.__executePrivacySettings(filename, size)
self.userlist.currentUser.setFile(filename, duration, size)
self.sendFile()
self._malUpdater.fileChangeHook(filename, duration)
self._malUpdater.fileChangeHook(rawfilename, duration)
if filename <> rawfilename and self.givenmalprivacywarning == False:
message = getMessage("en", "mal-noprivacy-notification")
self.ui.showErrorMessage(message)
self.givenmalprivacywarning = True


def __executePrivacySettings(self, filename, size):
if (self._config['filenamePrivacyMode'] == PRIVACY_SENDHASHED_MODE):
Expand Down

0 comments on commit 48169b6

Please sign in to comment.