mirror of
https://github.com/v0idp/Mellow.git
synced 2026-01-05 21:30:09 -06:00
added helper function for radarr to build Movie object
This commit is contained in:
@@ -1 +1,27 @@
|
||||
// TODO: Add helper for Radarr Movie
|
||||
module.exports = buildRadarrMovie = (movie, radarr, searchNow = false) => {
|
||||
if (radarr.profile === "0" || radarr.rootfolder === "0") {
|
||||
console.log("Please set quality profile and default root folder in radarr config!");
|
||||
return undefined;
|
||||
}
|
||||
|
||||
let newMovie = {
|
||||
title = movie.title,
|
||||
tmdbId = movie.tmdbId,
|
||||
qualityProfileId = parseInt(radarr.profile),
|
||||
rootFolderPath = parseInt(radarr.rootfolder),
|
||||
titleSlug = movie.titleSlug,
|
||||
monitored = true,
|
||||
year = movie.year,
|
||||
images = movie.images,
|
||||
minimumAvailability = radarr.minimumavailability
|
||||
};
|
||||
|
||||
newMovie = {
|
||||
...newMovie,
|
||||
addOptions: {
|
||||
searchForMovie: searchNow
|
||||
}
|
||||
}
|
||||
|
||||
return newMovie;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ const tvmaze = new TVMaze();
|
||||
|
||||
module.exports = buildSonarrSeries = (series, sonarr) => {
|
||||
if (sonarr.profile === "0" || sonar.rootfolder === "0") {
|
||||
console.log("Please set quality profiles and default root folders in sonarr config!");
|
||||
console.log("Please set quality profile and default root folder in sonarr config!");
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -46,4 +46,4 @@ module.exports = buildSonarrSeries = (series, sonarr) => {
|
||||
}
|
||||
|
||||
return newSeries;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user