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