mirror of
https://github.com/Syncplay/syncplay
synced 2025-01-31 19:21:36 +00:00
Better messages and list command
This commit is contained in:
parent
d6adeba3d5
commit
7b02de825f
@ -1,3 +1,3 @@
|
||||
version = '1.1.8'
|
||||
version = '1.1.9'
|
||||
milestone = 'Tequila'
|
||||
projectURL = 'http://uriziel.github.com/syncplay/'
|
@ -345,15 +345,15 @@ class SyncplayUserlist(object):
|
||||
if(self.currentUser.file and not self.currentUser.isFileSame(file_)):
|
||||
message = "File you are playing appears to be different from <{}>'s".format(username)
|
||||
self.ui.showMessage(message)
|
||||
differences = []
|
||||
if(self.currentUser.file['name'] <> file_['name']):
|
||||
message = "Filename is different"
|
||||
self.ui.showMessage(message)
|
||||
differences.append("filename")
|
||||
if(self.currentUser.file['size'] <> file_['size']):
|
||||
message = "Size is different"
|
||||
self.ui.showMessage(message)
|
||||
differences.append("size")
|
||||
if(self.currentUser.file['duration'] <> file_['duration']):
|
||||
message = "Duration is different"
|
||||
self.ui.showMessage(message)
|
||||
differences.append("duration")
|
||||
message = "Your file differs in the following way(s): " + ", ".join(differences)
|
||||
self.ui.showMessage(message)
|
||||
|
||||
def addUser(self, username, room, file_, noMessage = False):
|
||||
if(username == self.currentUser.username):
|
||||
@ -422,6 +422,8 @@ class SyncplayUserlist(object):
|
||||
self.ui.showMessage("File: {} is being played by:".format(key), True, True)
|
||||
for user in sorted(users.itervalues()):
|
||||
message = "<"+user.username+">"
|
||||
if(self.currentUser.username == user.username):
|
||||
message = "*" + message + "*"
|
||||
message = self.__addDifferentFileMessageIfNecessary(user, message)
|
||||
self.ui.showMessage("\t" + message, True, True)
|
||||
|
||||
|
@ -78,6 +78,8 @@ class ConsoleUI(threading.Thread):
|
||||
tmp_pos = self._syncplayClient.getPlayerPosition()
|
||||
self._syncplayClient.setPosition(self._syncplayClient.playerPositionBeforeLastSeek)
|
||||
self._syncplayClient.playerPositionBeforeLastSeek = tmp_pos
|
||||
elif data == "l":
|
||||
self._syncplayClient.userlist.showUserList()
|
||||
elif data == "p":
|
||||
self._syncplayClient.setPaused(not self._syncplayClient.getPlayerPaused())
|
||||
elif data == 'help':
|
||||
@ -85,6 +87,7 @@ class ConsoleUI(threading.Thread):
|
||||
self.showMessage("\thelp - this help", True)
|
||||
self.showMessage("\tr - revert last seek", True)
|
||||
self.showMessage("\tp - toggle pause", True)
|
||||
self.showMessage("\tl - show user list", True)
|
||||
self.showMessage("\troom [name] - change room", True)
|
||||
self.showMessage("\t[s][+-][time] - seek to the given value of time, if + or - is not specified it's absolute time in seconds or min:sec", True)
|
||||
self.showMessage("Syncplay version: {}".format(syncplay.version), True)
|
||||
|
Loading…
Reference in New Issue
Block a user