Hi, Been playing with the Amazon Web Services API, and wrote a couple of functions to enhance MythMusic as a couple of learn-in projects. So no guarantees I'm afraid, but I like having all the album art, thought others might too.
*The first utility goes through every album in the MythMusic database,
searches for the album on Amazon, then downloads the Album Cover Art
to the relevant music directory, so that MythMusic will display the
Cover Art whenever that track is played.
*The second is less useful, but more in the spirit of what the API
should be used for. It sorts the albums in order of playcount or rank
then uses Amazon to suggest other albums that you might want to add to
your collection.
Notes:
* Ensure the settings within 'myth.php' reflect your configuration, it
currently uses my Amazon Associate and Affiliate ID, so change these
if you have your own.
* Only tested against the UK amazon API, change the $url_locale if you
ain't based in the UK!
To install:
*Uncompress the archive into your myth web directory.
*Update the settings (You must at least set the hostname to be the one
used to record your mythfrontend settings, I can't remember what the
default is for this (could be localhost)), I recommend checking:
$this->hostname = localhost? (or the hostname used by the mythweb frontend)
$this->large_jpg & small_jpg = names used to save the folder album images to.
$url_locale = Which Amazon web services host to use (default UK)
Point your browser at mythweb_root/myth.php, default is to show the
top 10 highest rated + 5 suggested albums - takes about 15 seconds to
display. This is because the Amazon API seems to take nearly a second
to process each request.
The Archive contains the files:
* AmazonXML.class.php - for processing the Amazon XML REST responses
* myth.php - The actual functions to do the work
* themes/Default/amazonmusic.php - basically a cut down
mythmusic.php theme file
* Snoopy.class.php - Snoopy class, for downloading html/jpegs
Cheers,
Paul
myth.tar.gz
Description: application/gzip
_______________________________________________ mythtv-users mailing list [email protected] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
