diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-09 21:38:27 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-09 21:38:27 +0000 |
commit | e4ad47579a65dadf9da009b525bf28c42bc7623a (patch) | |
tree | 3049851031dedaea24b6747822f41a7c50119c24 /lib/class/song.class.php | |
parent | f3be18167cc3759a4079f53bec4cf826550fcb05 (diff) | |
download | ampache-e4ad47579a65dadf9da009b525bf28c42bc7623a.tar.gz ampache-e4ad47579a65dadf9da009b525bf28c42bc7623a.tar.bz2 ampache-e4ad47579a65dadf9da009b525bf28c42bc7623a.zip |
implement tag information on song xml document for the api, and put back genre (first tag) for backwards compatiblity
Diffstat (limited to 'lib/class/song.class.php')
-rw-r--r-- | lib/class/song.class.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/class/song.class.php b/lib/class/song.class.php index 029d45a4..9ce008b4 100644 --- a/lib/class/song.class.php +++ b/lib/class/song.class.php @@ -688,6 +688,14 @@ class Song extends database_object implements media { // Get the top tags $tags = Tag::get_top_tags('song',$this->id); + $this->tags = $tags; + + $tag = new Tag($tags['0']); + + // Emulate the genre information for legacy crap (API) + $this->f_genre = $tag->name; + $this->genre = $tag->id; + $this->f_tags = Tag::get_display($tags,$this->id,'song'); // Format the size |