PasTim wrote: > I'm looking whether I could, or should, try to move my SQL queries that > use erland's multi-library to use virtualLibraries. I've looked at the > 4 SQL tables, and reckon I understand them. I've also looked at the > prefs. and found an ID for a library view I have created. I also know > the name. So far so good. >
I think we need to clear up a few things to avoid confusion, there are probably two parts of this if you like to replace my MultiLibrary/CustomBrowse plugins: 1. To create the library contents (=fill the library_tracks table), can be done in at least three ways as suggested earlier I this thread. The easiest way is to just do an advance search and select to save it as a library, the other two ways mentioned requires some hacking and writing raw SQL statement. 2. To create menus that is able to browse the library. This is done automatically by LMS as long as you dont want any customized behavior in the menus except limiting content to the library you have created. However, for some people limiting content isnt enough because they have also used Custom Browse plugin to customize the behavior of the menus. In this case you would need to create the Custom Browse menus you like for each library and the menu configuration needs to be customized by editing the Custom Browse menu configuration XML/SQL to join with library_tracks instead of multilibrary_track. You will need to hardcode the library id each menu should use in each SQL used in the configuration of each menu. Since I havent used LMS 7.9 or later I dont know if the library id used in library_tracks is displayed in LMS web interface or if you need to pick it up from prefs file or library_tracks table, either way its a manual moment to check which library id a created library got after creating the library. Theoretically you can do a menu template in Custom Browse so you will be able to create the menu by just specifying the library id in one place for each menu/library but then we are pretty deep into Custom Browse so you really need to know what you are doing and need to understand the template language used in addition to XML/SQL. There is no user interface in Custom Browse to create new menu templates so if like to create a template you would have to use a text editor and save he template xml/template file in the template directory you have configured in Custom Browse. I dont think the id for a library changes when you do a rescan but someone who have used LMS 7.9 or later have to tell for sure. If it changes every rescan it wont work with the Custom Browse plugin. Having said this, I think its suitable for people who have previously used Multi Library plugin to limit content in menus to check if they can use the built-in virtual library functionality without relying on Custom Browse. If you have also customized the behavior of the menus so you still need to use Custom Browse plugin in step 2 above Im not sure its worth the effort. In this case I think its important to say whats missing in the standard menu behavior so it can be improved in LMS core or provided by a new simple plugin rather than continuing to rely on Custom Browse, preferably a discussion for a separate thread in beta section of the forum. The reason for this is that Custom Browse is no longer supported in LMS 8.* and can basically break at any time, so spending a lot of work on Custom Browse menu configuration seems like wasted time to me. Would be a lot better to discuss the improvements needed in the standard menus to get rid of the need to use Custom Browse plugin. Michael might not want to include everything in LMS core but if there are more people interested in the same thing someone might be willing to implement a plugin for it. Making a plugin that provides one or several specific menus can be a lot easier today compared to what was needed when Custom Browse was developed so in some cases its not going to be a huge job for someone willing to write some Perl code. PasTim wrote: > However, I have no idea how to know the prefs vlid for the named library > view I want in my sql statements so that I can match tracks to the > library_track rows I want to use. In multi-library there's an SQL > table with my named libraries in it with IDs, so I can create SQL > statements returning what I want. > > How would I do that with the prefs? > As mentioned above I think this is manual work, just pickup the id for each library by reading the prefs file or database (unless its displayed in LMS web interface) Erland Isaksson ('My homepage' (http://erland.isaksson.info)) Developer of 'many plugins/applets' (https://wiki.slimdevices.com/index.php/User_Erland.html) *Starting with LMS 8.0 I no longer support my plugins/applets* ('see here for more information' (https://forums.slimdevices.com/showthread.php?49483-Announce-New-versions-of-erlands-plugins&p=998836&viewfull=1#post998836) ) ------------------------------------------------------------------------ erland's Profile: http://forums.slimdevices.com/member.php?userid=3124 View this thread: http://forums.slimdevices.com/showthread.php?t=106488
_______________________________________________ Squeezecenter mailing list Squeezecenter@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/squeezecenter