mirror of
https://github.com/Sonarr/Sonarr
synced 2025-12-06 08:28:37 +01:00
parent
1178c98341
commit
e7c2e136a3
1 changed files with 25 additions and 9 deletions
|
|
@ -160,15 +160,31 @@ public ScriptImportDecision TryImport(string sourcePath, string destinationFileP
|
||||||
environmentVariables.Add("Sonarr_Download_Client", downloadClientInfo?.Name ?? string.Empty);
|
environmentVariables.Add("Sonarr_Download_Client", downloadClientInfo?.Name ?? string.Empty);
|
||||||
environmentVariables.Add("Sonarr_Download_Client_Type", downloadClientInfo?.Type ?? string.Empty);
|
environmentVariables.Add("Sonarr_Download_Client_Type", downloadClientInfo?.Type ?? string.Empty);
|
||||||
environmentVariables.Add("Sonarr_Download_Id", downloadId ?? string.Empty);
|
environmentVariables.Add("Sonarr_Download_Id", downloadId ?? string.Empty);
|
||||||
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_AudioChannels", MediaInfoFormatter.FormatAudioChannels(localEpisode.MediaInfo).ToString());
|
|
||||||
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_AudioCodec", MediaInfoFormatter.FormatAudioCodec(localEpisode.MediaInfo, null));
|
if (localEpisode.MediaInfo == null)
|
||||||
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_AudioLanguages", localEpisode.MediaInfo.AudioLanguages.Distinct().ConcatToString(" / "));
|
{
|
||||||
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_Languages", localEpisode.MediaInfo.AudioLanguages.ConcatToString(" / "));
|
_logger.Trace("MediaInfo is null for episode file import. This may cause issues with the import script.");
|
||||||
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_Height", localEpisode.MediaInfo.Height.ToString());
|
}
|
||||||
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_Width", localEpisode.MediaInfo.Width.ToString());
|
else
|
||||||
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_Subtitles", localEpisode.MediaInfo.Subtitles.ConcatToString(" / "));
|
{
|
||||||
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_VideoCodec", MediaInfoFormatter.FormatVideoCodec(localEpisode.MediaInfo, null));
|
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_AudioChannels",
|
||||||
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_VideoDynamicRangeType", MediaInfoFormatter.FormatVideoDynamicRangeType(localEpisode.MediaInfo));
|
MediaInfoFormatter.FormatAudioChannels(localEpisode.MediaInfo).ToString());
|
||||||
|
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_AudioCodec",
|
||||||
|
MediaInfoFormatter.FormatAudioCodec(localEpisode.MediaInfo, null));
|
||||||
|
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_AudioLanguages",
|
||||||
|
localEpisode.MediaInfo.AudioLanguages.Distinct().ConcatToString(" / "));
|
||||||
|
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_Languages",
|
||||||
|
localEpisode.MediaInfo.AudioLanguages.ConcatToString(" / "));
|
||||||
|
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_Height",
|
||||||
|
localEpisode.MediaInfo.Height.ToString());
|
||||||
|
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_Width", localEpisode.MediaInfo.Width.ToString());
|
||||||
|
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_Subtitles",
|
||||||
|
localEpisode.MediaInfo.Subtitles.ConcatToString(" / "));
|
||||||
|
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_VideoCodec",
|
||||||
|
MediaInfoFormatter.FormatVideoCodec(localEpisode.MediaInfo, null));
|
||||||
|
environmentVariables.Add("Sonarr_EpisodeFile_MediaInfo_VideoDynamicRangeType",
|
||||||
|
MediaInfoFormatter.FormatVideoDynamicRangeType(localEpisode.MediaInfo));
|
||||||
|
}
|
||||||
|
|
||||||
environmentVariables.Add("Sonarr_EpisodeFile_CustomFormat", string.Join("|", localEpisode.CustomFormats));
|
environmentVariables.Add("Sonarr_EpisodeFile_CustomFormat", string.Join("|", localEpisode.CustomFormats));
|
||||||
environmentVariables.Add("Sonarr_EpisodeFile_CustomFormatScore", localEpisode.CustomFormatScore.ToString());
|
environmentVariables.Add("Sonarr_EpisodeFile_CustomFormatScore", localEpisode.CustomFormatScore.ToString());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue