Home of the Squeezebox™ & Transporter® network music players.
Page 196 of 199 FirstFirst ... 96146186194195196197198 ... LastLast
Results 1,951 to 1,960 of 1988
  1. #1951
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,284
    Quote Originally Posted by PasTim View Post
    I have, on very rare occasions (I think only when completely resetting LMS), seen the id numbers increase, and rather than rescanning I have changed the ids back to where they were (1 and 2 on my system).
    I think I might have identified the issue, unfortunately I think itís a reasonably big issue and Iím a bit surprised that it works predictable for anyone after a full rescan.

    As the logic works the multilibrary_libraries.id values is reused as long as a matching multilibrary_libraries.libraryid is found in the table. This means that id should never change purely due to an upgrade, new/changed files rescan or playlist rescan. However, if the contents of library.db is cleared, which happens in a full rescan or a new installation, the libraries will be re-created from scratch and when this happens they can potentially get new ids. As long as multilibrary_libraries table isnít cleared the libraries should keep their id.

    The order the libraries are recreated will affect which library that gets the lowest and highest id. This order is unfortunately very unpredictable as itís just the order of the hash in the following for-loop:
    https://github.com/erland/lms-multil...Plugin.pm#L326
    Sorting the hash keys would make it a bit more predictable but it would not be a solution since creating a new library with a file name thatís alphabetically in the middle of existing libraries would cause itself and the libraries after it to get a new id after next rescan.

    Iím also not 100% sure the AUTOINCREMENT id column always is reset so the first library created gets id 1. If library.db is completely deleted it probably will but I donít remember exactly how this is handled in the full rescan. If AUTOINCREMENT is reset to 1 during a full rescan and the hashing order hasnít been changed due to Perl upgrade or similar, the id would probably be the same after each full rescan. But the hash order is very undefined and can likely change due to other things than Perl version, so I really think itís pure luck that this works reliable for anyone with more than a single library.

    If someone deletes a library and re-creates it, it will likely get a higher id and after next full rescan the id will be decreased if AUTOINCREMENT results in id starting from 1 again.

    So to sum it up, I have to admit that the implementation is really a mess and Iím surprised I didnít notice it myself when implementing the plugin.

    A solution to this really need to store an id in either the library configuration file or in the prefs file of each library and replace the AUTOINCREMENT column with a manually updated integer and make sure to take the value from prefs/library configuration when creating the row in multilibrary_libraries table, which happens here:
    https://github.com/erland/lms-multil...Plugin.pm#L352
    Itís probably easiest to store Id in prefs because then it can be completely handled in initDatabaseLibrary function and doesnít have to affect other parts of the code.

    Just wrote the above if someone wants to try to fix the problem and release a new version of the plugin. Personally Iíd still advice people that have the possibility to switch to the built-in virtual libraries functionality rather than using the currently unsupported Multi Library plugin. Of course, switching to built-in virtual library functionality wonít work for everyone since they rely on functionality in Custom Browse and SQL Playlist plugins which currently doesnít support virtual libraries.

    I wish I had the time to fix my own mess but unfortunately other things in my life (family, day work) is currently more important so itís unlikely to happen in the foreseeable future, really sorry for this. If someone else wants to fix it and distribute a new plugin version Iím happy to try to answer any questions or review smaller code changes.
    Erland Isaksson (My homepage)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

  2. #1952
    Senior Member SlimChances's Avatar
    Join Date
    Apr 2005
    Posts
    1,761
    Erland Thanks for looking into this. I completely understand you do not have the time to work on the plugins like you did in the past. I was hoping that the error was at my end. Yes perhaps someone will pick up where you left, I am afraid I do not have those technical skills.
    Logitech Media Server Version: 8.2.0 - 1614639334 @ Tue Mar 2 00:11:57 CET 2021
    Operating system: Debian - EN - utf8
    Platform Architecture: x86_64-linux
    Perl Version: 5.30.0 - x86_64-linux-gnu-thread-multi
    IO::Socket::SSL: 2.067
    Database Version: DBD::SQLite 1.58 (sqlite 3.22.0)

    One SB Touch connected by Ethernet - Denon AVR -1912 Receiver, Paradigm 4.1 speakers
    SB Touch connected by Optical to Sabaj A4
    amp and Energy bookshelf speakers
    Two SB Radios wireless

  3. #1953
    Senior Member madpatrick's Avatar
    Join Date
    Apr 2006
    Location
    Hellevoetsluis, Netherlands
    Posts
    137
    Hi
    I know that by upgrading to the latest version it could break Erlands apps.
    I was running LMS 8.1.1 for a few months without any problem.
    This weekend i took the risk of upgrading my Touch to the latest firmware.
    After grade and reinstalling the features it hangs my Touch after a few minutes.
    Downgrading to the official firmware did not resolve the issue.

    After a lot resets and trails i found out the using fonts in Custom Clock was the problem.
    I was using some custom fonts in .zip file for years.
    Now these lead to a freeze of my Touch.

    Does anybody having the same problem or is there a solution for this.
    Or has the update of the firmware or LMS broke this function in Custom Clock ?
    -
    Patrick

  4. #1954
    Senior Member
    Join Date
    Nov 2010
    Location
    Hertfordshire, UK
    Posts
    3,244
    Quote Originally Posted by erland View Post
    I think I might have identified the issue, unfortunately I think itís a reasonably big issue and Iím a bit surprised that it works predictable for anyone after a full rescan.

    As the logic works the multilibrary_libraries.id values is reused as long as a matching multilibrary_libraries.libraryid is found in the table. This means that id should never change purely due to an upgrade, new/changed files rescan or playlist rescan. However, if the contents of library.db is cleared, which happens in a full rescan or a new installation, the libraries will be re-created from scratch and when this happens they can potentially get new ids. As long as multilibrary_libraries table isnít cleared the libraries should keep their id.

    The order the libraries are recreated will affect which library that gets the lowest and highest id. This order is unfortunately very unpredictable as itís just the order of the hash in the following for-loop:
    https://github.com/erland/lms-multil...Plugin.pm#L326
    Sorting the hash keys would make it a bit more predictable but it would not be a solution since creating a new library with a file name thatís alphabetically in the middle of existing libraries would cause itself and the libraries after it to get a new id after next rescan.

    Iím also not 100% sure the AUTOINCREMENT id column always is reset so the first library created gets id 1. If library.db is completely deleted it probably will but I donít remember exactly how this is handled in the full rescan. If AUTOINCREMENT is reset to 1 during a full rescan and the hashing order hasnít been changed due to Perl upgrade or similar, the id would probably be the same after each full rescan. But the hash order is very undefined and can likely change due to other things than Perl version, so I really think itís pure luck that this works reliable for anyone with more than a single library.

    If someone deletes a library and re-creates it, it will likely get a higher id and after next full rescan the id will be decreased if AUTOINCREMENT results in id starting from 1 again.

    So to sum it up, I have to admit that the implementation is really a mess and Iím surprised I didnít notice it myself when implementing the plugin.

    A solution to this really need to store an id in either the library configuration file or in the prefs file of each library and replace the AUTOINCREMENT column with a manually updated integer and make sure to take the value from prefs/library configuration when creating the row in multilibrary_libraries table, which happens here:
    https://github.com/erland/lms-multil...Plugin.pm#L352
    Itís probably easiest to store Id in prefs because then it can be completely handled in initDatabaseLibrary function and doesnít have to affect other parts of the code.

    Just wrote the above if someone wants to try to fix the problem and release a new version of the plugin. Personally Iíd still advice people that have the possibility to switch to the built-in virtual libraries functionality rather than using the currently unsupported Multi Library plugin. Of course, switching to built-in virtual library functionality wonít work for everyone since they rely on functionality in Custom Browse and SQL Playlist plugins which currently doesnít support virtual libraries.

    I wish I had the time to fix my own mess but unfortunately other things in my life (family, day work) is currently more important so itís unlikely to happen in the foreseeable future, really sorry for this. If someone else wants to fix it and distribute a new plugin version Iím happy to try to answer any questions or review smaller code changes.
    Thanks for that. Very interesting. Do you think there is there any way of intervening after LMS has deleted library.db and manually resetting the contents before any damage is done to related data?
    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.

  5. #1955
    Senior Member
    Join Date
    Nov 2010
    Location
    Hertfordshire, UK
    Posts
    3,244
    Quote Originally Posted by madpatrick View Post
    Hi
    I know that by upgrading to the latest version it could break Erlands apps.
    I was running LMS 8.1.1 for a few months without any problem.
    This weekend i took the risk of upgrading my Touch to the latest firmware.
    After grade and reinstalling the features it hangs my Touch after a few minutes.
    Downgrading to the official firmware did not resolve the issue.

    After a lot resets and trails i found out the using fonts in Custom Clock was the problem.
    I was using some custom fonts in .zip file for years.
    Now these lead to a freeze of my Touch.

    Does anybody having the same problem or is there a solution for this.
    Or has the update of the firmware or LMS broke this function in Custom Clock ?
    Has the firmware changed in the last 6 years or so? fab4_7.8.0_r16754 is the latest I've seen, dating back to 2014. What are you using?

    Did you ever load any extra fonts onto the Touch in the past (the sort of thing I do and then totally forget about it.
    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.

  6. #1956
    Senior Member madpatrick's Avatar
    Join Date
    Apr 2006
    Location
    Hellevoetsluis, Netherlands
    Posts
    137
    Quote Originally Posted by PasTim View Post
    Has the firmware changed in the last 6 years or so? fab4_7.8.0_r16754 is the latest I've seen, dating back to 2014. What are you using?

    Did you ever load any extra fonts onto the Touch in the past (the sort of thing I do and then totally forget about it.
    There is a new cummunity firmware 8.0 which is developed my forum members.
    See https://forums.slimdevices.com/showt...light=Firmware

    Good point about the fonts. No, i’ve not changed this for a few years. Not sure how long, but propably at least 2 years.
    -
    Patrick

  7. #1957
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,284
    Quote Originally Posted by PasTim View Post
    Thanks for that. Very interesting. Do you think there is there any way of intervening after LMS has deleted library.db and manually resetting the contents before any damage is done to related data?
    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/slimserv...hema_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/tutor...ence-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:

    A solution to this really need to store an id in either the library configuration file or in the prefs file of each library and replace the AUTOINCREMENT column with a manually updated integer and make sure to take the value from prefs/library configuration when creating the row in multilibrary_libraries table, which happens here:
    https://github.com/erland/lms-multil...Plugin.pm#L352
    Itís probably easiest to store Id in prefs because then it can be completely handled in initDatabaseLibrary function and doesnít have to affect other parts of the code.
    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.
    Erland Isaksson (My homepage)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

  8. #1958
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,284
    Quote Originally Posted by madpatrick View Post
    Hi
    After a lot resets and trails i found out the using fonts in Custom Clock was the problem.
    I was using some custom fonts in .zip file for years.
    Now these lead to a freeze of my Touch.
    Is the font url still available ? Has the site itís hosted on switched to https ?
    The Touch wonít be able to download fonts using https. Even if the url is http the site could redirect it to https and that would cause the same problem.

    Post the font url if you arenít sure and someone here might be able to help you verify it.

    Not sure why it would hang the whole Touch but I might have assumed that the fonts could be downloaded in the Custom Clock code.
    Erland Isaksson (My homepage)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

  9. #1959
    Senior Member madpatrick's Avatar
    Join Date
    Apr 2006
    Location
    Hellevoetsluis, Netherlands
    Posts
    137
    Quote Originally Posted by erland View Post
    Is the font url still available ? Has the site itís hosted on switched to https ?
    The Touch wonít be able to download fonts using https. Even if the url is http the site could redirect it to https and that would cause the same problem.

    Post the font url if you arenít sure and someone here might be able to help you verify it.

    Not sure why it would hang the whole Touch but I might have assumed that the fonts could be downloaded in the Custom Clock code.
    Hello Erland,

    Thanks for replying.
    Your complete were right. My webserver redirects to HTTPS. This has been so since a few years, but propobly the font was in the cache of my touch or something.
    Move the fonts to another HTTP location and it is working

    Is it possible to placve the font on the Touch locally and link it this ?
    -
    Patrick

  10. #1960
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,284
    Quote Originally Posted by madpatrick View Post
    Hello Erland,

    Thanks for replying.
    Your complete were right. My webserver redirects to HTTPS. This has been so since a few years, but propobly the font was in the cache of my touch or something.
    Move the fonts to another HTTP location and it is working

    Is it possible to placve the font on the Touch locally and link it this ?
    I think you should be able to put the ttf file in /usr/share/jive/applets/CustomClock/fonts/ or /usr/share/jive/fonts/
    This is the code that handles the download and if I read it correctly it checks the above directories before it tries to download the font.
    https://github.com/erland/squeezebox...plet.lua#L1532
    Erland Isaksson (My homepage)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •