Skip to content
This repository was archived by the owner on Feb 1, 2021. It is now read-only.

Commit

Permalink
Merge pull request #113 from v0idp/develop
Browse files Browse the repository at this point in the history
sonarr now searching after adding series
  • Loading branch information
v0idp authored Feb 27, 2020
2 parents a6de08a + 859bc2f commit bc5c26d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mellow",
"version": "2.8.0",
"version": "2.8.1",
"main": "src/index.js",
"author": "void* <voidp@protonmail.com> (https://github.com/v0idp)",
"repository": {
Expand Down
6 changes: 3 additions & 3 deletions src/api/helpers/sonarr.js
Original file line number Diff line number Diff line change
@@ -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);
Expand Down Expand Up @@ -43,9 +43,9 @@ module.exports = buildSonarrSeries = (series, sonarr) => {

Object.assign(newSeries, {
addOptions: {
ignoreEpisodesWithFiles: false,
ignoreEpisodesWithFiles: true,
ignoreEpisodesWithoutFiles: false,
searchForMissingEpisodes: false
searchForMissingEpisodes: searchNow
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/bots/services/sonarr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit bc5c26d

Please sign in to comment.