1.1 --- a/gmyth-stream/main.py Sat Mar 31 00:55:28 2007 +0100
1.2 +++ b/gmyth-stream/main.py Tue Apr 03 14:56:51 2007 +0100
1.3 @@ -33,19 +33,30 @@
1.4
1.5 if (msg == "SETUP"):
1.6 setup = server.getMsg(1024).strip().split(" ")
1.7 - if ( len(setup) == 10 ):
1.8 + size = len(setup)
1.9 + options = []
1.10 +
1.11 + if ( size < 10 ):
1.12 + server.sendMsg(lib.log("Wrong SETUP command from: %s" % client[0]))
1.13 +
1.14 + else:
1.15 +
1.16 + if ( size > 10 ):
1.17 + i = 10
1.18 + while (i < size):
1.19 + options.append(setup[i])
1.20 + i += 1
1.21 +
1.22 ret = media.setup(setup[0], setup[1], setup[2], \
1.23 setup[3], setup[4], setup[5],
1.24 setup[6], setup[7], setup[8],
1.25 - setup[9])
1.26 + setup[9], options)
1.27
1.28 if (ret == 0):
1.29 server.Ack("SETUP")
1.30 else:
1.31 - server.sendMsg(lib.log("File does not exist: %s" % setup[0]))
1.32 + server.sendMsg(lib.log(ret))
1.33
1.34 - else:
1.35 - server.sendMsg(lib.log("Wrong SETUP command from: %s" % client[0]))
1.36
1.37 elif (msg == "PLAY"):
1.38 media.play()