diff --git a/MediaBrowser.Providers/Savers/EpisodeXmlSaver.cs b/MediaBrowser.Providers/Savers/EpisodeXmlSaver.cs
index 1b344d883..5413bd848 100644
--- a/MediaBrowser.Providers/Savers/EpisodeXmlSaver.cs
+++ b/MediaBrowser.Providers/Savers/EpisodeXmlSaver.cs
@@ -71,6 +71,11 @@ namespace MediaBrowser.Providers.Savers
builder.Append("" + SecurityElement.Escape(episode.IndexNumber.Value.ToString(_usCulture)) + "");
}
+ if (episode.IndexNumberEnd.HasValue)
+ {
+ builder.Append("" + SecurityElement.Escape(episode.IndexNumberEnd.Value.ToString(_usCulture)) + "");
+ }
+
if (episode.ParentIndexNumber.HasValue)
{
builder.Append("" + SecurityElement.Escape(episode.ParentIndexNumber.Value.ToString(_usCulture)) + "");
@@ -93,7 +98,8 @@ namespace MediaBrowser.Providers.Savers
"FirstAired",
"SeasonNumber",
"EpisodeNumber",
- "EpisodeName"
+ "EpisodeName",
+ "EpisodeNumberEnd"
});
// Set last refreshed so that the provider doesn't trigger after the file save
diff --git a/MediaBrowser.Providers/TV/EpisodeXmlParser.cs b/MediaBrowser.Providers/TV/EpisodeXmlParser.cs
index 837c7f4b9..d3abf397f 100644
--- a/MediaBrowser.Providers/TV/EpisodeXmlParser.cs
+++ b/MediaBrowser.Providers/TV/EpisodeXmlParser.cs
@@ -123,6 +123,22 @@ namespace MediaBrowser.Providers.TV
break;
}
+ case "EpisodeNumberEnd":
+ {
+ var number = reader.ReadElementContentAsString();
+
+ if (!string.IsNullOrWhiteSpace(number))
+ {
+ int num;
+
+ if (int.TryParse(number, out num))
+ {
+ item.IndexNumberEnd = num;
+ }
+ }
+ break;
+ }
+
case "EpisodeName":
{
var name = reader.ReadElementContentAsString();
diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs
index 25a254fa9..8ae5e34c2 100644
--- a/MediaBrowser.ServerApplication/ApplicationHost.cs
+++ b/MediaBrowser.ServerApplication/ApplicationHost.cs
@@ -274,7 +274,7 @@ namespace MediaBrowser.ServerApplication
RegisterSingleInstance(() => new LuceneSearchEngine(ApplicationPaths, LogManager, LibraryManager));
- SessionManager = new SessionManager(UserDataManager, ServerConfigurationManager, Logger, UserRepository);
+ SessionManager = new SessionManager(UserDataManager, ServerConfigurationManager, Logger, UserRepository, LibraryManager);
RegisterSingleInstance(SessionManager);
HttpServer = await _httpServerCreationTask.ConfigureAwait(false);