- tested with iTunes and iTunesBlogger in combination. Other players and http-POST
'helper' apps should work just as well, as should any other platform (tested on
Windows iTunes to Linux server, but others should be fine...)
- the 'tracktunes.php' script is a modified version of a script from the makers
of iTunesBlogger (great little app), which must be accessible for the http-POST
to work. TrackTunes can add (append) or set (clear) the last song played into
a list kept on the server (the cg-plugins folder must be writeable by the server
for this to work...).
- the http-POST format accepted looks like:
http://{your wp root}/wp-content/plugins/cg-plugins/tracktunes.php?add=1&t=%t&a=%a&g=%g&al=%b
... where %t replace with song title, %a replace with artist name, and %al is album title.
Also accepts %g as genre and %y as track time, but neither are used in WhatTunes right now.
Oh, and use add=1 or set=1 to append to or clear/replace the list (add keeps a long running
list, set just keeps the last one...).
YEAH, that's ugly. But it's more secure than putting tracktunes up in the root. ;)
- obviously, you can 'hand-test' that tracktunes.php works by entering the URL and arguments
directly into your browser. A file 'tracktunes.txt' should be created in your cg-plugins
folder, with the content you passed as args in the URL.
- Make sure to go through the installation of CG-Amazon if you want Amazon links to your
latest tune, otherwise you'll just get the song title at the moment.
- If you have everything installed and activated properly, you should get a "Tunes" menu
in the Admin interface. It'll show you the last 20 entries in a pretty table, plus the
current/last song in a dashboard-style info block at the top-right of the page.
- To display on your sidebar:
<?php
if (function_exists("getWhatsPlaying")) // then we can use it
{
$amaAlbum = getWhatsPlaying(true, true);
if ($amaAlbum)
{
start_block("Now Playing", "now-playing", "li");
echo '<br>';
echo $amaAlbum;
end_block();
}
}
?>
These libraries are free for non-commercial use, WITH NO WARRANTY:
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.