mherger wrote: 
> You certainly have too many parameters in there
Totally. AFter many hours, I think at last a little progress:
I found out that the searchTag parameter inside the passthrough block is
the important one.

The following code -works- because I used the realID of the virtual
library AAA instead of making the getRealID call:


Code:
--------------------
                Slim::Menu::BrowseLibrary->deregisterNode('MyTopLevelMenu');
                Slim::Menu::BrowseLibrary->registerNode({
  type         => 'link',
  name         => 'MENUGROUP',
  id           => 'MyTopLevelMenu',
  feed         => sub {
        my ($client, $cb, $args) = @_;
        my @items = ();
        push @items,{
                type => 'link',
                name => string('AAA_SEL_ALBUMS'),
                url => \&Slim::Menu::BrowseLibrary::_albums,
                icon => 'html/images/albums.png',
                                        id   => 
string('myMusicAlbums_AAA_Sel_TracksByAlbum'),
                                                                
                passthrough => [{ 
                        searchTags => [ 'library_id:*21057aa7*' ],
                }],
                
        };
                                                        $cb->({
                                                                items => 
\@items,
                                                        });
  },
  icon => 'html/images/musicfolder.png',
  jiveIcon => 'html/images/musicfolder.png',
  weight       => 600,
  cache        => 1,
  });
--------------------


What I can't figure out: how do I make a -successful getRealID call from
*inside* the "push @items" block-? 


Code:
--------------------
    params => { library_id => Slim::Music::VirtualLibraries->getRealId('AAA') },
  # or
  library_id => Slim::Music::VirtualLibraries->getRealId('AAA'),
  # or
  library_id => { Slim::Music::VirtualLibraries->getRealId('AAA') },
  # or probably something else
--------------------


And what would the correct Perl syntax look like to *use the result of
this getRealID call inside searchTag* parameter?

Code:
--------------------
    searchTags => [ 'library_id:'.{library_id} ],
  # or with '
  searchTags => [ 'library_id:'.{'library_id'} ],
  # or ...
--------------------


Sorry for asking all these basic questions but my brain is damaged more
than usual from trying so many different variations without really
knowing what I'm doing here. I'm seeing curly brackets
everywhere...
Thank you!


------------------------------------------------------------------------
afriend's Profile: http://forums.slimdevices.com/member.php?userid=39306
View this thread: http://forums.slimdevices.com/showthread.php?t=109334

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

Reply via email to