New: Expand OnAlbumDownload, Add Synology handling (#372)

* New: Expand OnAlbumDownload, Add Synology handling

Fixes #324

* fixup: small naming correction

* fixup: Tests for Synology
This commit is contained in:
Qstick 2018-05-27 00:55:43 -04:00 committed by GitHub
parent 26d9c4ca3e
commit 030deaf6ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 58 additions and 27 deletions

View file

@ -117,6 +117,18 @@ namespace NzbDrone.Core.Notifications.CustomScript
environmentVariables.Add("Lidarr_Download_Client", message.DownloadClient ?? string.Empty);
environmentVariables.Add("Lidarr_Download_Id", message.DownloadId ?? string.Empty);
if (message.TrackFiles.Any())
{
environmentVariables.Add("Lidarr_AddedTrackRelativePaths", string.Join("|", message.TrackFiles.Select(e => e.RelativePath)));
environmentVariables.Add("Lidarr_AddedTrackPaths", string.Join("|", message.TrackFiles.Select(e => Path.Combine(artist.Path, e.RelativePath))));
}
if (message.OldFiles.Any())
{
environmentVariables.Add("Lidarr_DeletedRelativePaths", string.Join("|", message.OldFiles.Select(e => e.RelativePath)));
environmentVariables.Add("Lidarr_DeletedPaths", string.Join("|", message.OldFiles.Select(e => Path.Combine(artist.Path, e.RelativePath))));
}
ExecuteScript(environmentVariables);
}