Syncplay / syncplay

Client/server to synchronize media playback on mpv/VLC/MPC-HC/MPC-BE on many computers
http://syncplay.pl/
Apache License 2.0
2.17k stars 215 forks source link

Syncplay server no longer works with --password option #200

Closed crabdancing closed 6 years ago

crabdancing commented 6 years ago

Syncplay server exits with TypeError when I try to start it with --password option.

[syncplay@caesium ~]$ /usr/bin/syncplay-server --port [REDACTED] --password [REDACTED]                          
Welcome to Syncplay server, ver. 1.5.6
Traceback (most recent call last):
  File "/usr/bin/syncplay-server", line 36, in <module>
    args.stats_db_file))
  File "/usr/lib/syncplay/syncplay/server.py", line 28, in __init__
    password = hashlib.md5(password).hexdigest()
TypeError: Unicode-objects must be encoded before hashing

I fixed the code by adding password = password.encode('utf-8') before line 28 in server.py. Some similar modification should be made to fix this regression. :wink:

Et0h commented 6 years ago

Your suggested fix has now been implemented. Thank you for flying with Syncplay :)