PasTim;694555 Wrote:
>
> I don't quite understand why when I use <playtype>none</playtype> at
> the top level of the menu:
> a) the 'All Songs' options does not appear at the top level (as
> expected)
> b) when I pick an item off the menu (eg in my Works by Composer menu)
> 'All Songs' does appear at the top of the list of items at that second
> level (as expected)
> c) but that 'All Songs' option does nothing (not expected)
>
I've sorted this one out on the Web interface.
What I want is for All Songs at Level 1 to do nothing, or not appear at
all, and for All Songs at level 2 to select all at that level.
I have achieved this by:
1) <playtype>none</playtype> at the very top of the CB menu
2) <playtype>sql></playtype> at menu level 1, with <playdata>
containing an sql select statement to select all items for the
selection at that level. Example below.
What this does is to show All Songs at the top level, but it does
nothing, which is good. At the next level, it selects all items
appropriate to that level. So, if using 'Works by Composer', having
chosen a composer, selecting 'All Songs' plays all tracks for that
composer.
Code:
--------------------
<?xml version="1.0" encoding="utf-8"?>
<custombrowse>
<menu>
<menugroup>Classical Music</menugroup>
<menuname>Works by Composer</menuname>
<menuorder>50</menuorder>
<playtype>none</playtype>
<menu>
<id>customtag1</id>
<menuname>Composers</menuname>
<pathtype>sql</pathtype>
<pathtypedata>
select distinct
customscan_track_attributes.extravalue,customscan_track_attributes.value,substr(customscan_track_attributes.value,1,1)
from customscan_track_attributes
where
module='mixedtag' and
attr='COMPOSER' and
extravalue='{context.itemid}'
</pathtypedata>
<menutype>sql</menutype>
<menulinks>alpha</menulinks>
<playdata>
select distinct
tracks.id,tracks.title,substr(tracks.titlesort,1,1) from tracks
join customscan_track_attributes attr1
on
tracks.id=attr1.track and
attr1.module='mixedtag' and
attr1.attr='COMPOSER' and
attr1.extravalue='{customtag1}'
join multilibrary_track on
tracks.id=multilibrary_track.track and
multilibrary_track.library=2
where
tracks.audio=1
group by tracks.id
order by
tracks.album,tracks.disc asc,tracks.tracknum asc,tracks.titlesort asc
</playdata>
<playtype>sql</playtype>
<itemtype>sql</itemtype>
<albumjivepattern>^(.*)\s\((.*)\)$</albumjivepattern>
<menudata>
select
customscan_track_attributes.extravalue,customscan_track_attributes.value,
substr(customscan_track_attributes.valuesort,1,1) from
customscan_track_attributes
where
customscan_track_attributes.module='mixedtag' and
customscan_track_attributes.attr='COMPOSER'
group by customscan_track_attributes.extravalue
order by customscan_track_attributes.valuesort
asc
</menudata>
<menu>
--------------------
--
PasTim
VortexBox Midi, FLACs 16 or 24 bit. Touch on Ethernet (in another room).
Analogue out over 'a bit of wire' to ageing Quad Hi-Fi. Old wireless
laptop controls the server using Chrome. Squeezeplay on PCs in other
rooms.
------------------------------------------------------------------------
PasTim's Profile: http://forums.slimdevices.com/member.php?userid=41642
View this thread: http://forums.slimdevices.com/showthread.php?t=93796
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins