remove config save, its unnecessary

This commit is contained in:
Evert Prants 2021-10-02 12:31:28 +03:00
parent 1dac4552d6
commit e3a918aecd
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
5 changed files with 7 additions and 9 deletions

View File

@ -3,11 +3,11 @@
"plugins": [ "plugins": [
{ {
"name": "syncplay", "name": "syncplay",
"version": "1.0.1" "version": "1.0.2"
}, },
{ {
"name": "syncplaystatus", "name": "syncplaystatus",
"version": "1.0.0" "version": "1.0.2"
} }
], ],
"typescript": true "typescript": true

View File

@ -2,7 +2,7 @@
"main": "plugin.js", "main": "plugin.js",
"name": "syncplay", "name": "syncplay",
"description": "Syncplay Service for Squeebot 3", "description": "Syncplay Service for Squeebot 3",
"version": "1.0.1", "version": "1.0.2",
"tags": ["service", "syncplay"], "tags": ["service", "syncplay"],
"dependencies": ["control?"], "dependencies": ["control?"],
"npmDependencies": [] "npmDependencies": []

View File

@ -362,9 +362,8 @@ class SyncplayServicePlugin extends Plugin {
@EventListener('pluginUnload') @EventListener('pluginUnload')
public unloadEventHandler(plugin: string | Plugin): void { public unloadEventHandler(plugin: string | Plugin): void {
if (plugin === this.name || plugin === this) { if (plugin === this.name || plugin === this) {
this.config.save().then(() =>
this.service?.stopAll().then(() => this.service?.stopAll().then(() =>
this.emit('pluginUnloaded', this))); this.emit('pluginUnloaded', this));
} }
} }
} }

View File

@ -2,7 +2,7 @@
"main": "plugin.js", "main": "plugin.js",
"name": "syncplaystatus", "name": "syncplaystatus",
"description": "Display status of a Syncplay protocol connection", "description": "Display status of a Syncplay protocol connection",
"version": "1.0.0", "version": "1.0.2",
"tags": ["syncplay", "commands", "status"], "tags": ["syncplay", "commands", "status"],
"dependencies": ["syncplay", "simplecommands"], "dependencies": ["syncplay", "simplecommands"],
"npmDependencies": [] "npmDependencies": []

View File

@ -31,8 +31,7 @@ class SPSPlugin extends Plugin {
@EventListener('pluginUnload') @EventListener('pluginUnload')
public unloadEventHandler(plugin: string | Plugin): void { public unloadEventHandler(plugin: string | Plugin): void {
if (plugin === this.name || plugin === this) { if (plugin === this.name || plugin === this) {
this.config.save().then(() => this.emit('pluginUnloaded', this);
this.emit('pluginUnloaded', this));
} }
} }