[mythtv-users] Alternative to music section of mythweb

John Armstrong ja at ggrove.plus.com
Sat Apr 1 14:25:58 UTC 2006


Partly as an exercise in learning how to use php, and partly because I 
wanted an easier way to alter the ratings for music in mythmusic, I wrote 
myself a php page which others might find useful and can be downloaded here:
www.ggrove.plus.com/music.php
Just needs saving in the htdocs directory
Features:
Lists artists (optionally grouped by initials), giving average rating and 
number of tracks
Lists albums by an artist (optionally showing all tracks), giving average 
rating and number of tracks
Shows album art
Ratings can be changed, either for an individual track or for a whole album
Lists playlists and smart playlists
Some other auto lists
tracks can be downloaded

It is separate from mythweb, although it does use a couple of stylesheets 
from mythweb to give the same look and feel.

I didn't write it with portability in mind as it was intended for my own 
use, but only a few changes are likely to be needed to make it work 
elsewhere:
database settings are at line 73
address for the stylesheets at line 18,19
it assumes that the mp3 music directory is linked to mp3 in the web folder 
(for downloads), line 447
it assumes that albums are in the directory "mp3/albumname" or "mp3/year - 
albumname" for the albumart, and only looks for albumart in the file 
"folder_large.jpg", lines 339-346
I've used a rating of 0 as an ignore flag for duplicate tracks

As it was a learning exercise, I'm sure that some of the coding could be 
improved.


John



More information about the mythtv-users mailing list