예제 #1
0
파일: main.py 프로젝트: Inaimathi/web-mote
 def post(self):
     try:
         dir = self.get_argument("dir")
         assert util.isInRoot(dir)
         self.write(util.dirToJSON(dir))
     except:
         self.write(util.entriesToJSON(conf.root))
예제 #2
0
 def post(self):
     try:
         dir = self.get_argument("dir")
         assert util.isInRoot(dir)
         self.write(util.dirToJSON(dir))
     except:
         self.write(util.entriesToJSON(conf.root))
예제 #3
0
def listen():
    while True:
        aFile = playQ.get()
        if util.isInRoot(aFile):
            ServerStatus.send(util.nameToTitle(aFile), event='playing')
            playerCmd = __getPlayerCommand(aFile)
            cmdTable = commandTable[playerCmd[0]]
            playFile(playerCmd, aFile, cmdTable)
예제 #4
0
def listen():
    while True:
        aFile = playQ.get()
        if util.isInRoot(aFile):
            ServerStatus.send(util.nameToTitle(aFile), event='playing')
            playerCmd = __getPlayerCommand(aFile)
            cmdTable = commandTable[playerCmd[0]]
            playFile(playerCmd, aFile, cmdTable)
예제 #5
0
def listen():
    while True:
        aFile = playQ.get()
        if util.isInRoot(aFile):
            ServerStatus.send(util.nameToTitle(aFile), event='playing')
            playerCmd = __getPlayerCommand(aFile)
            cmdTable = commandTable[playerCmd[0]]
            playFile(playerCmd, aFile, cmdTable)
        elif(aFile.startswith("http")):
            ServerStatus.send(aFile, event='playing')
            playerCmd =  playerTable.get("youtube", defaultPlayer)
            cmdTable = commandTable[playerCmd[0]]
            playFile(playerCmd, aFile, cmdTable)