Ok, thanks to Michael again, I've figured out how to do.
Editing virtuallibraries.prefs works but only using filters based on
genre (or better, on the parameters you have in the saved query), I was
not able to replace the query text with one based on other colums, as
the one here:
---
_ts_vlid_6c11a475: 1421090725
_version: 0
vlid_6c11a475:
id: advSrch_1421090725
name: Classica
params:
- 'file:///E:/Classica%'
sql: INSERT OR IGNORE INTO library_track (library, track) SELECT '%s',
id FROM (
SELECT me.id
FROM tracks me
WHERE me.url like ?)
To accomplish this, I've modified the LibraryDemo plugin itself and it's
working.
here the code with SQL:
...
id => 'mc2Classica',
name => 'Classica',
# %s is being replaced with the library's ID
sql => qq{
INSERT OR IGNORE INTO library_track (library, track)
SELECT '%s', tracks.id
FROM tracks
WHERE url Like 'file:///E:/Classica%'
}
},
...
my @menus = ( {
name => 'MC2_CLASSICAL_ARTISTS',
icon => 'html/images/artists.png',
feed => \&Slim::Menu::BrowseLibrary::_artists,
id => 'artistsForMc2Classica',
weight => 21,
},{
name => 'MC2_CLASSICAL_ALBUMS',
icon => 'html/images/albums.png',
feed => \&Slim::Menu::BrowseLibrary::_albums,
id => 'albumsForMc2Classica',
weight => 25,
} );
...
foreach (@menus) {
Slim::Menu::BrowseLibrary->registerNode({
type => 'link',
name => $_->{name},
params => { library_id =>
Slim::Music::VirtualLibraries->getRealId('mc2Classica') },
feed => $_->{feed},
icon => $_->{icon},
jiveIcon => $_->{icon},
homeMenuText => $_->{name},
condition =>
\&Slim::Menu::BrowseLibrary::isEnabledNode,
id => $_->{id},
weight => $_->{weight},
cache => 1,
});
}
...
____________________________________________________________
SB+, Klimo Merlino + Kent Gold, Monitor Audio Studio 20 Gold SE+, Klimo
reference and DIS Interconnect.
------------------------------------------------------------------------
marcoc1712's Profile: http://forums.slimdevices.com/member.php?userid=34842
View this thread: http://forums.slimdevices.com/showthread.php?t=101701
_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/beta