adding series in sonarr will now automatically set episodes without files to monitored and search for them

This commit is contained in:
void
2020-02-27 21:59:54 +01:00
parent fca990abd1
commit 7f6b6de170
4 changed files with 6 additions and 6 deletions

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{ {
"name": "mellow", "name": "mellow",
"version": "2.8.0", "version": "2.8.1",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "mellow", "name": "mellow",
"version": "2.8.0", "version": "2.8.1",
"main": "src/index.js", "main": "src/index.js",
"author": "void* <voidp@protonmail.com> (https://github.com/v0idp)", "author": "void* <voidp@protonmail.com> (https://github.com/v0idp)",
"repository": { "repository": {

View File

@@ -1,7 +1,7 @@
const TVMaze = require('../tvmaze.js'); const TVMaze = require('../tvmaze.js');
const tvmaze = new TVMaze(); 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 === "") { if (sonarr.profile === "0" || sonarr.rootfolder === "0" || sonarr.rootfolder === "") {
const errMsg = 'Please set quality profile and default root folder in sonarr config!'; const errMsg = 'Please set quality profile and default root folder in sonarr config!';
console.log(errMsg); console.log(errMsg);
@@ -43,9 +43,9 @@ module.exports = buildSonarrSeries = (series, sonarr) => {
Object.assign(newSeries, { Object.assign(newSeries, {
addOptions: { addOptions: {
ignoreEpisodesWithFiles: false, ignoreEpisodesWithFiles: true,
ignoreEpisodesWithoutFiles: false, ignoreEpisodesWithoutFiles: false,
searchForMissingEpisodes: false searchForMissingEpisodes: searchNow
} }
}); });

View File

@@ -28,7 +28,7 @@ module.exports = class SonarrService {
} }
addSeries(msg, msgEmbed, series) { 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") { if (typeof newSeries === "string") {
return this.client.reply(msg, newSeries); return this.client.reply(msg, newSeries);
} }