diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2019-01-13 12:14:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-13 12:14:53 -0500 |
| commit | 9dcaafe700b7130b49bafbadf0d47b37c6ecf53b (patch) | |
| tree | 6ca1b2b3decac1a86b886dafd2645954a13601fd /Emby.Server.Implementations/LiveTv/LiveTvManager.cs | |
| parent | 17d8de4962ea9d78f6ddb557fe26465be1944b38 (diff) | |
| parent | b936c439321b55bf89c99dac96fc78cefe752e84 (diff) | |
Merge pull request #458 from EraYaN/code-cleanup
Clean up several minor issues and add TODOs
Diffstat (limited to 'Emby.Server.Implementations/LiveTv/LiveTvManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/LiveTvManager.cs | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs index b84b4682a..4e38ad7be 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Common.Configuration; +using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Extensions; using MediaBrowser.Common.Progress; using MediaBrowser.Controller.Configuration; @@ -104,10 +104,7 @@ namespace Emby.Server.Implementations.LiveTv /// Gets the services. /// </summary> /// <value>The services.</value> - public IReadOnlyList<ILiveTvService> Services - { - get { return _services; } - } + public IReadOnlyList<ILiveTvService> Services => _services; private LiveTvOptions GetConfiguration() { @@ -167,15 +164,9 @@ namespace Emby.Server.Implementations.LiveTv }); } - public ITunerHost[] TunerHosts - { - get { return _tunerHosts; } - } + public ITunerHost[] TunerHosts => _tunerHosts; - public IListingsProvider[] ListingProviders - { - get { return _listingProviders; } - } + public IListingsProvider[] ListingProviders => _listingProviders; public List<NameIdPair> GetTunerHostTypes() { @@ -323,7 +314,7 @@ namespace Emby.Server.Implementations.LiveTv return _services.FirstOrDefault(i => string.Equals(i.Name, name, StringComparison.OrdinalIgnoreCase)); } - private void Normalize(MediaSourceInfo mediaSource, ILiveTvService service, bool isVideo) + private static void Normalize(MediaSourceInfo mediaSource, ILiveTvService service, bool isVideo) { // Not all of the plugins are setting this mediaSource.IsInfiniteStream = true; @@ -1418,6 +1409,7 @@ namespace Emby.Server.Implementations.LiveTv if (query.IsInProgress ?? false) { + //TODO Fix The co-variant conversion between Video[] and BaseItem[], this can generate runtime issues. result.Items = result .Items .OfType<Video>() @@ -2188,7 +2180,7 @@ namespace Emby.Server.Implementations.LiveTv return Services.Select(GetServiceInfo).ToArray(); } - private LiveTvServiceInfo GetServiceInfo(ILiveTvService service) + private static LiveTvServiceInfo GetServiceInfo(ILiveTvService service) { return new LiveTvServiceInfo { @@ -2245,7 +2237,7 @@ namespace Emby.Server.Implementations.LiveTv return service.ResetTuner(parts[1], cancellationToken); } - private void RemoveFields(DtoOptions options) + private static void RemoveFields(DtoOptions options) { var fields = options.Fields.ToList(); |
