diff --git a/MediaBrowser.Providers/Savers/EpisodeXmlSaver.cs b/MediaBrowser.Providers/Savers/EpisodeXmlSaver.cs
index 2ed840f580..969732e390 100644
--- a/MediaBrowser.Providers/Savers/EpisodeXmlSaver.cs
+++ b/MediaBrowser.Providers/Savers/EpisodeXmlSaver.cs
@@ -78,7 +78,7 @@ namespace MediaBrowser.Providers.Savers
}
XmlSaverHelpers.AddCommonNodes(item, builder);
- XmlSaverHelpers.AppendMediaInfo(episode, builder);
+ XmlSaverHelpers.AddMediaInfo(episode, builder);
builder.Append("");
diff --git a/MediaBrowser.Providers/Savers/MovieXmlSaver.cs b/MediaBrowser.Providers/Savers/MovieXmlSaver.cs
index fec6e4958d..73cb2632f7 100644
--- a/MediaBrowser.Providers/Savers/MovieXmlSaver.cs
+++ b/MediaBrowser.Providers/Savers/MovieXmlSaver.cs
@@ -1,4 +1,6 @@
-using MediaBrowser.Controller.Configuration;
+using System.Globalization;
+using System.Security;
+using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Library;
@@ -51,6 +53,8 @@ namespace MediaBrowser.Providers.Savers
return false;
}
+ private static readonly CultureInfo UsCulture = new CultureInfo("en-US");
+
///
/// Saves the specified item.
///
@@ -64,13 +68,28 @@ namespace MediaBrowser.Providers.Savers
builder.Append("
");
XmlSaverHelpers.AddCommonNodes(item, builder);
- XmlSaverHelpers.AppendMediaInfo((Video)item, builder);
+
+ if (item.CommunityRating.HasValue)
+ {
+ builder.Append("" + SecurityElement.Escape(item.CommunityRating.Value.ToString(UsCulture)) + "");
+ }
+
+ if (!string.IsNullOrEmpty(item.Overview))
+ {
+ builder.Append("");
+ }
+
+ XmlSaverHelpers.AddMediaInfo((Video)item, builder);
builder.Append("");
var xmlFilePath = GetSavePath(item);
- XmlSaverHelpers.Save(builder, xmlFilePath, new string[] { });
+ XmlSaverHelpers.Save(builder, xmlFilePath, new[]
+ {
+ "IMDBrating",
+ "Description"
+ });
// Set last refreshed so that the provider doesn't trigger after the file save
MovieProviderFromXml.Current.SetLastRefreshed(item, DateTime.UtcNow);
diff --git a/MediaBrowser.Providers/Savers/XmlSaverHelpers.cs b/MediaBrowser.Providers/Savers/XmlSaverHelpers.cs
index 5a72fb5bff..40a6db3b20 100644
--- a/MediaBrowser.Providers/Savers/XmlSaverHelpers.cs
+++ b/MediaBrowser.Providers/Savers/XmlSaverHelpers.cs
@@ -57,7 +57,7 @@ namespace MediaBrowser.Providers.Savers
"RunningTime",
"Runtime",
"TagLine",
- "TagLines",
+ "Taglines",
"IMDB_ID",
"IMDB",
"IMDbId",
@@ -71,7 +71,9 @@ namespace MediaBrowser.Providers.Savers
"Tags",
"Added",
"LockData",
- "Trailer"
+ "Trailer",
+ "CriticRating",
+ "CriticRatingSummary"
});
var position = xml.ToString().LastIndexOf("", StringComparison.OrdinalIgnoreCase);
@@ -299,14 +301,14 @@ namespace MediaBrowser.Providers.Savers
{
builder.Append("" + SecurityElement.Escape(item.Taglines[0]) + "");
- builder.Append("");
+ builder.Append("");
foreach (var tagline in item.Taglines)
{
builder.Append("" + SecurityElement.Escape(tagline) + "");
}
- builder.Append("");
+ builder.Append("");
}
if (item.Genres.Count > 0)
@@ -369,60 +371,73 @@ namespace MediaBrowser.Providers.Savers
///
/// The item.
/// The builder.
- public static void AppendMediaInfo(T item, StringBuilder builder)
+ public static void AddMediaInfo(T item, StringBuilder builder)
where T : BaseItem, IHasMediaStreams
{
builder.Append("");
foreach (var stream in item.MediaStreams)
{
+ builder.Append("<" + stream.Type + ">");
+
+ if (!string.IsNullOrEmpty(stream.Codec))
+ {
+ builder.Append("" + SecurityElement.Escape(stream.Codec) + "");
+ builder.Append("" + SecurityElement.Escape(stream.Codec) + "");
+ }
+
+ if (stream.BitRate.HasValue)
+ {
+ builder.Append("" + stream.BitRate.Value.ToString(UsCulture) + "");
+ }
+
+ if (stream.Width.HasValue)
+ {
+ builder.Append("" + stream.Width.Value.ToString(UsCulture) + "");
+ }
+
+ if (stream.Height.HasValue)
+ {
+ builder.Append("" + stream.Height.Value.ToString(UsCulture) + "");
+ }
+
+ if (!string.IsNullOrEmpty(stream.AspectRatio))
+ {
+ builder.Append("" + SecurityElement.Escape(stream.AspectRatio) + "");
+ }
+
+ var framerate = stream.AverageFrameRate ?? stream.RealFrameRate;
+
+ if (framerate.HasValue)
+ {
+ builder.Append("" + framerate.Value.ToString(UsCulture) + "");
+ }
+
+ if (!string.IsNullOrEmpty(stream.Language))
+ {
+ builder.Append("" + SecurityElement.Escape(stream.Language) + "");
+ }
+
+ if (!string.IsNullOrEmpty(stream.ScanType))
+ {
+ builder.Append("" + SecurityElement.Escape(stream.ScanType) + "");
+ }
+
+ if (stream.Channels.HasValue)
+ {
+ builder.Append("" + stream.Channels.Value.ToString(UsCulture) + "");
+ }
+
+ if (stream.SampleRate.HasValue)
+ {
+ builder.Append("" + stream.SampleRate.Value.ToString(UsCulture) + "");
+ }
+
+ builder.Append("" + SecurityElement.Escape(stream.IsDefault.ToString()) + "");
+ builder.Append("" + SecurityElement.Escape(stream.IsForced.ToString()) + "");
+
if (stream.Type == MediaStreamType.Video)
{
- builder.Append("");
- }
- else if (stream.Type == MediaStreamType.Audio)
- {
- builder.Append("");
- }
- else if (stream.Type == MediaStreamType.Subtitle)
- {
- builder.Append("");
-
- if (!string.IsNullOrEmpty(stream.Language))
- {
- builder.Append("" + SecurityElement.Escape(stream.Language) + "");
- }
-
- builder.Append("" + SecurityElement.Escape(stream.IsDefault.ToString()) + "");
- builder.Append("" + SecurityElement.Escape(stream.IsForced.ToString()) + "");
-
- builder.Append("");
}
+
+ builder.Append("" + stream.Type + ">");
}
builder.Append("");