#76 MPD statusd scripts broken in Lua 5.2.

v1.0 (example)
closed-fixed
nobody
None
5
2014-05-14
2014-05-04
Jeff Backus
No

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:
https://github.com/jsbackus/notion

1 Attachments

Discussion

  • Arnout Engelen

    Arnout Engelen - 2014-05-14

    Thanks, merged!

     
  • Arnout Engelen

    Arnout Engelen - 2014-05-14
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks