WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

SG What's Playing

Display currently playing song from MPD or other music players in a sidebar widget.

Configuration

Configuration is via file. On Unix-like systems (includding OSX?), the file is read from ~/.sgwpupdate.conf or /etc/sgwpupdate.conf. If both exist, entries in the former override those in the latter. The file format is the usual WIN.INI style, with sections denoted by square brackets and items specified as item = value. Normally, the file will have two sections: the standard [sgwpupdate] section and a module specific section such as [sgwpmpd].

The supported configuration items in [sgwpupdate] section are:

  • blog - URL to WordPress blog, such as http://www.example.net/wordpress

  • password - simple password to allow updates, must match option in plugin configuration.

  • module - name of python module to do player specific update.

  • logfile - full path to logfile (optional)

  • pidfile - full path to name of file where PID will be written, if running in daemon mode. (optional)

The supported configuration items for the [sgwpmpd] module section are:

  • mpdhost - name of host where MPD is running, eg localhost or mpd.example.net

  • mpdport - TCP port number for MPD. Almost always 6600.

Custom Player Modules

Write a Python module containing a function name getsong that takes a single argument, which will be a dictionary of the config items from the module-specific configuration section. The function should return a tuple of (remainingtime, songdata). The remainingtime value sets how long sgwpupdate.py will wait before checking again in daemon mode. The dictionary songdata should contain the following keys:

  • artist - song performer or writer.

  • title - song title.

  • album - album title for the song.

  • state - current state of the player, should be one of 'play', 'pause', or 'stop'.

Your best bet is probably to copy sgwpmpd.py and work from there.

Requires: 2.2.0 or higher
Compatible up to: 2.3
Last Updated: 2007-10-12
Downloads: 962

Ratings

1 star
1 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.