diff --git a/package-lock.json b/package-lock.json index a4e1a13..a93a9f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "mellow", - "version": "2.8.0", + "version": "2.8.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index cdc94ca..78fcd8a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mellow", - "version": "2.8.0", + "version": "2.8.1", "main": "src/index.js", "author": "void* (https://github.com/v0idp)", "repository": { diff --git a/src/api/helpers/sonarr.js b/src/api/helpers/sonarr.js index 88af4cf..359369f 100644 --- a/src/api/helpers/sonarr.js +++ b/src/api/helpers/sonarr.js @@ -1,7 +1,7 @@ const TVMaze = require('../tvmaze.js'); const tvmaze = new TVMaze(); -module.exports = buildSonarrSeries = (series, sonarr) => { +module.exports = buildSonarrSeries = (series, sonarr, searchNow = false) => { if (sonarr.profile === "0" || sonarr.rootfolder === "0" || sonarr.rootfolder === "") { const errMsg = 'Please set quality profile and default root folder in sonarr config!'; console.log(errMsg); @@ -43,9 +43,9 @@ module.exports = buildSonarrSeries = (series, sonarr) => { Object.assign(newSeries, { addOptions: { - ignoreEpisodesWithFiles: false, + ignoreEpisodesWithFiles: true, ignoreEpisodesWithoutFiles: false, - searchForMissingEpisodes: false + searchForMissingEpisodes: searchNow } }); diff --git a/src/bots/services/sonarr.js b/src/bots/services/sonarr.js index 1dae692..1aabaaa 100644 --- a/src/bots/services/sonarr.js +++ b/src/bots/services/sonarr.js @@ -28,7 +28,7 @@ module.exports = class SonarrService { } addSeries(msg, msgEmbed, series) { - const newSeries = buildSonarrSeries(series, this.client.db.config['sonarr']); + const newSeries = buildSonarrSeries(series, this.client.db.config['sonarr'], true); if (typeof newSeries === "string") { return this.client.reply(msg, newSeries); }