summaryrefslogtreecommitdiffstats
path: root/lib/class/xmldata.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-11-15 20:49:08 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-11-15 20:49:08 +0000
commit0d0f8c23f44af61211c40087cfeda80dbf254e71 (patch)
tree3ae563e43e2739f53341f5ae4b7f9c1b8ffcd16a /lib/class/xmldata.class.php
parente25d057b5c86d750d942b7a1691c5fdc5024bbfa (diff)
downloadampache-0d0f8c23f44af61211c40087cfeda80dbf254e71.tar.gz
ampache-0d0f8c23f44af61211c40087cfeda80dbf254e71.tar.bz2
ampache-0d0f8c23f44af61211c40087cfeda80dbf254e71.zip
more cleanup, added numeric values of ratings to the song xml return
Diffstat (limited to 'lib/class/xmldata.class.php')
-rw-r--r--lib/class/xmldata.class.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/class/xmldata.class.php b/lib/class/xmldata.class.php
index caeee032..807a9a5d 100644
--- a/lib/class/xmldata.class.php
+++ b/lib/class/xmldata.class.php
@@ -274,6 +274,8 @@ class xmlData {
$song = new Song($song_id);
$song->format();
+ $rating = new Rating($song_id,'song');
+
$art_url = Config::get('web_path') . '/image.php?id=' . $song->album . '&auth=' . scrub_out($_REQUEST['auth']);
$string .= "<song id=\"$song->id\">\n" .
@@ -286,6 +288,8 @@ class xmlData {
"\t<url><![CDATA[" . $song->get_url($_REQUEST['auth']) . "]]></url>\n" .
"\t<size>$song->size</size>\n" .
"\t<art><![CDATA[" . $art_url . "]]></art>\n" .
+ "\t<preciserating>" . $rating->preciserating . "</preciserating>\n" .
+ "\t<rating>" . $rating->rating . "</rating>\n" .
"</song>\n";
} // end foreach