pippin;663575 Wrote:
> Erland,
>
> the itemtype is correct but if you want to see a playlist/album view in
> iPeng it has to be "album" or "playlist" (in the parent menu) or you get
> just a normal menu. The menu will work but I think that's not what the
> OP is after.
Ok, but "itemtype" is used for other things inside Custom Browse, so
it's not possible to set that to something the SQL doesn't reprepsent,
so in this case it needs to be "artist" for Custom Browse to behave
correctly. However, I've just released a new version of Custom Browse
(2.12.3560) which have support for a custom "ipengitemtype" parameter
which overrides "itemtype" but isn't used internally within Custom
Browse.
With the new version, I think the following should work correctly:
Code:
--------------------
<?xml version="1.0" encoding="utf-8"?>
<custombrowse>
<menu>
<menugroup>Musik</menugroup>
<menuname>Singles</menuname>
<playtype>none</playtype>
<menulinks>alpha</menulinks>
<menuorder>70</menuorder>
<menu>
<id>artist</id>
<menuname>Artist</menuname>
<itemtype>artist</itemtype>
<ipengitemtype>playlist</ipengitemtype>
<menutype>sql</menutype>
<menulinks>alpha</menulinks>
<menudata>
select distinct
contributors.id,contributors.name,substr(contributors.namesort,1,1)
from contributors,contributor_track,tracks
where contributors.id =
contributor_track.contributor
and contributor_track.track = tracks.id
and contributor_track.role in (1,5)
and tracks.audio = 1
and tracks.url like '%/share/Musik/Singles/%'
group by contributors.id
order by contributors.namesort asc
</menudata>
<menu>
<id>track</id>
<itemtype>track</itemtype>
<itemformat>titleformat</itemformat>
<playtype>all</playtype>
<menutype>sql</menutype>
<jivepattern>^(.*)\s\((.*)\)$</jivepattern>
<menudata>
select
tracks.id,tracks.title,substr(tracks.title,1,1)
from contributor_track,tracks,albums
where tracks.id =
contributor_track.track
and contributor_track.role in (1,5)
and tracks.album = albums.id
and albums.title = 'Kein Album'
and contributor_track.contributor =
{artist}
and tracks.audio = 1
group by tracks.id
order by tracks.titlesort asc
</menudata>
<menu>
<id>trackdetails</id>
<menutype>trackdetails</menutype>
<menudata>track|0</menudata>
</menu>
</menu>
</menu>
</menu>
</custombrowse>
--------------------
The difference is that on the top level the following has been
removed:
<playtype>none</playtype>
And the following has been added:
<ipengitemtype>playlist</ipengitemtype>
I had to remove <playtype>none</playtype> because I think iPeng will
try to play the parent level and that's not possible if it have
<playtype>none</playtype> set.
--
erland
Erland Isaksson ('My homepage' (http://erland.isaksson.info))
(Developer of 'many plugins/applets (both free and commercial)'
(http://wiki.slimdevices.com/index.php/User:Erland). If my answer
helped you and you like to encourage future presence on this forum
and/or third party plugin/applet development, 'donations are always
appreciated' (http://erland.isaksson.info/donate))
Interested in music discovery ? See 'Social Music Discovery (SMD)'
(http://forums.slimdevices.com/showthread.php?p=656713) project.
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=90936
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins