From 702b540e564bd378f5a3d8484e9524a1d60620df Mon Sep 17 00:00:00 2001 From: Alvin Pergens Date: Mon, 20 Mar 2023 00:19:38 +0100 Subject: [PATCH] v2.1.1 --- docs/pages/EN/v2.1/home.html | 2 +- docs/pages/EN/v2.1/multi-actions.html | 5 +++++ docs/pages/FR/v2.1/home.html | 2 +- docs/pages/FR/v2.1/multi-actions.html | 5 +++++ main.js | 18 ++++++++---------- package.json | 2 +- scripts/multi-actions/script.js | 22 ++++++++++++---------- 7 files changed, 33 insertions(+), 23 deletions(-) diff --git a/docs/pages/EN/v2.1/home.html b/docs/pages/EN/v2.1/home.html index ab0e601..a0bb073 100644 --- a/docs/pages/EN/v2.1/home.html +++ b/docs/pages/EN/v2.1/home.html @@ -16,7 +16,7 @@

- The version is the one presented in this documentation: https://github.com/Arubinu/Scripts-Manager/releases/tag/v2.1.0. + The version is the one presented in this documentation: https://github.com/Arubinu/Scripts-Manager/releases/tag/v2.1.0.
But you can check all versions here: https://github.com/Arubinu/Scripts-Manager/releases.

You will find the software to download in the Assets part (this is not an installer but the complete software).
Put the software where you want to leave it before launching it, avoid folders where there is a request for administrator access (this software will never ask you for this kind of rights). diff --git a/docs/pages/EN/v2.1/multi-actions.html b/docs/pages/EN/v2.1/multi-actions.html index 6f4ab48..eed0ef0 100644 --- a/docs/pages/EN/v2.1/multi-actions.html +++ b/docs/pages/EN/v2.1/multi-actions.html @@ -670,6 +670,7 @@


This block receives the following variables: @@ -702,6 +703,10 @@

  • discord:webhook:mention:everyone (scope: Next, type: Boolean): if the message mentioned all users of the server.
  • discord:webhook:embeds:count (scope: Next, type: Number): number of message blocks present in this message (0 in this case).
  • +
    This block receives the following variables: + diff --git a/docs/pages/FR/v2.1/home.html b/docs/pages/FR/v2.1/home.html index bbaa6c0..877c2d9 100644 --- a/docs/pages/FR/v2.1/home.html +++ b/docs/pages/FR/v2.1/home.html @@ -16,7 +16,7 @@

    - La version est celle présenté dans cette documentation: https://github.com/Arubinu/Scripts-Manager/releases/tag/v2.1.0. + La version est celle présenté dans cette documentation: https://github.com/Arubinu/Scripts-Manager/releases/tag/v2.1.0.
    Mais vous pouvez consulter toutes les versions ici: https://github.com/Arubinu/Scripts-Manager/releases.

    Vous trouverez le logiciel à télécharger dans la partie Assets (ceci n'est pas un installeur mais le logiciel complet).
    Mettez le logiciel à l'endroit où vous voulez le laisser avant de le lancer, évitez les dossiers où il y a une demande d'accès administrateur (ce logiciel ne vous demandera jamais ce genre de droits). diff --git a/docs/pages/FR/v2.1/multi-actions.html b/docs/pages/FR/v2.1/multi-actions.html index ec5bf54..1808fc9 100644 --- a/docs/pages/FR/v2.1/multi-actions.html +++ b/docs/pages/FR/v2.1/multi-actions.html @@ -670,6 +670,7 @@


    Ce bloc reçoit les variables suivantes: @@ -703,6 +704,10 @@

  • discord:webhook:mention:everyone (scope: Next, type: Booléen): si le message a mentionné tous les utilisateurs du serveur.
  • discord:webhook:embeds:count (scope: Next, type: Nombre): nombre de blocs de message présents dans ce message (0 dans ce cas).
  • +
    Ce bloc reçoit les variables suivantes: + diff --git a/main.js b/main.js index 7ea9ff8..6143180 100644 --- a/main.js +++ b/main.js @@ -24,7 +24,7 @@ let win, menus = {}, addons = {}, exited = false, - manager = {}, + manager = { default: {} }, scripts = {}, tpc_state = false, store_clear = false, @@ -247,7 +247,7 @@ function create_server() { function create_window() { win = new BrowserWindow({ - show: !manager.default || !manager.default.systray, + show: !manager.default.systray, icon: APP_ICON, width: 1140, height: 630, @@ -523,10 +523,8 @@ async function save_config(type, id, data, override) { let config_path = path.join(__dirname, type, id); if (!fs.existsSync(config_path)) { - if (typeof manager === 'object' && typeof manager.default === 'object') { - if (typeof manager.default.all === 'string') { - config_path = path.join(manager.default.all, type, id); - } + if (typeof manager.default.all === 'string') { + config_path = path.join(manager.default.all, type, id); } } @@ -555,8 +553,8 @@ async function check_port(port) { }); s.once('listening', () => { console.log('listening'); - resolve(); - s.close(); + resolve(); + s.close(); }); s.listen(port); }); @@ -976,7 +974,7 @@ app.whenReady().then(() => { }); }; - if (typeof manager.default === 'object' && typeof manager.default.all === 'string') { + if (typeof manager.default.all === 'string') { const scripts_path = path.join(manager.default.all, 'scripts'); if (fs.existsSync(scripts_path)) { load_scripts(scripts_path).then(next).catch(next); @@ -988,7 +986,7 @@ app.whenReady().then(() => { }; load_manager_config(); - if (typeof manager.default === 'object' && typeof manager.default.all === 'string') { + if (typeof manager.default.all === 'string') { const addons_path = path.join(manager.default.all, 'addons'); if (fs.existsSync(addons_path)) { load_addons(addons_path).then(next).catch(next); diff --git a/package.json b/package.json index 708bcfc..157bff1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scripts-manager", - "version": "2.1.0", + "version": "2.1.1", "description": "Scripts Manager is a tool for streamers, developers, but also anyone who wants to automate actions on their computer.", "main": "main.js", "scripts": { diff --git a/scripts/multi-actions/script.js b/scripts/multi-actions/script.js index 2360448..d8aac6b 100644 --- a/scripts/multi-actions/script.js +++ b/scripts/multi-actions/script.js @@ -319,6 +319,10 @@ const functions = { }; const specials = [ + 'obs-studio-authentification', + 'obs-studio-connection', + 'obs-studio-recording', + 'obs-studio-replay', 'obs-studio-streaming', 'obs-studio-studio-mode', 'obs-studio-switch-scene', @@ -328,11 +332,7 @@ const specials = [ 'twitch-info', 'twitch-slow', 'twitch-subs-only', - 'twitch-unique-message', - 'obs-studio-authentification', - 'obs-studio-connection', - 'obs-studio-recording', - 'obs-studio-replay' + 'twitch-unique-message' ]; const actions = { @@ -993,7 +993,7 @@ const actions = { if (receive.id === 'obs-studio' && receive.name === 'StudioModeStateChanged') { set_variable('obs-studio:studio-mode', receive.data.studioModeEnabled, VARIABLE_TYPE.GLOBALS); - if (data.state === receive.data.studioModeEnabled) { + if (typeof next !== 'undefined' && data.state === receive.data.studioModeEnabled) { next(); } } @@ -1003,10 +1003,10 @@ const actions = { _sender('obs-studio', 'ToggleStudioMode', [state]); }, 'outputs-obs-studio-switch-scene': (module_name, receive, data, next_data, next) => { - if (data.scene && receive.id === 'obs-studio' && receive.name === 'CurrentProgramSceneChanged') { + if (receive.id === 'obs-studio' && receive.name === 'CurrentProgramSceneChanged') { set_variable('obs-studio:switch-scene', receive.data.sceneName, VARIABLE_TYPE.GLOBALS); - if (!data.scene || receive.data.sceneName.toLowerCase() === data.scene.toLowerCase()) { + if (typeof next !== 'undefined' && (!data.scene || receive.data.sceneName.toLowerCase() === data.scene.toLowerCase())) { next(); } } @@ -1131,7 +1131,7 @@ const actions = { const state = (receive.data.outputState === 'OBS_WEBSOCKET_OUTPUT_STARTED'); set_variable('obs-studio:virtualcam', state, VARIABLE_TYPE.GLOBALS); - if (data.state === state) { + if (typeof next !== 'undefined' && data.state === state) { next(); } } @@ -1412,7 +1412,9 @@ const actions = { set_variable('twitch:channel:game:id', receive.data.data.categoryId, VARIABLE_TYPE.GLOBALS); set_variable('twitch:channel:game:name', receive.data.data.categoryName, VARIABLE_TYPE.GLOBALS); - next(); + if (typeof next !== 'undefined') { + next(); + } }); } },