mirror of https://github.com/Sonarr/Sonarr
Minor XML tweaks for Metadata
This commit is contained in:
parent
6f57b83822
commit
27646310a1
|
@ -11,6 +11,8 @@ namespace NzbDrone.Common
|
||||||
public const string NZBDRONE_PID = "NZBDRONE_PID";
|
public const string NZBDRONE_PID = "NZBDRONE_PID";
|
||||||
public const string ROOT_MARKER = "NzbDrone.Web";
|
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 string processName = Process.GetCurrentProcess().ProcessName.ToLower();
|
||||||
|
|
||||||
private static readonly EnvironmentProvider instance = new EnvironmentProvider();
|
private static readonly EnvironmentProvider instance = new EnvironmentProvider();
|
||||||
|
|
|
@ -194,11 +194,12 @@ namespace NzbDrone.Core.Providers.Metadata
|
||||||
doc.Save(xw);
|
doc.Save(xw);
|
||||||
|
|
||||||
xmlResult += doc.ToString();
|
xmlResult += doc.ToString();
|
||||||
|
xmlResult += Environment.NewLine;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var filename = episodeFile.Path.Replace(Path.GetExtension(episodeFile.Path), ".nfo");
|
var filename = episodeFile.Path.Replace(Path.GetExtension(episodeFile.Path), ".nfo");
|
||||||
_logger.Debug("Saving episodedetails to: {0}", filename);
|
_logger.Debug("Saving episodedetails to: {0}", filename);
|
||||||
_diskProvider.WriteAllText(filename, xmlResult);
|
_diskProvider.WriteAllText(filename, xmlResult.Trim(EnvironmentProvider.NewLineChars));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void RemoveForSeries(Series series)
|
public override void RemoveForSeries(Series series)
|
||||||
|
|
Loading…
Reference in New Issue