Merge branch 'beta' of https://github.com/MediaBrowser/Emby into beta
This commit is contained in:
commit
8cef129580
|
@ -847,12 +847,16 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|||
|
||||
var channelMappings = GetChannelMappings(provider.Item2);
|
||||
var channelNumber = channel.Number;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(channelNumber))
|
||||
{
|
||||
string mappedChannelNumber;
|
||||
if (channelMappings.TryGetValue(channelNumber, out mappedChannelNumber))
|
||||
{
|
||||
_logger.Debug("Found mapped channel on provider {0}. Tuner channel number: {1}, Mapped channel number: {2}", provider.Item1.Name, channelNumber, mappedChannelNumber);
|
||||
channelNumber = mappedChannelNumber;
|
||||
}
|
||||
}
|
||||
|
||||
var programs = await provider.Item1.GetProgramsAsync(provider.Item2, channelNumber, channel.Name, startDateUtc, endDateUtc, cancellationToken)
|
||||
.ConfigureAwait(false);
|
||||
|
|
|
@ -161,7 +161,14 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
|||
}
|
||||
else
|
||||
{
|
||||
programInfo.ShowId = ((p.Title ?? string.Empty) + (episodeTitle ?? string.Empty)).GetMD5().ToString("N");
|
||||
var uniqueString = (p.Title ?? string.Empty) + (episodeTitle ?? string.Empty);
|
||||
|
||||
if (programInfo.EpisodeNumber.HasValue)
|
||||
{
|
||||
uniqueString = "-" + programInfo.EpisodeNumber.Value.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
programInfo.ShowId = uniqueString.GetMD5().ToString("N");
|
||||
}
|
||||
|
||||
if (programInfo.IsMovie)
|
||||
|
|
|
@ -144,11 +144,18 @@ namespace Emby.Server.Implementations.TV
|
|||
// If viewing all next up for all series, remove first episodes
|
||||
// But if that returns empty, keep those first episodes (avoid completely empty view)
|
||||
var alwaysEnableFirstEpisode = !string.IsNullOrWhiteSpace(request.SeriesId);
|
||||
var anyFound = false;
|
||||
|
||||
return allNextUp
|
||||
.Where(i =>
|
||||
{
|
||||
if (alwaysEnableFirstEpisode || i.Item1 != DateTime.MinValue)
|
||||
{
|
||||
anyFound = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!anyFound && i.Item1 == DateTime.MinValue)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -213,6 +213,9 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
[ApiMember(Name = "MediaSourceId", Description = "The id of the MediaSource", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "DELETE")]
|
||||
public string MediaSourceId { get; set; }
|
||||
|
||||
[ApiMember(Name = "NextMediaType", Description = "The next media type that will play", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "DELETE")]
|
||||
public string NextMediaType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the position ticks.
|
||||
/// </summary>
|
||||
|
@ -363,7 +366,8 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
PositionTicks = request.PositionTicks,
|
||||
MediaSourceId = request.MediaSourceId,
|
||||
PlaySessionId = request.PlaySessionId,
|
||||
LiveStreamId = request.LiveStreamId
|
||||
LiveStreamId = request.LiveStreamId,
|
||||
NextMediaType = request.NextMediaType
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -699,16 +699,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
|
||||
private async Task<bool> DetectInterlaced(MediaSourceInfo video, MediaStream videoStream, string inputPath, string probeSizeArgument)
|
||||
{
|
||||
if (video.Protocol != MediaProtocol.File)
|
||||
{
|
||||
// If it's mpeg based, assume true
|
||||
if ((videoStream.Codec ?? string.Empty).IndexOf("mpeg", StringComparison.OrdinalIgnoreCase) != -1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
var formats = (video.Container ?? string.Empty).Split(',').ToList();
|
||||
var enableInterlacedDection = formats.Contains("vob", StringComparer.OrdinalIgnoreCase) ||
|
||||
formats.Contains("m2ts", StringComparer.OrdinalIgnoreCase) ||
|
||||
|
@ -733,6 +723,16 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
}
|
||||
}
|
||||
|
||||
if (video.Protocol != MediaProtocol.File)
|
||||
{
|
||||
// If it's mpeg based, assume true
|
||||
if ((videoStream.Codec ?? string.Empty).IndexOf("mpeg", StringComparison.OrdinalIgnoreCase) != -1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
var args = "{0} -i {1} -map 0:v:{2} -an -filter:v idet -frames:v 500 -an -f null /dev/null";
|
||||
|
||||
var process = _processFactory.Create(new ProcessOptions
|
||||
|
|
|
@ -47,5 +47,7 @@ namespace MediaBrowser.Model.Session
|
|||
/// </summary>
|
||||
/// <value><c>true</c> if failed; otherwise, <c>false</c>.</value>
|
||||
public bool Failed { get; set; }
|
||||
|
||||
public string NextMediaType { get; set; }
|
||||
}
|
||||
}
|
|
@ -271,7 +271,12 @@ namespace MediaBrowser.Providers.Movies
|
|||
//and the rest from crew
|
||||
if (movieData.casts != null && movieData.casts.crew != null)
|
||||
{
|
||||
var keepTypes = new[] { PersonType.Director, PersonType.Writer, PersonType.Producer };
|
||||
var keepTypes = new[]
|
||||
{
|
||||
PersonType.Director,
|
||||
PersonType.Writer,
|
||||
//PersonType.Producer
|
||||
};
|
||||
|
||||
foreach (var person in movieData.casts.crew)
|
||||
{
|
||||
|
|
|
@ -167,7 +167,12 @@ namespace MediaBrowser.Providers.TV
|
|||
//and the rest from crew
|
||||
if (credits.crew != null)
|
||||
{
|
||||
var keepTypes = new[] { PersonType.Director, PersonType.Writer, PersonType.Producer };
|
||||
var keepTypes = new[]
|
||||
{
|
||||
PersonType.Director,
|
||||
//PersonType.Writer,
|
||||
//PersonType.Producer
|
||||
};
|
||||
|
||||
foreach (var person in credits.crew)
|
||||
{
|
||||
|
|
|
@ -151,10 +151,13 @@ namespace MediaBrowser.WebDashboard.Api
|
|||
if (index != -1)
|
||||
{
|
||||
html = html.Substring(index);
|
||||
|
||||
html = html.Substring(html.IndexOf('>') + 1);
|
||||
|
||||
index = html.IndexOf("</body>", StringComparison.OrdinalIgnoreCase);
|
||||
if (index != -1)
|
||||
{
|
||||
html = html.Substring(0, index+7);
|
||||
html = html.Substring(0, index);
|
||||
}
|
||||
}
|
||||
var mainFile = _fileSystem.ReadAllText(GetDashboardResourcePath("index.html"));
|
||||
|
|
Loading…
Reference in New Issue
Block a user