vlc.py - Allow VLC_MAX_PORT to be set to the same value as VLC_MIN_PORT
Avoids empty range ValueError
This commit is contained in:
parent
3aa56864f8
commit
b031df2cdb
@ -18,7 +18,7 @@ class VlcPlayer(BasePlayer):
|
|||||||
SLAVE_ARGS = ['--extraintf=luaintf','--lua-intf=syncplay']
|
SLAVE_ARGS = ['--extraintf=luaintf','--lua-intf=syncplay']
|
||||||
|
|
||||||
random.seed()
|
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)))
|
SLAVE_ARGS.append('--lua-config=syncplay={{port=\"{}\"}}'.format(str(vlcport)))
|
||||||
|
|
||||||
def __init__(self, client, playerPath, filePath, args):
|
def __init__(self, client, playerPath, filePath, args):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user