aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/LiveTv
diff options
context:
space:
mode:
authorMarc Brooks <IDisposable@gmail.com>2025-02-03 19:48:59 -0600
committerGitHub <noreply@github.com>2025-02-03 19:48:59 -0600
commite8cbcde02ebd930a5eeb6c95e0875a9e30acb3e8 (patch)
tree2ecd43f232012c8f037f4cd6fee4168e46d01aa3 /MediaBrowser.Controller/LiveTv
parent6dc61a430ba3a8480399309f277e5debfd6403ba (diff)
parentd376b5fbc7cf3ae7440a606a9e885d70605956bd (diff)
Merge branch 'master' into sort-nfo-data
Diffstat (limited to 'MediaBrowser.Controller/LiveTv')
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvChannel.cs16
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvProgram.cs1
2 files changed, 7 insertions, 10 deletions
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
index 3c2cf8e3d..b10e77e10 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
@@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
+using System.Collections.Immutable;
using System.Globalization;
using System.Linq;
using System.Text.Json.Serialization;
@@ -119,13 +120,10 @@ namespace MediaBrowser.Controller.LiveTv
return "TvChannel";
}
- public IEnumerable<BaseItem> GetTaggedItems()
- => Enumerable.Empty<BaseItem>();
+ public IEnumerable<BaseItem> GetTaggedItems() => [];
- public override List<MediaSourceInfo> GetMediaSources(bool enablePathSubstitution)
+ public override IReadOnlyList<MediaSourceInfo> GetMediaSources(bool enablePathSubstitution)
{
- var list = new List<MediaSourceInfo>();
-
var info = new MediaSourceInfo
{
Id = Id.ToString("N", CultureInfo.InvariantCulture),
@@ -138,14 +136,12 @@ namespace MediaBrowser.Controller.LiveTv
IsInfiniteStream = RunTimeTicks is null
};
- list.Add(info);
-
- return list;
+ return [info];
}
- public override List<MediaStream> GetMediaStreams()
+ public override IReadOnlyList<MediaStream> GetMediaStreams()
{
- return new List<MediaStream>();
+ return [];
}
protected override string GetInternalMetadataPath(string basePath)
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
index 2ac6f9963..83944f741 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
@@ -18,6 +18,7 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Controller.LiveTv
{
+ [Common.RequiresSourceSerialisation]
public class LiveTvProgram : BaseItem, IHasLookupInfo<ItemLookupInfo>, IHasStartDate, IHasProgramAttributes
{
private const string EmbyServiceName = "Emby";