1 -- Authors: Alexander Wirt <formorer@formorer.de>
3 -- Last Changed: Unknown
5 -- Stolen from statusd_mpd.lua
6 -- Responsible for bugs and so on: Alexander Wirt <formorer@formorer.de>
7 -- To get this working you have to enable playerinfofile in your pytonerc
8 -- If you have the info file at an unusal place overwrite the infofile setting
10 if not statusd_pytone
then
13 infofile
=os
.getenv("HOME").."/.pytone/playerinfo",
20 local function get_pytone_status()
21 local f
=io
.open(statusd_pytone
.infofile
,'r')
22 if not f
then return "n/a" end
23 local playing
=f
:read()
29 local function update_pytone()
30 statusd
.inform("pytone", get_pytone_status())
31 pytone_timer
:set(statusd_pytone
.interval
, update_pytone
)
35 --get_inet_addr=get_inet_addr_fn()
36 pytone_timer
=statusd
.create_timer()