The Free Software Media System - Server Backend & API
add movie resolver fix
Luke Pulverentice0435a66d98
diff --git a/MediaBrowser.Api/Playback/Progressive/VideoService.cs b/MediaBrowser.Api/Playback/Progressive/VideoService.csindex 84ae26248f..1dfb433879 100644--- a/MediaBrowser.Api/Playback/Progressive/VideoService.cs+++ b/MediaBrowser.Api/Playback/Progressive/VideoService.cs@@ -17,6 +17,7 @@ namespace MediaBrowser.Api.Playback.Progressive/// <summary>/// Class GetVideoStream/// </summary>+ [Route("/Videos/{Id}/stream.mpegts", "GET")][Route("/Videos/{Id}/stream.ts", "GET")][Route("/Videos/{Id}/stream.webm", "GET")][Route("/Videos/{Id}/stream.asf", "GET")]diff --git a/MediaBrowser.Api/Reports/Stat/ReportStatBuilder.cs b/MediaBrowser.Api/Reports/Stat/ReportStatBuilder.csindex c9ee6337ff..fb694d6e13 100644--- a/MediaBrowser.Api/Reports/Stat/ReportStatBuilder.cs+++ b/MediaBrowser.Api/Reports/Stat/ReportStatBuilder.cs@@ -213,7 +213,7 @@ namespace MediaBrowser.Api.Reports};foreach (var item in t){- var ps = items.Where(x => x.People != null && x.SupportsPeople).SelectMany(x => x.People)+ var ps = items.SelectMany(x => _libraryManager.GetPeople(x)).Where(n => n.Type == item.ToString()).GroupBy(x => x.Name).OrderByDescending(x => x.Count())diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.csindex 5d054c3b9d..6d0a270da6 100644--- a/MediaBrowser.Controller/Entities/BaseItem.cs+++ b/MediaBrowser.Controller/Entities/BaseItem.cs@@ -62,6 +62,7 @@ namespace MediaBrowser.Controller.Entities/// Gets or sets the channel identifier./// </summary>/// <value>The channel identifier.</value>+ [IgnoreDataMember]public string ChannelId { get; set; }[IgnoreDataMember]@@ -554,6 +555,7 @@ namespace MediaBrowser.Controller.Entities/// Gets or sets the end date./// </summary>/// <value>The end date.</value>+ [IgnoreDataMember]public DateTime? EndDate { get; set; }/// <summary>@@ -586,12 +588,6 @@ namespace MediaBrowser.Controller.Entities/// <value>The overview.</value>public string Overview { get; set; }- /// <summary>- /// Gets or sets the people.- /// </summary>- /// <value>The people.</value>- public List<PersonInfo> People { get; set; }-/// <summary>/// Gets or sets the studios./// </summary>diff --git a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.csindex 2179c5ecd7..28f6deafaf 100644--- a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs+++ b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs@@ -22,10 +22,13 @@ namespace MediaBrowser.Controller.LiveTvpublic string SeriesTimerId { get; set; }public DateTime StartDate { get; set; }public RecordingStatus Status { get; set; }+ [IgnoreDataMember]public bool IsSports { get; set; }public bool IsNews { get; set; }+ [IgnoreDataMember]public bool IsKids { get; set; }public bool IsRepeat { get; set; }+ [IgnoreDataMember]public bool IsMovie { get; set; }public bool? IsHD { get; set; }public bool IsLive { get; set; }diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.csindex 12052905f2..937234b177 100644--- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs+++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs@@ -110,12 +110,14 @@ namespace MediaBrowser.Controller.LiveTv/// Gets or sets a value indicating whether this instance is movie./// </summary>/// <value><c>true</c> if this instance is movie; otherwise, <c>false</c>.</value>+ [IgnoreDataMember]public bool IsMovie { get; set; }/// <summary>/// Gets or sets a value indicating whether this instance is sports./// </summary>/// <value><c>true</c> if this instance is sports; otherwise, <c>false</c>.</value>+ [IgnoreDataMember]public bool IsSports { get; set; }/// <summary>@@ -140,6 +142,7 @@ namespace MediaBrowser.Controller.LiveTv/// Gets or sets a value indicating whether this instance is kids./// </summary>/// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>+ [IgnoreDataMember]public bool IsKids { get; set; }/// <summary>diff --git a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.csindex 960f8054a1..7688691090 100644--- a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs+++ b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs@@ -22,10 +22,13 @@ namespace MediaBrowser.Controller.LiveTvpublic string SeriesTimerId { get; set; }public DateTime StartDate { get; set; }public RecordingStatus Status { get; set; }+ [IgnoreDataMember]public bool IsSports { get; set; }public bool IsNews { get; set; }+ [IgnoreDataMember]public bool IsKids { get; set; }public bool IsRepeat { get; set; }+ [IgnoreDataMember]public bool IsMovie { get; set; }public bool? IsHD { get; set; }public bool IsLive { get; set; }diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.csindex cc9d9551c2..c8f4725368 100644--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs@@ -2181,7 +2181,7 @@ namespace MediaBrowser.Server.Implementations.Library}}- return item.People ?? new List<PersonInfo>();+ return new List<PersonInfo>();}public List<Person> GetPeopleItems(InternalPeopleQuery query)diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.csindex 0d1e4202ca..d9f23977cf 100644--- a/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs+++ b/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs@@ -309,20 +309,26 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies//we need to only look at the name of this actual item (not parents)var justName = item.IsInMixedFolder ? Path.GetFileName(item.Path) : Path.GetFileName(item.ContainingFolderPath);- // check for tmdb id- var tmdbid = justName.GetAttributeValue("tmdbid");-- if (!string.IsNullOrEmpty(tmdbid))+ if (!string.IsNullOrWhiteSpace(justName)){- item.SetProviderId(MetadataProviders.Tmdb, tmdbid);- }+ // check for tmdb id+ var tmdbid = justName.GetAttributeValue("tmdbid");- // check for imdb id - we use full media path, as we can assume, that this will match in any use case (wither id in parent dir or in file name)- var imdbid = item.Path.GetAttributeValue("imdbid");+ if (!string.IsNullOrWhiteSpace(tmdbid))+ {+ item.SetProviderId(MetadataProviders.Tmdb, tmdbid);+ }+ }- if (!string.IsNullOrEmpty(imdbid))+ if (!string.IsNullOrWhiteSpace(item.Path)){- item.SetProviderId(MetadataProviders.Imdb, imdbid);+ // check for imdb id - we use full media path, as we can assume, that this will match in any use case (wither id in parent dir or in file name)+ var imdbid = item.Path.GetAttributeValue("imdbid");++ if (!string.IsNullOrWhiteSpace(imdbid))+ {+ item.SetProviderId(MetadataProviders.Imdb, imdbid);+ }}}}diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.csindex 02b3080e47..bc6ed47ad6 100644--- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs+++ b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs@@ -329,7 +329,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerunRequiresClosing = true,BufferMs = 1000,Container = "ts",- Id = profile+ Id = profile,+ SupportsDirectPlay = true,+ SupportsDirectStream = false,+ SupportsTranscoding = true};return mediaSource;diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.csindex 00ebf7ea6e..86b4e7d1cb 100644--- a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs+++ b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs@@ -187,11 +187,16 @@ namespace MediaBrowser.Server.Implementations.Persistence/// </summary>private readonly SemaphoreSlim _writeLock = new SemaphoreSlim(1, 1);- private string[] _retriveItemColumns =+ private readonly string[] _retriveItemColumns ={"type","data",- "IsOffline"+ "EndDate",+ "IsOffline",+ "ChannelId",+ "IsMovie",+ "IsSports",+ "IsKids"};/// <summary>@@ -511,7 +516,36 @@ namespace MediaBrowser.Server.Implementations.Persistenceif (!reader.IsDBNull(2)){- item.IsOffline = reader.GetBoolean(2);+ item.EndDate = reader.GetDateTime(2).ToUniversalTime();+ }++ if (!reader.IsDBNull(3))+ {+ item.IsOffline = reader.GetBoolean(3);+ }++ if (!reader.IsDBNull(4))+ {+ item.ChannelId = reader.GetString(4);+ }++ var hasProgramAttributes = item as IHasProgramAttributes;+ if (hasProgramAttributes != null)+ {+ if (!reader.IsDBNull(5))+ {+ hasProgramAttributes.IsMovie = reader.GetBoolean(5);+ }++ if (!reader.IsDBNull(6))+ {+ hasProgramAttributes.IsSports = reader.GetBoolean(6);+ }++ if (!reader.IsDBNull(7))+ {+ hasProgramAttributes.IsKids = reader.GetBoolean(7);+ }}return item;diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csprojindex 7de14dac17..91a438ff75 100644--- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj+++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj@@ -90,9 +90,15 @@<Content Include="dashboard-ui\apiclient\sync\contentuploader.js"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></Content>+ <Content Include="dashboard-ui\apiclient\sync\mediasync.js">+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>+ </Content><Content Include="dashboard-ui\apiclient\sync\multiserversync.js"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></Content>+ <Content Include="dashboard-ui\apiclient\sync\offlineusersync.js">+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>+ </Content><Content Include="dashboard-ui\apiclient\sync\serversync.js"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></Content>@@ -159,6 +165,9 @@<Content Include="dashboard-ui\cordova\android\logging.js"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></Content>+ <Content Include="dashboard-ui\cordova\ios\vlcplayer.js">+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>+ </Content><Content Include="dashboard-ui\cordova\localassetmanager.js"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></Content>