I'm trying to design a menu that first chooses Artist (Band), then
Comment, then Album.  I've succeeded so far in listing all the Comments
associated with a selected Artist, but when I select a specific Comment,
I don't get any matching Albums.  The code I have so far is shown below.
Any suggestion on what I need to change to get this menu to work
correctly?  

<?xml version="1.0" encoding="utf-8"?>
<custombrowse>
<menu>
<menuname>Comment</menuname>
<menuorder>50</menuorder>
<menu>
<id>artist</id>
<menuname>Comment</menuname>
<itemtype>artist</itemtype>
<menutype>sql</menutype>
<menulinks>alpha</menulinks>
<menudata>
select
contributors.id,contributors.name,substr(contributors.namesort,1,1)
from contributors,contributor_album,albums
where 
contributor_album.contributor=contributors.id and
contributor_album.album=albums.id and
contributor_album.role in (4) 
group by contributors.id 
order by contributors.namesort asc
</menudata>
<menu>
<id>comment</id>
<menuname>Albums</menuname>
<itemtype>comment</itemtype>
<pathtype>sql</pathtype>
<pathtypedata>
select distinct comments.value,comments.value from comments                     
where                                                                           
        
value='{context.itemid}'
</pathtypedata>
<menutype>sql</menutype>
<menudata>
select comments.id,comments.value from
tracks,comments,contributor_track 
where
tracks.id=contributor_track.track and
contributor_track.contributor={artist} and
comments.value is not null and
comments.value not like 'http%' and
comments.value not like '%:http%'
and comments.track=tracks.id                                                    
group by comments.value
</menudata>
<menu>
<id>album</id>
<menuname>Songs</menuname>
<itemtype>album</itemtype>
<itemformat>album</itemformat>
<menutype>sql</menutype>
<menudata>
select albums.id,albums.title,substr(albums.titlesort,1,1) from
contributor_track,tracks,albums,comments 
where 
tracks.audio=1 and 
tracks.album=albums.id and 
tracks.id=contributor_track.track and
contributor_track.role in (4) and                                               
                
contributor_track.contributor={artist} and
tracks.id=comments.track and
comments.value='{comments}'                                             
group by albums.id 
order by albums.titlesort asc
</menudata>
<menu>
<id>track</id>
<itemtype>track</itemtype>
<itemformat>track</itemformat>
<playtype>all</playtype>
<menutype>sql</menutype>
<menudata>
select tracks.id,tracks.title from tracks,contributor_track,comments 
where 
tracks.audio=1 and 
contributor_track.track=tracks.id and 
contributor_track.role in (4) and                                               
                
tracks.album={album} and 
contributor_track.contributor={artist} and
tracks.id=comments.track and
comments.value='{comments}'
group by tracks.id 
order by tracks.disc,tracks.tracknum asc,tracks.titlesort asc
</menudata>
<menu>
<id>trackdetails</id>
<menutype>trackdetails</menutype>
<menudata>track</menudata>
</menu>
</menu>
</menu>
</menu>
</menu>
</menu>
</custombrowse>


-- 
aeo12
------------------------------------------------------------------------
aeo12's Profile: http://forums.slimdevices.com/member.php?userid=10883
View this thread: http://forums.slimdevices.com/showthread.php?t=90927

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to