VL browse menus only show first 50 items
afriend <afriend.a3c6mn-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]>
| Newsgroups | gmane.music.equipment.slimdevices.devel |
|---|---|
| Organization | Logitech Squeezebox Forums |
| Message-ID | <[email protected]> |
Hello.
I'm trying to create browse menus for a couple of virtual libraries.
These browse menus should be located inside a (home menu) parent folder.
Works except there's something wrong with my url or so. I can only get
it these sub menus to show the first 50 items (index=0) but never more
(like index=100).
If I put the browse menu definitions (my $pt + push @browseMenus inside
the feed) there's no problem. But since I need many menus for a couple
of -different libraries- I thought I'd gather the definitions first and
then register the parent folder node with the (sub) menus at the end.
But then I get only the first page (50 items, index=0)...
Here the sub for an example VL and a browse menu:
Code:
--------------------
initVLs {
my $library = {
id => 'MYCUSTOMMENUS_VLID_SOMECOMMENT',
name => 'VL for comment menu',
sql => qq{
INSERT OR IGNORE INTO library_track (library, track)
SELECT '%s', tracks.id FROM tracks
LEFT JOIN comments comments ON comments.track = tracks.id
WHERE
comments.value LIKE '%%somecomment%%' AND
tracks.audio = 1
GROUP by tracks.id
},
};
Slim::Music::VirtualLibraries->unregisterLibrary($library);
Slim::Music::VirtualLibraries->registerLibrary($library);
Slim::Music::VirtualLibraries->rebuild($library->{id});
my @browseMenus = ();
my $pt = {library_id => Slim::Music::VirtualLibraries->getRealId($library->{id})};
push @browseMenus,{
type => 'link',
name => 'Some Comment - Tracks',
url => \&Slim::Menu::BrowseLibrary::_tracks,
icon => 'html/images/playlists.png',
jiveIcon => 'html/images/playlists.png',
id => 'MYCUSTOMMENUS_SOMECOMMENT',
condition => \&Slim::Menu::BrowseLibrary::isEnabledNode,
weight => 220,
cache => 1,
passthrough => [{
library_id => $pt->{'library_id'},
searchTags => [
'library_id:'.$pt->{'library_id'}
],
}],
};
Slim::Menu::BrowseLibrary->deregisterNode('mycustommenus');
Slim::Menu::BrowseLibrary->registerNode({
type => 'link',
name => 'HOME_MENU_PARENTFOLDER_NAME',
id => 'mycustommenus',
feed => sub {
my ($client, $cb, $args,$pt) = @_;
$cb->({
items => \@browseMenus,
});
},
icon => 'plugins/MyCustomMenus/html/images/icon.png',
jiveIcon => 'plugins/MyCustomMenus/html/images/icon.png',
weight => 89,
cache => 1,
});
}
--------------------
Any idea how to fix this? Thank you.
------------------------------------------------------------------------
afriend's Profile: http://forums.slimdevices.com/member.php?userid=39306
View this thread: http://forums.slimdevices.com/showthread.php?t=114722