def run(self):
self.daemon_active = True
while not self.__exit:
log_msg("Start Spotify Connect Daemon")
#spotty_args = ["-v"]
spotty_args = ["--onstart", "curl -s -f -m 2 http://localhost:%s/playercmd/start" % PROXY_PORT,
"--onstop", "curl -s -f -m 2 http://localhost:%s/playercmd/stop" % PROXY_PORT]
self.__spotty_proc = self.__spotty.run_spotty(arguments=spotty_args)
thread.start_new_thread(self.fill_fake_buffer, ())
while not self.__exit:
line = self.__spotty_proc.stderr.readline().strip()
if line:
log_msg(line, xbmc.LOGDEBUG)
if self.__spotty_proc.returncode and self.__spotty_proc.returncode > 0 and not self.__exit:
# daemon crashed ? restart ?
break
self.daemon_active = False
log_msg("Stopped Spotify Connect Daemon")
player_monitor.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录