diff options
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/ISchedulesDirectService.cs | 31 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/ITunerHostManager.cs | 6 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/LiveTvChannel.cs | 2 |
3 files changed, 38 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/LiveTv/ISchedulesDirectService.cs b/MediaBrowser.Controller/LiveTv/ISchedulesDirectService.cs new file mode 100644 index 0000000000..6953650952 --- /dev/null +++ b/MediaBrowser.Controller/LiveTv/ISchedulesDirectService.cs @@ -0,0 +1,31 @@ +using System.IO; +using System.Threading; +using System.Threading.Tasks; + +namespace MediaBrowser.Controller.LiveTv; + +/// <summary> +/// Provides Schedules Direct specific operations. +/// </summary> +public interface ISchedulesDirectService +{ + /// <summary> + /// Gets the available countries from the Schedules Direct API, using a file cache. + /// </summary> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>A stream containing the raw JSON response.</returns> + Task<Stream> GetAvailableCountries(CancellationToken cancellationToken); + + /// <summary> + /// Gets a value indicating whether the Schedules Direct daily image download limit is currently active. + /// </summary> + /// <returns><c>true</c> if the image limit has been hit and has not yet reset; otherwise <c>false</c>.</returns> + bool IsImageDailyLimitActive(); + + /// <summary> + /// Gets a value indicating whether the Schedules Direct service is available. + /// Returns <c>false</c> if a permanent account error has occurred or a transient backoff is active. + /// </summary> + /// <returns><c>true</c> if the service can accept requests; otherwise <c>false</c>.</returns> + bool IsServiceAvailable(); +} diff --git a/MediaBrowser.Controller/LiveTv/ITunerHostManager.cs b/MediaBrowser.Controller/LiveTv/ITunerHostManager.cs index 8247066cc9..68e61f3cc4 100644 --- a/MediaBrowser.Controller/LiveTv/ITunerHostManager.cs +++ b/MediaBrowser.Controller/LiveTv/ITunerHostManager.cs @@ -38,6 +38,12 @@ public interface ITunerHostManager IAsyncEnumerable<TunerHostInfo> DiscoverTuners(bool newDevicesOnly); /// <summary> + /// Deletes a tuner host by id, cleans up associated caches, and triggers a guide refresh. + /// </summary> + /// <param name="id">The tuner host id to delete.</param> + void DeleteTunerHost(string? id); + + /// <summary> /// Scans for tuner devices that have changed URLs. /// </summary> /// <param name="cancellationToken">The <see cref="CancellationToken"/> to use.</param> diff --git a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs index b10e77e10a..aee4691cdf 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs @@ -109,7 +109,7 @@ namespace MediaBrowser.Controller.LiveTv { if (double.TryParse(Number, CultureInfo.InvariantCulture, out double number)) { - return string.Format(CultureInfo.InvariantCulture, "{0:00000.0}", number) + "-" + (Name ?? string.Empty); + return string.Format(CultureInfo.InvariantCulture, "{0:0000000000.00000}", number) + "-" + (Name ?? string.Empty); } return (Number ?? string.Empty) + "-" + (Name ?? string.Empty); |
