Regression: PrintJobHistory plugin repeatedly calls its API due to this plugin's `loadSettingsFromBrowserStore` no longer overwriting identically called function #9
Apparently, both this plugin (OctoPrint-SpoolManager) and OctoPrint-PrintJobHistory overwrite each others loadSettingsFromBrowserStore function. This is a bug on its own, but since the mentioned above commit makes it so that this plugin no longer registers a global function called loadSettingsFromBrowserStore, now OctoPrint-PrintJobHistory is able to use its own, slightly incorrectly written function (incorrectly, because it does not cast LocalStorage data to numbers, causing unnecessary API calls).
For a quick win, a global noop loadSettingsFromBrowserStore can be added.
For long term fix, a fork of OctoPrint-PrintJobHistory is necessary to fix the function (and make it no longer global to prevent overwrites).
Issue introduced in #1, this commit exactly: https://github.com/mdziekon/OctoPrint-SpoolManager/pull/2/commits/0dd8057a6258389638f311d15818431e36866e58#diff-3ee85462fec5e5ebdcd8f1a9664b487087c9f5925cc5f77cd04b4f0ae90aceddL48
Apparently, both this plugin (
OctoPrint-SpoolManager
) andOctoPrint-PrintJobHistory
overwrite each othersloadSettingsFromBrowserStore
function. This is a bug on its own, but since the mentioned above commit makes it so that this plugin no longer registers a global function calledloadSettingsFromBrowserStore
, nowOctoPrint-PrintJobHistory
is able to use its own, slightly incorrectly written function (incorrectly, because it does not cast LocalStorage data to numbers, causing unnecessary API calls).For a quick win, a global noop
loadSettingsFromBrowserStore
can be added. For long term fix, a fork ofOctoPrint-PrintJobHistory
is necessary to fix the function (and make it no longer global to prevent overwrites).