1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-01-10 23:29:53 +02:00

Fixed: Paths for renamed episode files in Custom Script and Webhook

This commit is contained in:
Bogdan 2024-08-26 01:17:54 +03:00 committed by Mark McDowall
parent 50d7e8fed4
commit a9b93dd9c6
2 changed files with 2 additions and 2 deletions

View File

@ -253,7 +253,7 @@ public override void OnRename(Series series, List<RenamedEpisodeFile> renamedFil
environmentVariables.Add("Sonarr_Series_Tags", string.Join("|", GetTagLabels(series)));
environmentVariables.Add("Sonarr_EpisodeFile_Ids", string.Join(",", renamedFiles.Select(e => e.EpisodeFile.Id)));
environmentVariables.Add("Sonarr_EpisodeFile_RelativePaths", string.Join("|", renamedFiles.Select(e => e.EpisodeFile.RelativePath)));
environmentVariables.Add("Sonarr_EpisodeFile_Paths", string.Join("|", renamedFiles.Select(e => e.EpisodeFile.Path)));
environmentVariables.Add("Sonarr_EpisodeFile_Paths", string.Join("|", renamedFiles.Select(e => Path.Combine(series.Path, e.EpisodeFile.RelativePath))));
environmentVariables.Add("Sonarr_EpisodeFile_PreviousRelativePaths", string.Join("|", renamedFiles.Select(e => e.PreviousRelativePath)));
environmentVariables.Add("Sonarr_EpisodeFile_PreviousPaths", string.Join("|", renamedFiles.Select(e => e.PreviousPath)));

View File

@ -13,7 +13,7 @@ public WebhookEpisodeFile(EpisodeFile episodeFile)
{
Id = episodeFile.Id;
RelativePath = episodeFile.RelativePath;
Path = episodeFile.Path;
Path = System.IO.Path.Combine(episodeFile.Series.Value.Path, episodeFile.RelativePath);
Quality = episodeFile.Quality.Quality.Name;
QualityVersion = episodeFile.Quality.Revision.Version;
ReleaseGroup = episodeFile.ReleaseGroup;