Apparently somewhere around Lua 5.1/5.2 the function math.mod() was renamed math.fmod(). This affects both versions of the MPD statusd script. Attached is a patch that modifies both statusd_mpd.lua and statusd_mpd-socket.lua to check for math.mod() before calling it and to call math.fmod() if math.mod() doesn't exist.
Additionally added an alternate MPD session command string to statusd_mpd.lua for cases when the original does not work with comments explaining the issue.
Patch is also available on branch mpd_lua52 at:
Log in to post a comment.