mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-31 20:24:21 -04:00
added default padding settings
This commit is contained in:
parent
733acb1966
commit
474cbbb87a
@ -11,7 +11,10 @@ namespace MediaBrowser.Model.LiveTv
|
|||||||
|
|
||||||
public List<TunerHostInfo> TunerHosts { get; set; }
|
public List<TunerHostInfo> TunerHosts { get; set; }
|
||||||
public List<ListingsProviderInfo> ListingProviders { get; set; }
|
public List<ListingsProviderInfo> ListingProviders { get; set; }
|
||||||
|
|
||||||
|
public int PrePaddingSeconds { get; set; }
|
||||||
|
public int PostPaddingSeconds { get; set; }
|
||||||
|
|
||||||
public LiveTvOptions()
|
public LiveTvOptions()
|
||||||
{
|
{
|
||||||
EnableMovieProviders = true;
|
EnableMovieProviders = true;
|
||||||
|
@ -937,7 +937,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
(item as MusicArtist).IsAccessedByName = true;
|
(item as MusicArtist).IsAccessedByName = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var task = item.UpdateToRepository(ItemUpdateType.None, CancellationToken.None);
|
var task = CreateItem(item, CancellationToken.None);
|
||||||
Task.WaitAll(task);
|
Task.WaitAll(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -483,7 +483,10 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
|
|
||||||
var provider = _providers.FirstOrDefault(i => string.Equals(i.GetType().FullName.GetMD5().ToString("N"), keys[0], StringComparison.OrdinalIgnoreCase));
|
var provider = _providers.FirstOrDefault(i => string.Equals(i.GetType().FullName.GetMD5().ToString("N"), keys[0], StringComparison.OrdinalIgnoreCase));
|
||||||
|
|
||||||
return new Tuple<IMediaSourceProvider, string>(provider, keys[1]);
|
var splitIndex = key.IndexOf(LiveStreamIdDelimeter);
|
||||||
|
var keyId = key.Substring(splitIndex + 1);
|
||||||
|
|
||||||
|
return new Tuple<IMediaSourceProvider, string>(provider, keyId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Timer _closeTimer;
|
private Timer _closeTimer;
|
||||||
|
@ -339,10 +339,12 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
|||||||
|
|
||||||
public Task<SeriesTimerInfo> GetNewTimerDefaultsAsync(CancellationToken cancellationToken, ProgramInfo program = null)
|
public Task<SeriesTimerInfo> GetNewTimerDefaultsAsync(CancellationToken cancellationToken, ProgramInfo program = null)
|
||||||
{
|
{
|
||||||
|
var config = GetConfiguration();
|
||||||
|
|
||||||
var defaults = new SeriesTimerInfo()
|
var defaults = new SeriesTimerInfo()
|
||||||
{
|
{
|
||||||
PostPaddingSeconds = 0,
|
PostPaddingSeconds = Math.Max(config.PostPaddingSeconds, 0),
|
||||||
PrePaddingSeconds = 0,
|
PrePaddingSeconds = Math.Max(config.PrePaddingSeconds, 0),
|
||||||
RecordAnyChannel = false,
|
RecordAnyChannel = false,
|
||||||
RecordAnyTime = false,
|
RecordAnyTime = false,
|
||||||
RecordNewOnly = false
|
RecordNewOnly = false
|
||||||
|
@ -889,8 +889,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||||||
|
|
||||||
if (query.Limit.HasValue)
|
if (query.Limit.HasValue)
|
||||||
{
|
{
|
||||||
programs = programs.Take(query.Limit.Value)
|
programs = programs.Take(query.Limit.Value);
|
||||||
.OrderBy(i => i.StartDate);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
programList = programs.ToList();
|
programList = programs.ToList();
|
||||||
|
@ -125,7 +125,12 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||||||
const bool isAudio = false;
|
const bool isAudio = false;
|
||||||
|
|
||||||
var keys = openToken.Split(new[] { StreamIdDelimeter }, 3);
|
var keys = openToken.Split(new[] { StreamIdDelimeter }, 3);
|
||||||
var mediaSourceId = keys.Length >= 3 ? keys[2] : null;
|
string mediaSourceId = null;
|
||||||
|
|
||||||
|
if (keys.Length >= 3)
|
||||||
|
{
|
||||||
|
mediaSourceId = openToken.Substring(keys[0].Length + keys[1].Length + 2);
|
||||||
|
}
|
||||||
|
|
||||||
if (string.Equals(keys[0], typeof(LiveTvChannel).Name, StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(keys[0], typeof(LiveTvChannel).Name, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
|||||||
private readonly IHttpClient _httpClient;
|
private readonly IHttpClient _httpClient;
|
||||||
private readonly IJsonSerializer _jsonSerializer;
|
private readonly IJsonSerializer _jsonSerializer;
|
||||||
|
|
||||||
public HdHomerunHost(IConfigurationManager config, ILogger logger, IHttpClient httpClient, IJsonSerializer jsonSerializer) : base(config, logger)
|
public HdHomerunHost(IConfigurationManager config, ILogger logger, IHttpClient httpClient, IJsonSerializer jsonSerializer)
|
||||||
|
: base(config, logger)
|
||||||
{
|
{
|
||||||
_httpClient = httpClient;
|
_httpClient = httpClient;
|
||||||
_jsonSerializer = jsonSerializer;
|
_jsonSerializer = jsonSerializer;
|
||||||
@ -166,6 +167,11 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
|||||||
{
|
{
|
||||||
var url = info.Url;
|
var url = info.Url;
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(url))
|
||||||
|
{
|
||||||
|
throw new ArgumentException("Invalid tuner info");
|
||||||
|
}
|
||||||
|
|
||||||
if (!url.StartsWith("http", StringComparison.OrdinalIgnoreCase))
|
if (!url.StartsWith("http", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
url = "http://" + url;
|
url = "http://" + url;
|
||||||
@ -382,7 +388,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
|||||||
|
|
||||||
public async Task Validate(TunerHostInfo info)
|
public async Task Validate(TunerHostInfo info)
|
||||||
{
|
{
|
||||||
await GetChannels(info, false, CancellationToken.None).ConfigureAwait(false);
|
if (info.IsEnabled)
|
||||||
|
{
|
||||||
|
await GetChannels(info, false, CancellationToken.None).ConfigureAwait(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task<bool> IsAvailableInternal(TunerHostInfo tuner, string channelId, CancellationToken cancellationToken)
|
protected override async Task<bool> IsAvailableInternal(TunerHostInfo tuner, string channelId, CancellationToken cancellationToken)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
//[assembly: AssemblyVersion("3.0.*")]
|
[assembly: AssemblyVersion("3.0.*")]
|
||||||
[assembly: AssemblyVersion("3.0.5713.0")]
|
//[assembly: AssemblyVersion("3.0.5713.0")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user