Currently Playing Song Plugin (released)
-
I just finished my first hack for WordPress, which will get information from your music player about the current song and your playlist. This hack uses TCP/IP and a fairly simple query/response protocol to communicate with a plugin on your music player. Currently there is only support for XMMS, however if you know something about writing plugins for WinAMP, iTunes, etc. please have at it and send me the code/libraries so I can include it in future releases.
To use this hack, simply install the plugin for your music player, drop the get_song() function into your my-hacks.php (enable my-hacks if you haven’t already) and call the get_song() function as follows:
get_song(inputstring,host,port)
For example, if I called:
get_song(“Listening to %TITLE% (#%PLPOS% of %PLLEN% on playlist), localhost, 8082)
it would return “Listening to Decade and One (#5 of 27 on playlist)”
Since get_song() merely does a search and replace, you can also include html tags in the input string. As of now there are 8 things that you can query for, all of this is outlined in the README.
https://alumni.imsa.edu/~eryanv/wordpress/getsong.tar.gz
If you have any questions or comments please feel free to ask.
PS:Kudos to anybody who knows the artist from the example.
- The topic ‘Currently Playing Song Plugin (released)’ is closed to new replies.