add stream loop option for m3u
This commit is contained in:
parent
f57dfc6a61
commit
6b2445aa2c
|
@ -4297,13 +4297,10 @@ namespace Emby.Server.Implementations.Data
|
|||
}
|
||||
}
|
||||
|
||||
if (query.HasDeadParentId.HasValue)
|
||||
{
|
||||
if (query.HasDeadParentId.Value)
|
||||
if (query.HasDeadParentId.HasValue && query.HasDeadParentId.Value)
|
||||
{
|
||||
whereClauses.Add("ParentId NOT NULL AND ParentId NOT IN (select guid from TypedBaseItems)");
|
||||
}
|
||||
}
|
||||
|
||||
if (query.Years.Length == 1)
|
||||
{
|
||||
|
|
|
@ -49,8 +49,13 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
|||
get { return "xmltv"; }
|
||||
}
|
||||
|
||||
private string GetLanguage()
|
||||
private string GetLanguage(ListingsProviderInfo info)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(info.PreferredLanguage))
|
||||
{
|
||||
return info.PreferredLanguage;
|
||||
}
|
||||
|
||||
return _config.Configuration.PreferredMetadataLanguage;
|
||||
}
|
||||
|
||||
|
@ -152,7 +157,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
|||
_logger.Debug("Getting xmltv programs for channel {0}", channelId);
|
||||
|
||||
var path = await GetXml(info.Path, cancellationToken).ConfigureAwait(false);
|
||||
var reader = new XmlTvReader(path, GetLanguage());
|
||||
var reader = new XmlTvReader(path, GetLanguage(info));
|
||||
|
||||
var results = reader.GetProgrammes(channelId, startDateUtc, endDateUtc, cancellationToken);
|
||||
return results.Select(p => GetProgramInfo(p, info));
|
||||
|
@ -254,7 +259,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
|||
{
|
||||
// In theory this should never be called because there is always only one lineup
|
||||
var path = await GetXml(info.Path, CancellationToken.None).ConfigureAwait(false);
|
||||
var reader = new XmlTvReader(path, GetLanguage());
|
||||
var reader = new XmlTvReader(path, GetLanguage(info));
|
||||
var results = reader.GetChannels();
|
||||
|
||||
// Should this method be async?
|
||||
|
@ -265,7 +270,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
|||
{
|
||||
// In theory this should never be called because there is always only one lineup
|
||||
var path = await GetXml(info.Path, cancellationToken).ConfigureAwait(false);
|
||||
var reader = new XmlTvReader(path, GetLanguage());
|
||||
var reader = new XmlTvReader(path, GetLanguage(info));
|
||||
var results = reader.GetChannels();
|
||||
|
||||
// Should this method be async?
|
||||
|
|
|
@ -148,7 +148,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
|||
},
|
||||
RequiresOpening = true,
|
||||
RequiresClosing = true,
|
||||
RequiresLooping = true,
|
||||
RequiresLooping = info.EnableStreamLooping,
|
||||
|
||||
ReadAtNativeFramerate = false,
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ namespace MediaBrowser.Model.LiveTv
|
|||
public bool ImportFavoritesOnly { get; set; }
|
||||
public bool AllowHWTranscoding { get; set; }
|
||||
public bool EnableTvgId { get; set; }
|
||||
public bool EnableStreamLooping { get; set; }
|
||||
|
||||
public TunerHostInfo()
|
||||
{
|
||||
|
@ -74,6 +75,7 @@ namespace MediaBrowser.Model.LiveTv
|
|||
public NameValuePair[] ChannelMappings { get; set; }
|
||||
public string MoviePrefix { get; set; }
|
||||
public bool EnableNewProgramIds { get; set; }
|
||||
public string PreferredLanguage { get; set; }
|
||||
|
||||
public ListingsProviderInfo()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user