jellyfin/MediaBrowser.Model/LiveTv/LiveTvOptions.cs

113 lines
4.1 KiB
C#
Raw Normal View History

2015-07-20 20:32:55 +02:00
using System.Collections.Generic;
2016-06-06 20:22:42 +02:00
using MediaBrowser.Model.Dto;
2016-06-08 06:57:03 +02:00
using MediaBrowser.Model.Extensions;
2015-07-20 20:32:55 +02:00
namespace MediaBrowser.Model.LiveTv
{
public class LiveTvOptions
{
public int? GuideDays { get; set; }
2015-03-14 21:00:32 +01:00
public bool EnableMovieProviders { get; set; }
2015-07-20 20:32:55 +02:00
public string RecordingPath { get; set; }
2016-05-04 22:50:47 +02:00
public string MovieRecordingPath { get; set; }
public string SeriesRecordingPath { get; set; }
2016-02-12 08:01:38 +01:00
public bool EnableRecordingEncoding { get; set; }
2016-09-08 08:41:49 +02:00
public string RecordingEncodingFormat { get; set; }
2016-05-04 22:50:47 +02:00
public bool EnableRecordingSubfolders { get; set; }
public bool EnableOriginalAudioWithEncodedRecordings { get; set; }
2016-10-28 21:56:54 +02:00
public string RecordedVideoCodec { get; set; }
2015-03-15 02:42:09 +01:00
2015-07-23 07:25:55 +02:00
public List<TunerHostInfo> TunerHosts { get; set; }
public List<ListingsProviderInfo> ListingProviders { get; set; }
2015-08-24 04:08:20 +02:00
public int PrePaddingSeconds { get; set; }
public int PostPaddingSeconds { get; set; }
2016-02-24 20:06:26 +01:00
2016-05-20 17:57:07 +02:00
public string[] MediaLocationsCreated { get; set; }
2016-11-22 20:45:55 +01:00
public string RecordingPostProcessor { get; set; }
public string RecordingPostProcessorArguments { get; set; }
2015-03-15 02:42:09 +01:00
public LiveTvOptions()
{
EnableMovieProviders = true;
2015-07-20 20:32:55 +02:00
TunerHosts = new List<TunerHostInfo>();
2015-07-23 07:25:55 +02:00
ListingProviders = new List<ListingsProviderInfo>();
2016-05-20 17:57:07 +02:00
MediaLocationsCreated = new string[] { };
2016-09-08 08:41:49 +02:00
RecordingEncodingFormat = "mp4";
2016-11-22 20:45:55 +01:00
RecordingPostProcessorArguments = "\"{path}\"";
2015-03-15 02:42:09 +01:00
}
}
2015-07-20 20:32:55 +02:00
public class TunerHostInfo
{
2015-07-21 06:22:46 +02:00
public string Id { get; set; }
2015-07-20 20:32:55 +02:00
public string Url { get; set; }
public string Type { get; set; }
2016-03-08 06:00:03 +01:00
public string DeviceId { get; set; }
2015-07-25 20:11:46 +02:00
public bool ImportFavoritesOnly { get; set; }
public bool AllowHWTranscoding { get; set; }
2015-07-27 18:21:18 +02:00
public bool IsEnabled { get; set; }
2016-03-13 08:34:17 +01:00
public string M3UUrl { get; set; }
2016-03-16 22:39:49 +01:00
public string InfoUrl { get; set; }
2016-03-13 08:34:17 +01:00
public string FriendlyName { get; set; }
public int Tuners { get; set; }
2016-03-14 04:32:03 +01:00
public string DiseqC { get; set; }
2016-03-31 21:41:52 +02:00
public string SourceA { get; set; }
public string SourceB { get; set; }
public string SourceC { get; set; }
public string SourceD { get; set; }
2017-01-23 22:51:23 +01:00
public bool EnableTvgId { get; set; }
2016-02-25 21:29:38 +01:00
2015-07-27 18:21:18 +02:00
public TunerHostInfo()
{
IsEnabled = true;
2016-10-12 20:23:09 +02:00
AllowHWTranscoding = true;
2015-07-27 18:21:18 +02:00
}
2015-07-20 20:32:55 +02:00
}
2015-07-23 07:25:55 +02:00
public class ListingsProviderInfo
{
2015-07-23 15:23:22 +02:00
public string Id { get; set; }
public string Type { get; set; }
2015-07-23 07:25:55 +02:00
public string Username { get; set; }
public string Password { get; set; }
public string ListingsId { get; set; }
2015-07-23 15:23:22 +02:00
public string ZipCode { get; set; }
2015-07-24 01:40:54 +02:00
public string Country { get; set; }
2016-02-17 04:07:15 +01:00
public string Path { get; set; }
2016-02-24 20:06:26 +01:00
public string[] EnabledTuners { get; set; }
public bool EnableAllTuners { get; set; }
2016-06-05 22:41:44 +02:00
public string[] NewsCategories { get; set; }
public string[] SportsCategories { get; set; }
public string[] KidsCategories { get; set; }
public string[] MovieCategories { get; set; }
2016-06-06 20:22:42 +02:00
public NameValuePair[] ChannelMappings { get; set; }
2016-11-15 18:55:26 +01:00
public string MoviePrefix { get; set; }
2016-02-24 20:06:26 +01:00
public ListingsProviderInfo()
{
2016-06-05 23:08:55 +02:00
NewsCategories = new string[] { "news", "journalism", "documentary", "current affairs" };
2016-06-05 22:41:44 +02:00
SportsCategories = new string[] { "sports", "basketball", "baseball", "football" };
2016-06-05 23:08:55 +02:00
KidsCategories = new string[] { "kids", "family", "children", "childrens", "disney" };
2016-06-05 22:41:44 +02:00
MovieCategories = new string[] { "movie" };
2016-02-24 20:06:26 +01:00
EnabledTuners = new string[] { };
EnableAllTuners = true;
2016-06-06 20:22:42 +02:00
ChannelMappings = new NameValuePair[] {};
2016-02-24 20:06:26 +01:00
}
2016-06-08 06:57:03 +02:00
public string GetMappedChannel(string channelNumber)
{
foreach (NameValuePair mapping in ChannelMappings)
{
if (StringHelper.EqualsIgnoreCase(mapping.Name, channelNumber))
{
return mapping.Value;
}
}
return channelNumber;
}
2015-07-23 07:25:55 +02:00
}
}