add movie resolver fix

pull/702/head
Luke Pulverenti 9 years ago
parent 38ff6565c6
commit ce0435a66d

@ -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")]

@ -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())

@ -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>

@ -22,10 +22,13 @@ namespace MediaBrowser.Controller.LiveTv
public 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; }

@ -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>

@ -22,10 +22,13 @@ namespace MediaBrowser.Controller.LiveTv
public 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; }

@ -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)

@ -309,23 +309,29 @@ 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);
if (!string.IsNullOrWhiteSpace(justName))
{
// check for tmdb id
var tmdbid = justName.GetAttributeValue("tmdbid");
if (!string.IsNullOrEmpty(tmdbid))
if (!string.IsNullOrWhiteSpace(tmdbid))
{
item.SetProviderId(MetadataProviders.Tmdb, tmdbid);
}
}
if (!string.IsNullOrWhiteSpace(item.Path))
{
// 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.IsNullOrEmpty(imdbid))
if (!string.IsNullOrWhiteSpace(imdbid))
{
item.SetProviderId(MetadataProviders.Imdb, imdbid);
}
}
}
}
/// <summary>
/// Finds a movie based on a child file system entries

@ -329,7 +329,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
RequiresClosing = true,
BufferMs = 1000,
Container = "ts",
Id = profile
Id = profile,
SupportsDirectPlay = true,
SupportsDirectStream = false,
SupportsTranscoding = true
};
return mediaSource;

@ -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.Persistence
if (!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;

@ -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>

Loading…
Cancel
Save