Skip to content

Commit

Permalink
Display info not only during dry-run
Browse files Browse the repository at this point in the history
  • Loading branch information
Schaka committed Feb 15, 2024
1 parent b707a4e commit 9ae52d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class JellyfinRestService(
?.let { jellyfinContent ->
if (!applicationProperties.dryRun) {
jellyfinUserClient.deleteItemAndFiles(jellyfinContent.Id)
log.info("Deleting {} {} from Jellyfin", jellyfinContent.SeriesName, jellyfinContent.Name)
} else {
log.info("Found {} {} on Jellyfin", jellyfinContent.SeriesName, jellyfinContent.Name)
}
Expand All @@ -66,6 +67,7 @@ class JellyfinRestService(
?.let { jellyfinContent ->
if (!applicationProperties.dryRun) {
jellyfinUserClient.deleteItemAndFiles(jellyfinContent.Id)
log.info("Deleting {} from Jellyfin", jellyfinContent.Name)
} else {
log.info("Found {} on Jellyfin", jellyfinContent.Name)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class RadarrService(
if (!applicationProperties.dryRun) {
unmonitorMovie(movie.id)
radarrClient.deleteMovie(movie.id)
log.info("Deleting movie ({}), id: {}, imdb: {}", movie.parentPath, movie.id, movie.imdbId)
} else {
log.info("Deleting movie ({}), id: {}, imdb: {}", movie.parentPath, movie.id, movie.imdbId)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class SonarrService(
if (episode.episodeFileId != null && episode.episodeFileId != 0) {
if (!applicationProperties.dryRun) {
sonarrClient.deleteEpisodeFile(episode.episodeFileId)
log.info("Deleting {} - episode {} ({}) of season {}", item.parentPath, episode.episodeNumber, episode.episodeFileId, episode.seasonNumber)
} else {
log.info("Deleting {} - episode {} ({}) of season {}", item.parentPath, episode.episodeNumber, episode.episodeFileId, episode.seasonNumber)
}
Expand All @@ -108,5 +109,6 @@ class SonarrService(
val seasonToEdit = series.seasons.firstOrNull { it.seasonNumber == seasonNumber }
seasonToEdit?.monitored = false
sonarrClient.updateSeries(seriesId, series)
log.info("Unmonitoring {} - season {}", series.title, seasonToEdit?.seasonNumber)
}
}

0 comments on commit 9ae52d9

Please sign in to comment.