From b031df2cdb26709a9b2f21ed7323dac5b9c3899b Mon Sep 17 00:00:00 2001 From: Etoh Date: Sat, 4 May 2013 18:51:20 +0200 Subject: [PATCH] vlc.py - Allow VLC_MAX_PORT to be set to the same value as VLC_MIN_PORT Avoids empty range ValueError --- syncplay/players/vlc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syncplay/players/vlc.py b/syncplay/players/vlc.py index edf5f67..edcb214 100644 --- a/syncplay/players/vlc.py +++ b/syncplay/players/vlc.py @@ -18,7 +18,7 @@ class VlcPlayer(BasePlayer): SLAVE_ARGS = ['--extraintf=luaintf','--lua-intf=syncplay'] random.seed() - vlcport = random.randrange(VLC_MIN_PORT, VLC_MAX_PORT) + vlcport = random.randrange(VLC_MIN_PORT, VLC_MAX_PORT) if (VLC_MIN_PORT < VLC_MAX_PORT) else VLC_MIN_PORT SLAVE_ARGS.append('--lua-config=syncplay={{port=\"{}\"}}'.format(str(vlcport))) def __init__(self, client, playerPath, filePath, args): @@ -213,4 +213,4 @@ class VlcPlayer(BasePlayer): def sendLine(self, line): if(self.connected): # print "send: {}".format(line) - self.push(line + "\n") \ No newline at end of file + self.push(line + "\n")