update live tv hls params
This commit is contained in:
parent
3b9c04ad51
commit
ca5afcb0d2
|
@ -489,7 +489,7 @@ namespace Emby.Common.Implementations.Networking
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="path">The path.</param>
|
/// <param name="path">The path.</param>
|
||||||
/// <returns>IEnumerable{NetworkShare}.</returns>
|
/// <returns>IEnumerable{NetworkShare}.</returns>
|
||||||
public IEnumerable<NetworkShare> GetNetworkShares(string path)
|
public virtual IEnumerable<NetworkShare> GetNetworkShares(string path)
|
||||||
{
|
{
|
||||||
return new List<NetworkShare>();
|
return new List<NetworkShare>();
|
||||||
}
|
}
|
||||||
|
@ -498,7 +498,7 @@ namespace Emby.Common.Implementations.Networking
|
||||||
/// Gets available devices within the domain
|
/// Gets available devices within the domain
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>PC's in the Domain</returns>
|
/// <returns>PC's in the Domain</returns>
|
||||||
public IEnumerable<FileSystemEntryInfo> GetNetworkDevices()
|
public virtual IEnumerable<FileSystemEntryInfo> GetNetworkDevices()
|
||||||
{
|
{
|
||||||
return new List<FileSystemEntryInfo>();
|
return new List<FileSystemEntryInfo>();
|
||||||
}
|
}
|
||||||
|
|
|
@ -254,7 +254,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
||||||
"hls/" + Path.GetFileNameWithoutExtension(outputPath));
|
"hls/" + Path.GetFileNameWithoutExtension(outputPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
var args = string.Format("{0} {1} {2} -map_metadata -1 -threads {3} {4} {5} -avoid_negative_ts make_zero -fflags +genpts -sc_threshold 0 {6} -hls_time {7} -start_number {8} -hls_list_size {9}{10} -y \"{11}\"",
|
var args = string.Format("{0} {1} {2} -map_metadata -1 -threads {3} {4} {5} -sc_threshold 0 {6} -hls_time {7} -start_number {8} -hls_list_size {9}{10} -y \"{11}\"",
|
||||||
itsOffset,
|
itsOffset,
|
||||||
inputModifier,
|
inputModifier,
|
||||||
GetInputArgument(state),
|
GetInputArgument(state),
|
||||||
|
|
|
@ -89,7 +89,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
||||||
{
|
{
|
||||||
args += " -bsf:v h264_mp4toannexb";
|
args += " -bsf:v h264_mp4toannexb";
|
||||||
}
|
}
|
||||||
args += " -flags +global_header";
|
args += " -flags -global_header";
|
||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
||||||
args += GetGraphicalSubtitleParam(state, codec);
|
args += GetGraphicalSubtitleParam(state, codec);
|
||||||
}
|
}
|
||||||
|
|
||||||
args += " -flags +global_header";
|
args += " -flags -global_header";
|
||||||
|
|
||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace MediaBrowser.Providers.TV
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
|
|
||||||
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
|
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
|
||||||
private static readonly SemaphoreSlim _resourceLock = new SemaphoreSlim(1, 1);
|
private static readonly SemaphoreSlim ResourceLock = new SemaphoreSlim(1, 1);
|
||||||
public static bool IsRunning = false;
|
public static bool IsRunning = false;
|
||||||
private readonly IXmlReaderSettingsFactory _xmlSettings;
|
private readonly IXmlReaderSettingsFactory _xmlSettings;
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ namespace MediaBrowser.Providers.TV
|
||||||
|
|
||||||
public async Task Run(List<IGrouping<string, Series>> series, bool addNewItems, CancellationToken cancellationToken)
|
public async Task Run(List<IGrouping<string, Series>> series, bool addNewItems, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
await _resourceLock.WaitAsync(cancellationToken).ConfigureAwait(false);
|
await ResourceLock.WaitAsync(cancellationToken).ConfigureAwait(false);
|
||||||
IsRunning = true;
|
IsRunning = true;
|
||||||
|
|
||||||
foreach (var seriesGroup in series)
|
foreach (var seriesGroup in series)
|
||||||
|
@ -59,9 +59,10 @@ namespace MediaBrowser.Providers.TV
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
catch (IOException)
|
catch (IOException ex)
|
||||||
{
|
{
|
||||||
//_logger.Warn("Series files missing for series id {0}", seriesGroup.Key);
|
//_logger.Warn("Series files missing for series id {0}", seriesGroup.Key);
|
||||||
|
_logger.ErrorException("Error in missing episode provider for series id {0}", ex, seriesGroup.Key);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -70,12 +71,15 @@ namespace MediaBrowser.Providers.TV
|
||||||
}
|
}
|
||||||
|
|
||||||
IsRunning = false;
|
IsRunning = false;
|
||||||
_resourceLock.Release();
|
ResourceLock.Release();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Run(IGrouping<string, Series> group, bool addNewItems, CancellationToken cancellationToken)
|
private async Task Run(IGrouping<string, Series> group, bool addNewItems, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var tvdbId = group.Key;
|
var seriesList = group.ToList();
|
||||||
|
var tvdbId = seriesList
|
||||||
|
.Select(i => i.GetProviderId(MetadataProviders.Tvdb))
|
||||||
|
.FirstOrDefault(i => !string.IsNullOrWhiteSpace(i));
|
||||||
|
|
||||||
// Todo: Support series by imdb id
|
// Todo: Support series by imdb id
|
||||||
var seriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
var seriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||||
|
@ -114,30 +118,30 @@ namespace MediaBrowser.Providers.TV
|
||||||
.Where(i => i.Item1 != -1 && i.Item2 != -1)
|
.Where(i => i.Item1 != -1 && i.Item2 != -1)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
var hasBadData = HasInvalidContent(group);
|
var hasBadData = HasInvalidContent(seriesList);
|
||||||
|
|
||||||
var anySeasonsRemoved = await RemoveObsoleteOrMissingSeasons(group, episodeLookup)
|
var anySeasonsRemoved = await RemoveObsoleteOrMissingSeasons(seriesList, episodeLookup)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
var anyEpisodesRemoved = await RemoveObsoleteOrMissingEpisodes(group, episodeLookup)
|
var anyEpisodesRemoved = await RemoveObsoleteOrMissingEpisodes(seriesList, episodeLookup)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
var hasNewEpisodes = false;
|
var hasNewEpisodes = false;
|
||||||
|
|
||||||
if (addNewItems && !group.Any(i => !i.IsInternetMetadataEnabled()))
|
if (addNewItems && seriesList.All(i => i.IsInternetMetadataEnabled()))
|
||||||
{
|
{
|
||||||
var seriesConfig = _config.Configuration.MetadataOptions.FirstOrDefault(i => string.Equals(i.ItemType, typeof(Series).Name, StringComparison.OrdinalIgnoreCase));
|
var seriesConfig = _config.Configuration.MetadataOptions.FirstOrDefault(i => string.Equals(i.ItemType, typeof(Series).Name, StringComparison.OrdinalIgnoreCase));
|
||||||
|
|
||||||
if (seriesConfig == null || !seriesConfig.DisabledMetadataFetchers.Contains(TvdbSeriesProvider.Current.Name, StringComparer.OrdinalIgnoreCase))
|
if (seriesConfig == null || !seriesConfig.DisabledMetadataFetchers.Contains(TvdbSeriesProvider.Current.Name, StringComparer.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
hasNewEpisodes = await AddMissingEpisodes(group.ToList(), hasBadData, seriesDataPath, episodeLookup, cancellationToken)
|
hasNewEpisodes = await AddMissingEpisodes(seriesList, hasBadData, seriesDataPath, episodeLookup, cancellationToken)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasNewEpisodes || anySeasonsRemoved || anyEpisodesRemoved)
|
if (hasNewEpisodes || anySeasonsRemoved || anyEpisodesRemoved)
|
||||||
{
|
{
|
||||||
foreach (var series in group)
|
foreach (var series in seriesList)
|
||||||
{
|
{
|
||||||
var directoryService = new DirectoryService(_logger, _fileSystem);
|
var directoryService = new DirectoryService(_logger, _fileSystem);
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace MediaBrowser.ServerApplication.Networking
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="path">The path.</param>
|
/// <param name="path">The path.</param>
|
||||||
/// <returns>IEnumerable{NetworkShare}.</returns>
|
/// <returns>IEnumerable{NetworkShare}.</returns>
|
||||||
public IEnumerable<NetworkShare> GetNetworkShares(string path)
|
public override IEnumerable<NetworkShare> GetNetworkShares(string path)
|
||||||
{
|
{
|
||||||
Logger.Info("Getting network shares from {0}", path);
|
Logger.Info("Getting network shares from {0}", path);
|
||||||
return new ShareCollection(path).OfType<Share>().Select(ToNetworkShare);
|
return new ShareCollection(path).OfType<Share>().Select(ToNetworkShare);
|
||||||
|
@ -148,7 +148,7 @@ namespace MediaBrowser.ServerApplication.Networking
|
||||||
/// Gets available devices within the domain
|
/// Gets available devices within the domain
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>PC's in the Domain</returns>
|
/// <returns>PC's in the Domain</returns>
|
||||||
public IEnumerable<FileSystemEntryInfo> GetNetworkDevices()
|
public override IEnumerable<FileSystemEntryInfo> GetNetworkDevices()
|
||||||
{
|
{
|
||||||
return GetNetworkDevicesInternal().Select(c => new FileSystemEntryInfo
|
return GetNetworkDevicesInternal().Select(c => new FileSystemEntryInfo
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user