erland wrote: 
> I don’t  think this can be fixed without changing the Multi Library
> plugin code.
> 
> If the schema_clear.sql script is used to clear the database its strange
> that we see a problem at all because then the Multi Library tables
> shouldn’t be cleared even during a full rescan.
> https://github.com/Logitech/slimserver/blob/public/8.2/SQL/SQLite/schema_clear.sql
> From my memory the whole library.db was deleted during a full rescan but
> I can’t  find this in the code at the moment so it might have changed
> since Multi Library plugin was implemented. If library.db is deleted I’d
> expect the library ids to always start over from 1 after a full rescan.
> It’s also possible to reset it manually:
> https://www.designcise.com/web/tutorial/how-to-reset-autoincrement-number-sequence-in-sqlite
> However, please remember that the hash order is still unpredictable if
> you have more than a single library, so resetting the AUTOINCREMENT
> column isn’t really a solution.
> 
> The solution as I tried to indicate in my previous post is:
> 
> Basically:
> - Redefine multilibrary_libraries.id to not be an AUTOINCREMENT column.
> You should instead in the code manually calculate the next free id when
> a new library is created and its row is inserted in this table.
> max(id)+1 should work.
> - Make sure to save the library id in the prefs file for each library
> created
> - When initializing a library in the table, take the id from the prefs
> file
> Should be possible to implement the whole thing in initDatabaseLibrary
> function in MultiLibrary/Plugin.pm
> 
> A logic like this will make sure the ids stays the same as long as you
> don’t delete the prefs file or renames the library definition file.
Thanks.  Beyond my skills these days I'm afraid, but the problem is so
rare for me that the inconvenience if it does happen is not too bad :)



LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps.  2
Touches & EDO.
LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz
CR603 UPnP renderers.  
Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.  
Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.  
Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with
Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.
------------------------------------------------------------------------
PasTim's Profile: http://forums.slimdevices.com/member.php?userid=41642
View this thread: http://forums.slimdevices.com/showthread.php?t=49483

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

Reply via email to