diff --git a/NzbDrone.Common/EnvironmentProvider.cs b/NzbDrone.Common/EnvironmentProvider.cs index e080449c0..365a1f61f 100644 --- a/NzbDrone.Common/EnvironmentProvider.cs +++ b/NzbDrone.Common/EnvironmentProvider.cs @@ -11,6 +11,8 @@ public class EnvironmentProvider public const string NZBDRONE_PID = "NZBDRONE_PID"; public const string ROOT_MARKER = "NzbDrone.Web"; + public static readonly char[] NewLineChars = Environment.NewLine.ToCharArray(); + private static readonly string processName = Process.GetCurrentProcess().ProcessName.ToLower(); private static readonly EnvironmentProvider instance = new EnvironmentProvider(); diff --git a/NzbDrone.Core/Providers/Metadata/Xbmc.cs b/NzbDrone.Core/Providers/Metadata/Xbmc.cs index ca1319ba2..8182cc235 100644 --- a/NzbDrone.Core/Providers/Metadata/Xbmc.cs +++ b/NzbDrone.Core/Providers/Metadata/Xbmc.cs @@ -194,11 +194,12 @@ public override void CreateForEpisodeFile(EpisodeFile episodeFile, TvdbSeries tv doc.Save(xw); xmlResult += doc.ToString(); + xmlResult += Environment.NewLine; } } var filename = episodeFile.Path.Replace(Path.GetExtension(episodeFile.Path), ".nfo"); _logger.Debug("Saving episodedetails to: {0}", filename); - _diskProvider.WriteAllText(filename, xmlResult); + _diskProvider.WriteAllText(filename, xmlResult.Trim(EnvironmentProvider.NewLineChars)); } public override void RemoveForSeries(Series series)