Buildout 3.59.1; Fixing preconfiguration loader

This commit is contained in:
James Barnsley
2021-10-02 20:25:56 +13:00
parent 99a1629d8d
commit a5494322ce
10 changed files with 49 additions and 31 deletions

View File

@ -1 +1 @@
3.59.0 3.59.1

View File

@ -3,7 +3,7 @@ import pathlib
from mopidy import config, ext from mopidy import config, ext
__version__ = "3.58.2" __version__ = "3.59.1"
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View File

@ -147972,37 +147972,46 @@ var App = /*#__PURE__*/function (_React$Component) {
var message = _hint$originalExcepti.message; // Filter out issues that destroy our quota and that are not informative enough to var message = _hint$originalExcepti.message; // Filter out issues that destroy our quota and that are not informative enough to
// actually resolve. // actually resolve.
if (message && (message.match(/Websocket/i) || message.match(/NotSupportedError/i) || message.match(/Non-Error promise rejection captured with keys: call, message, value/i) || message.match(/Cannot read property 'addChunk' of undefined/i))) { if (message && (message.match(/Websocket/i) || message.match(/NotSupportedError/i) || message.match(/NotSupportedError: The element has no supported sources./i) || message.match(/Non-Error promise rejection captured with keys: call, message, value/i) || message.match(/Cannot read property 'addChunk' of undefined/i))) {
return null; return null;
} }
return event; return event;
} }
}); });
} // Load query param settings } // Accept incoming preconfiguration via URL parameters and inject into application state.
// For example: iris?snapcast={"enabled":true,"host":"myserver.local"}
var configs = ['ui', 'spotify', 'pusher', 'snapcast', 'mopidy', 'google', 'lastfm', 'genius'];
var params = new URLSearchParams(window.location.search); var params = new URLSearchParams(window.location.search);
var changed = [];
var urlParams = params.forEach(function (v, k) {
if (!configs.includes(k)) return;
try { if (params) {
_util_storage__WEBPACK_IMPORTED_MODULE_51__["default"].set(k, JSON.parse(v)); params.forEach(function (value, key) {
changed.push(k); try {
} catch (error) { var json = JSON.parse(value);
console.error(error);
}
});
if (changed.length > 0) { switch (key) {
changed.forEach(function (k) { case 'ui':
return params["delete"](k); case 'spotify':
case 'pusher':
case 'snapcast':
case 'mopidy':
_this.props["".concat(key, "Actions")].set(json);
break;
default:
break;
}
} catch (e) {
console.error('Preconfiguration failed', {
e: e,
key: key,
value: value
});
return;
}
}); });
var url = window.location.toString().replace(window.location.search, params.toString());
console.log("Settings changed, redirecting to ".concat(url), changed);
window.location.assign(url);
} }
_this.handleInstallPrompt = _this.handleInstallPrompt.bind(_assertThisInitialized(_this)); _this.handleInstallPrompt = _this.handleInstallPrompt.bind(_assertThisInitialized(_this));
@ -169754,11 +169763,12 @@ function reducer() {
/*!*******************************************!*\ /*!*******************************************!*\
!*** ./src/js/services/pusher/actions.js ***! !*** ./src/js/services/pusher/actions.js ***!
\*******************************************/ \*******************************************/
/*! exports provided: setPort, setUsername, connect, disconnect, upgrade, reload, restart, localScan, getConnections, connectionAdded, updateConnection, connectionChanged, connectionRemoved, request, getConfig, getVersion, deliverBroadcast, deliverMessage, getRadio, startRadio, updateRadio, stopRadio, radioStarted, radioChanged, radioStopped, debug, getQueueMetadata, queueMetadataChanged, addQueueMetadata, getPinned, addPinned, removePinned, setPinned, pinnedUpdated, getCommands, setCommand, setCommands, removeCommand, runCommand, commandsUpdated */ /*! exports provided: set, setPort, setUsername, connect, disconnect, upgrade, reload, restart, localScan, getConnections, connectionAdded, updateConnection, connectionChanged, connectionRemoved, request, getConfig, getVersion, deliverBroadcast, deliverMessage, getRadio, startRadio, updateRadio, stopRadio, radioStarted, radioChanged, radioStopped, debug, getQueueMetadata, queueMetadataChanged, addQueueMetadata, getPinned, addPinned, removePinned, setPinned, pinnedUpdated, getCommands, setCommand, setCommands, removeCommand, runCommand, commandsUpdated */
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
__webpack_require__.r(__webpack_exports__); __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setPort", function() { return setPort; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setPort", function() { return setPort; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUsername", function() { return setUsername; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUsername", function() { return setUsername; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "connect", function() { return connect; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "connect", function() { return connect; });
@ -169799,6 +169809,12 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeCommand", function() { return removeCommand; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeCommand", function() { return removeCommand; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "runCommand", function() { return runCommand; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "runCommand", function() { return runCommand; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "commandsUpdated", function() { return commandsUpdated; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "commandsUpdated", function() { return commandsUpdated; });
function set(data) {
return {
type: 'PUSHER_SET',
data: data
};
}
function setPort(port) { function setPort(port) {
return { return {
type: 'PUSHER_SET_PORT', type: 'PUSHER_SET_PORT',
@ -170945,6 +170961,9 @@ function reducer() {
connecting: false connecting: false
}); });
case 'PUSHER_SET':
return _objectSpread(_objectSpread({}, pusher), action.data);
case 'PUSHER_SET_PORT': case 'PUSHER_SET_PORT':
return _objectSpread(_objectSpread({}, pusher), {}, { return _objectSpread(_objectSpread({}, pusher), {}, {
port: action.port port: action.port

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -115,8 +115,8 @@
// Release details // Release details
// These are automatically injected to built HTML // These are automatically injected to built HTML
var build = "1633136375"; var build = "1633159406";
var version = "3.58.2"; var version = "3.59.1";
// Construct the script tag // Construct the script tag
var js = document.createElement("script"); var js = document.createElement("script");

View File

@ -1,5 +1,5 @@
{ {
"manifest_version": "3.58.2", "manifest_version": "3.59.1",
"short_name": "Iris", "short_name": "Iris",
"name": "Iris", "name": "Iris",
"icons": [ "icons": [

View File

@ -1,6 +1,6 @@
{ {
"name": "mopidy-iris", "name": "mopidy-iris",
"version": "3.58.2", "version": "3.59.1",
"description": "Mopidy HTTP interface", "description": "Mopidy HTTP interface",
"repository": "https://github.com/jaedb/iris", "repository": "https://github.com/jaedb/iris",
"author": "James Barnsley <james@barnsley.nz>", "author": "James Barnsley <james@barnsley.nz>",

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name = Mopidy-Iris name = Mopidy-Iris
version = 3.58.2 version = 3.59.1
url = https://github.com/jaedb/iris url = https://github.com/jaedb/iris
author = James Barnsley author = James Barnsley
author_email = james@barnsley.nz author_email = james@barnsley.nz

View File

@ -121,7 +121,6 @@ export class App extends React.Component {
case 'snapcast': case 'snapcast':
case 'mopidy': case 'mopidy':
this.props[`${key}Actions`].set(json); this.props[`${key}Actions`].set(json);
changed.push(key);
break; break;
default: default:
break; break;