aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-06-24 14:32:22 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-06-24 14:32:22 -0400
commit6b2445aa2c224b9d03e6a1d295e43ee6363a5d5f (patch)
treed00a58080dace3aceb8deae47164f3b7b8c3d353 /Emby.Server.Implementations
parentf57dfc6a619efac5d902c1ab8cfd8cbfc38f8e94 (diff)
add stream loop option for m3u
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/Data/SqliteItemRepository.cs7
-rw-r--r--Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs13
-rw-r--r--Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs2
3 files changed, 12 insertions, 10 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
index e999f5753..1144bd3c6 100644
--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
@@ -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)
diff --git a/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
index 9bf9f140d..fb8308cda 100644
--- a/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
+++ b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
@@ -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?
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs
index 12b7901f9..8bf7a052e 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs
@@ -148,7 +148,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
},
RequiresOpening = true,
RequiresClosing = true,
- RequiresLooping = true,
+ RequiresLooping = info.EnableStreamLooping,
ReadAtNativeFramerate = false,