diff options
Diffstat (limited to 'MediaBrowser.Model')
19 files changed, 123 insertions, 46 deletions
diff --git a/MediaBrowser.Model/Configuration/AutoOnOff.cs b/MediaBrowser.Model/Configuration/AutoOnOff.cs deleted file mode 100644 index e911a0ff1..000000000 --- a/MediaBrowser.Model/Configuration/AutoOnOff.cs +++ /dev/null @@ -1,10 +0,0 @@ - -namespace MediaBrowser.Model.Configuration -{ - public enum AutoOnOff - { - Auto, - Enabled, - Disabled - } -} diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs index d49816803..9a0b2d35b 100644 --- a/MediaBrowser.Model/Configuration/EncodingOptions.cs +++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs @@ -22,7 +22,6 @@ namespace MediaBrowser.Model.Configuration EncodingThreadCount = -1; VaapiDevice = "/dev/dri/card0"; H264Crf = 23; - H264Preset = "superfast"; } } } diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs index 551363223..460ee0918 100644 --- a/MediaBrowser.Model/Configuration/LibraryOptions.cs +++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs @@ -8,11 +8,20 @@ public int SchemaVersion { get; set; } public bool EnableChapterImageExtraction { get; set; } public bool ExtractChapterImagesDuringLibraryScan { get; set; } + public bool DownloadImagesInAdvance { get; set; } + public MediaPathInfo[] PathInfos { get; set; } public LibraryOptions() { EnablePhotos = true; EnableRealtimeMonitor = true; + PathInfos = new MediaPathInfo[] { }; } } + + public class MediaPathInfo + { + public string Path { get; set; } + public string NetworkPath { get; set; } + } } diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index 44a2ae954..1d2928f67 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -73,6 +73,7 @@ namespace MediaBrowser.Model.Configuration /// </summary> /// <value>The metadata path.</value> public string MetadataPath { get; set; } + public string MetadataNetworkPath { get; set; } public string LastVersion { get; set; } @@ -183,8 +184,6 @@ namespace MediaBrowser.Model.Configuration public int RemoteClientBitrateLimit { get; set; } - public AutoOnOff EnableLibraryMonitor { get; set; } - public int SharingExpirationDays { get; set; } public string[] Migrations { get; set; } @@ -193,8 +192,6 @@ namespace MediaBrowser.Model.Configuration public int SchemaVersion { get; set; } public int SqliteCacheSize { get; set; } - public bool DownloadImagesInAdvance { get; set; } - public bool EnableAnonymousUsageReporting { get; set; } public bool EnableStandaloneMusicKeys { get; set; } public bool EnableLocalizedGuids { get; set; } @@ -217,7 +214,7 @@ namespace MediaBrowser.Model.Configuration Migrations = new string[] { }; CodecsUsed = new string[] { }; SqliteCacheSize = 0; - ImageExtractionTimeoutMs = 10000; + ImageExtractionTimeoutMs = 0; EnableLocalizedGuids = true; DisplaySpecialsWithinSeasons = true; @@ -234,6 +231,7 @@ namespace MediaBrowser.Model.Configuration EnableAnonymousUsageReporting = true; EnableAutomaticRestart = true; + EnableFolderView = true; EnableUPnP = true; SharingExpirationDays = 30; @@ -243,7 +241,6 @@ namespace MediaBrowser.Model.Configuration // 5 minutes MinResumeDurationSeconds = 300; - EnableLibraryMonitor = AutoOnOff.Auto; LibraryMonitorDelay = 60; EnableInternetProviders = true; diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index 13d559773..30d1498bf 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -602,33 +602,20 @@ namespace MediaBrowser.Model.Dlna private int GetAudioBitrate(string subProtocol, int? maxTotalBitrate, int? targetAudioChannels, string targetAudioCodec, MediaStream audioStream) { - var defaultBitrate = audioStream == null ? 192000 : audioStream.BitRate ?? 192000; + int defaultBitrate = audioStream == null ? 192000 : audioStream.BitRate ?? 192000; // Reduce the bitrate if we're downmixing if (targetAudioChannels.HasValue && audioStream != null && audioStream.Channels.HasValue && targetAudioChannels.Value < audioStream.Channels.Value) { defaultBitrate = StringHelper.EqualsIgnoreCase(targetAudioCodec, "ac3") ? 192000 : 128000; } - if (targetAudioChannels.HasValue) + if (StringHelper.EqualsIgnoreCase(subProtocol, "hls")) { - if (targetAudioChannels.Value >= 5 && (maxTotalBitrate ?? 0) >= 1200000) - { - if (StringHelper.EqualsIgnoreCase(targetAudioCodec, "ac3")) - { - if (string.Equals(subProtocol, "hls", StringComparison.OrdinalIgnoreCase)) - { - defaultBitrate = Math.Max(384000, defaultBitrate); - } - else - { - defaultBitrate = Math.Max(448000, defaultBitrate); - } - } - else - { - defaultBitrate = Math.Max(320000, defaultBitrate); - } - } + defaultBitrate = Math.Min(384000, defaultBitrate); + } + else + { + defaultBitrate = Math.Min(448000, defaultBitrate); } int encoderAudioBitrateLimit = int.MaxValue; @@ -647,6 +634,14 @@ namespace MediaBrowser.Model.Dlna } } + if (maxTotalBitrate.HasValue) + { + if (maxTotalBitrate.Value < 640000) + { + defaultBitrate = Math.Min(128000, defaultBitrate); + } + } + return Math.Min(defaultBitrate, encoderAudioBitrateLimit); } diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs index ac024f00b..f7dc893c8 100644 --- a/MediaBrowser.Model/Dlna/StreamInfo.cs +++ b/MediaBrowser.Model/Dlna/StreamInfo.cs @@ -215,13 +215,26 @@ namespace MediaBrowser.Model.Dlna list.Add(new NameValuePair("MaxWidth", item.MaxWidth.HasValue ? StringHelper.ToStringCultureInvariant(item.MaxWidth.Value) : string.Empty)); list.Add(new NameValuePair("MaxHeight", item.MaxHeight.HasValue ? StringHelper.ToStringCultureInvariant(item.MaxHeight.Value) : string.Empty)); - if (StringHelper.EqualsIgnoreCase(item.SubProtocol, "hls")) + var forceStartPosition = false; + long startPositionTicks = item.StartPositionTicks; + //if (item.MediaSource.DateLiveStreamOpened.HasValue && startPositionTicks == 0) + //{ + // var elapsed = DateTime.UtcNow - item.MediaSource.DateLiveStreamOpened.Value; + // elapsed -= TimeSpan.FromSeconds(20); + // if (elapsed.TotalSeconds >= 0) + // { + // startPositionTicks = elapsed.Ticks + startPositionTicks; + // forceStartPosition = true; + // } + //} + + if (StringHelper.EqualsIgnoreCase(item.SubProtocol, "hls") && !forceStartPosition) { list.Add(new NameValuePair("StartTimeTicks", string.Empty)); } else { - list.Add(new NameValuePair("StartTimeTicks", StringHelper.ToStringCultureInvariant(item.StartPositionTicks))); + list.Add(new NameValuePair("StartTimeTicks", StringHelper.ToStringCultureInvariant(startPositionTicks))); } list.Add(new NameValuePair("Level", item.VideoLevel.HasValue ? StringHelper.ToStringCultureInvariant(item.VideoLevel.Value) : string.Empty)); diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index 348a781ae..9434ab03a 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -826,6 +826,7 @@ namespace MediaBrowser.Model.Dto /// </summary> /// <value>The series count.</value> public int? SeriesCount { get; set; } + public int? ProgramCount { get; set; } /// <summary> /// Gets or sets the episode count. /// </summary> diff --git a/MediaBrowser.Model/Dto/ItemCounts.cs b/MediaBrowser.Model/Dto/ItemCounts.cs index 66c3dfebc..8ceb3a86b 100644 --- a/MediaBrowser.Model/Dto/ItemCounts.cs +++ b/MediaBrowser.Model/Dto/ItemCounts.cs @@ -26,6 +26,7 @@ /// <value>The game count.</value> public int GameCount { get; set; } public int ArtistCount { get; set; } + public int ProgramCount { get; set; } /// <summary> /// Gets or sets the game system count. /// </summary> diff --git a/MediaBrowser.Model/Dto/MediaSourceInfo.cs b/MediaBrowser.Model/Dto/MediaSourceInfo.cs index bb07d9cb6..1c7875890 100644 --- a/MediaBrowser.Model/Dto/MediaSourceInfo.cs +++ b/MediaBrowser.Model/Dto/MediaSourceInfo.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Model.Entities; +using System; +using MediaBrowser.Model.Entities; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.MediaInfo; using System.Collections.Generic; @@ -26,7 +27,7 @@ namespace MediaBrowser.Model.Dto public bool SupportsTranscoding { get; set; } public bool SupportsDirectStream { get; set; } public bool SupportsDirectPlay { get; set; } - + public bool IsInfiniteStream { get; set; } public bool RequiresOpening { get; set; } public string OpenToken { get; set; } public bool RequiresClosing { get; set; } @@ -52,7 +53,9 @@ namespace MediaBrowser.Model.Dto public string TranscodingUrl { get; set; } public string TranscodingSubProtocol { get; set; } public string TranscodingContainer { get; set; } - + + public DateTime? DateLiveStreamOpened { get; set; } + public MediaSourceInfo() { Formats = new List<string>(); diff --git a/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs b/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs index 4d863c6eb..0ceed70c0 100644 --- a/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs @@ -105,5 +105,6 @@ namespace MediaBrowser.Model.LiveTv /// </summary> /// <value><c>true</c> if this instance is post padding required; otherwise, <c>false</c>.</value> public bool IsPostPaddingRequired { get; set; } + public KeepUntil KeepUntil { get; set; } } }
\ No newline at end of file diff --git a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs index 0ece1e4a0..4505b80a0 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs @@ -1,4 +1,5 @@ - +using MediaBrowser.Model.Entities; + namespace MediaBrowser.Model.LiveTv { /// <summary> @@ -61,9 +62,42 @@ namespace MediaBrowser.Model.LiveTv public bool AddCurrentProgram { get; set; } public bool EnableUserData { get; set; } + /// <summary> + /// Used to specific whether to return news or not + /// </summary> + /// <remarks>If set to null, all programs will be returned</remarks> + public bool? IsNews { get; set; } + + /// <summary> + /// Used to specific whether to return movies or not + /// </summary> + /// <remarks>If set to null, all programs will be returned</remarks> + public bool? IsMovie { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this instance is kids. + /// </summary> + /// <value><c>null</c> if [is kids] contains no value, <c>true</c> if [is kids]; otherwise, <c>false</c>.</value> + public bool? IsKids { get; set; } + /// <summary> + /// Gets or sets a value indicating whether this instance is sports. + /// </summary> + /// <value><c>null</c> if [is sports] contains no value, <c>true</c> if [is sports]; otherwise, <c>false</c>.</value> + public bool? IsSports { get; set; } + public bool? IsSeries { get; set; } + + public string[] SortBy { get; set; } + + /// <summary> + /// The sort order to return results with + /// </summary> + /// <value>The sort order.</value> + public SortOrder? SortOrder { get; set; } + public LiveTvChannelQuery() { EnableUserData = true; + SortBy = new string[] { }; } } } diff --git a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs index 242a2d24e..a6240afe6 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs @@ -13,6 +13,7 @@ namespace MediaBrowser.Model.LiveTv public string SeriesRecordingPath { get; set; } public bool EnableAutoOrganize { get; set; } public bool EnableRecordingEncoding { get; set; } + public string RecordingEncodingFormat { get; set; } public bool EnableRecordingSubfolders { get; set; } public bool EnableOriginalAudioWithEncodedRecordings { get; set; } @@ -31,6 +32,7 @@ namespace MediaBrowser.Model.LiveTv TunerHosts = new List<TunerHostInfo>(); ListingProviders = new List<ListingsProviderInfo>(); MediaLocationsCreated = new string[] { }; + RecordingEncodingFormat = "mp4"; } } @@ -58,7 +60,6 @@ namespace MediaBrowser.Model.LiveTv public TunerHostInfo() { IsEnabled = true; - AllowHWTranscoding = true; } } diff --git a/MediaBrowser.Model/LiveTv/ProgramAudio.cs b/MediaBrowser.Model/LiveTv/ProgramAudio.cs index 902079b9a..9a272492c 100644 --- a/MediaBrowser.Model/LiveTv/ProgramAudio.cs +++ b/MediaBrowser.Model/LiveTv/ProgramAudio.cs @@ -6,6 +6,7 @@ Stereo, Dolby, DolbyDigital, - Thx + Thx, + Atmos } }
\ No newline at end of file diff --git a/MediaBrowser.Model/LiveTv/ProgramQuery.cs b/MediaBrowser.Model/LiveTv/ProgramQuery.cs index bf459237a..ad57d1473 100644 --- a/MediaBrowser.Model/LiveTv/ProgramQuery.cs +++ b/MediaBrowser.Model/LiveTv/ProgramQuery.cs @@ -41,6 +41,7 @@ namespace MediaBrowser.Model.LiveTv /// </summary> /// <value>The user identifier.</value> public string UserId { get; set; } + public string SeriesTimerId { get; set; } /// <summary> /// The earliest date for which a program starts to return @@ -63,6 +64,12 @@ namespace MediaBrowser.Model.LiveTv public DateTime? MaxEndDate { get; set; } /// <summary> + /// Used to specific whether to return news or not + /// </summary> + /// <remarks>If set to null, all programs will be returned</remarks> + public bool? IsNews { get; set; } + + /// <summary> /// Used to specific whether to return movies or not /// </summary> /// <remarks>If set to null, all programs will be returned</remarks> @@ -83,6 +90,7 @@ namespace MediaBrowser.Model.LiveTv /// Skips over a given number of items within the results. Use for paging. /// </summary> public int? StartIndex { get; set; } + public bool? IsSeries { get; set; } /// <summary> /// Gets or sets a value indicating whether this instance has aired. diff --git a/MediaBrowser.Model/LiveTv/RecommendedProgramQuery.cs b/MediaBrowser.Model/LiveTv/RecommendedProgramQuery.cs index 0e6d081a1..4bc506bf6 100644 --- a/MediaBrowser.Model/LiveTv/RecommendedProgramQuery.cs +++ b/MediaBrowser.Model/LiveTv/RecommendedProgramQuery.cs @@ -49,7 +49,13 @@ namespace MediaBrowser.Model.LiveTv /// Gets or sets a value indicating whether this instance is movie. /// </summary> /// <value><c>null</c> if [is movie] contains no value, <c>true</c> if [is movie]; otherwise, <c>false</c>.</value> + public bool? IsNews { get; set; } + /// <summary> + /// Gets or sets a value indicating whether this instance is movie. + /// </summary> + /// <value><c>null</c> if [is movie] contains no value, <c>true</c> if [is movie]; otherwise, <c>false</c>.</value> public bool? IsMovie { get; set; } + public bool? IsSeries { get; set; } /// <summary> /// Gets or sets a value indicating whether this instance is kids. /// </summary> diff --git a/MediaBrowser.Model/LiveTv/RecordingQuery.cs b/MediaBrowser.Model/LiveTv/RecordingQuery.cs index 923d303f8..265aad335 100644 --- a/MediaBrowser.Model/LiveTv/RecordingQuery.cs +++ b/MediaBrowser.Model/LiveTv/RecordingQuery.cs @@ -68,6 +68,11 @@ namespace MediaBrowser.Model.LiveTv /// <value>The fields.</value> public ItemFields[] Fields { get; set; } public bool? EnableImages { get; set; } + public bool? IsNews { get; set; } + public bool? IsMovie { get; set; } + public bool? IsSeries { get; set; } + public bool? IsKids { get; set; } + public bool? IsSports { get; set; } public int? ImageTypeLimit { get; set; } public ImageType[] EnableImageTypes { get; set; } diff --git a/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs b/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs index 4b88e42f3..ce65cc7bf 100644 --- a/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs @@ -18,12 +18,16 @@ namespace MediaBrowser.Model.LiveTv /// <value><c>true</c> if [record any time]; otherwise, <c>false</c>.</value> public bool RecordAnyTime { get; set; } + public bool SkipEpisodesInLibrary { get; set; } + /// <summary> /// Gets or sets a value indicating whether [record any channel]. /// </summary> /// <value><c>true</c> if [record any channel]; otherwise, <c>false</c>.</value> public bool RecordAnyChannel { get; set; } + public int KeepUpTo { get; set; } + /// <summary> /// Gets or sets a value indicating whether [record new only]. /// </summary> @@ -64,4 +68,12 @@ namespace MediaBrowser.Model.LiveTv Days = new List<DayOfWeek>(); } } + + public enum KeepUntil + { + UntilDeleted, + UntilSpaceNeeded, + UntilWatched, + UntilDate + } } diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index db70b8606..c1a01680d 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -89,7 +89,6 @@ <Compile Include="Chapters\RemoteChapterResult.cs" /> <Compile Include="Collections\CollectionCreationResult.cs" /> <Compile Include="Configuration\AccessSchedule.cs" /> - <Compile Include="Configuration\AutoOnOff.cs" /> <Compile Include="Configuration\ChannelOptions.cs" /> <Compile Include="Configuration\ChapterOptions.cs" /> <Compile Include="Configuration\CinemaModeConfiguration.cs" /> diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs index 3d1de5b37..c4d056a61 100644 --- a/MediaBrowser.Model/System/SystemInfo.cs +++ b/MediaBrowser.Model/System/SystemInfo.cs @@ -8,6 +8,8 @@ namespace MediaBrowser.Model.System /// </summary> public class SystemInfo : PublicSystemInfo { + public PackageVersionClass SystemUpdateLevel { get; set; } + /// <summary> /// Gets or sets the display name of the operating system. /// </summary> |
