aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-06-30 15:27:06 -0400
committerGitHub <noreply@github.com>2016-06-30 15:27:06 -0400
commit2708df6cc28c48a89416bdfbdde7e78fc4227c62 (patch)
tree9f892d6350a4d694c96985d679f622c0f7005278 /MediaBrowser.Model
parentd9406d48ca0231bc096aeadc595c30f0596c8dda (diff)
parent5bdc96bb6a9b863980661e2d11c1ad00a02eb601 (diff)
Merge pull request #1899 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/ApiClient/ServerCredentials.cs4
-rw-r--r--MediaBrowser.Model/ApiClient/ServerInfo.cs1
-rw-r--r--MediaBrowser.Model/Channels/ChannelFolderType.cs8
-rw-r--r--MediaBrowser.Model/Configuration/EncodingOptions.cs2
-rw-r--r--MediaBrowser.Model/Configuration/FanartOptions.cs5
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs28
-rw-r--r--MediaBrowser.Model/Configuration/TheMovieDbOptions.cs12
-rw-r--r--MediaBrowser.Model/Configuration/TvdbOptions.cs12
-rw-r--r--MediaBrowser.Model/Configuration/UserConfiguration.cs8
-rw-r--r--MediaBrowser.Model/Dlna/ResolutionNormalizer.cs20
-rw-r--r--MediaBrowser.Model/Dlna/StreamBuilder.cs39
-rw-r--r--MediaBrowser.Model/Dlna/StreamInfo.cs37
-rw-r--r--MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs1
-rw-r--r--MediaBrowser.Model/Dto/ItemCounts.cs1
-rw-r--r--MediaBrowser.Model/Entities/ImageType.cs24
-rw-r--r--MediaBrowser.Model/Entities/MediaStream.cs58
-rw-r--r--MediaBrowser.Model/Entities/MediaUrl.cs1
-rw-r--r--MediaBrowser.Model/Entities/VideoSize.cs8
-rw-r--r--MediaBrowser.Model/LiveTv/LiveTvOptions.cs24
-rw-r--r--MediaBrowser.Model/LiveTv/RecordingQuery.cs7
-rw-r--r--MediaBrowser.Model/LiveTv/TimerQuery.cs2
-rw-r--r--MediaBrowser.Model/MediaBrowser.Model.csproj4
-rw-r--r--MediaBrowser.Model/Querying/ItemSortBy.cs1
-rw-r--r--MediaBrowser.Model/System/Architecture.cs9
-rw-r--r--MediaBrowser.Model/System/SystemInfo.cs4
25 files changed, 195 insertions, 125 deletions
diff --git a/MediaBrowser.Model/ApiClient/ServerCredentials.cs b/MediaBrowser.Model/ApiClient/ServerCredentials.cs
index 0f0ab65d4a..19f68445e2 100644
--- a/MediaBrowser.Model/ApiClient/ServerCredentials.cs
+++ b/MediaBrowser.Model/ApiClient/ServerCredentials.cs
@@ -57,6 +57,10 @@ namespace MediaBrowser.Model.ApiClient
{
existing.RemoteAddress = server.RemoteAddress;
}
+ if (!string.IsNullOrEmpty(server.ConnectServerId))
+ {
+ existing.ConnectServerId = server.ConnectServerId;
+ }
if (!string.IsNullOrEmpty(server.LocalAddress))
{
existing.LocalAddress = server.LocalAddress;
diff --git a/MediaBrowser.Model/ApiClient/ServerInfo.cs b/MediaBrowser.Model/ApiClient/ServerInfo.cs
index e1fa581d7b..48995e80a7 100644
--- a/MediaBrowser.Model/ApiClient/ServerInfo.cs
+++ b/MediaBrowser.Model/ApiClient/ServerInfo.cs
@@ -12,6 +12,7 @@ namespace MediaBrowser.Model.ApiClient
public String Name { get; set; }
public String Id { get; set; }
+ public String ConnectServerId { get; set; }
public String LocalAddress { get; set; }
public String RemoteAddress { get; set; }
public String ManualAddress { get; set; }
diff --git a/MediaBrowser.Model/Channels/ChannelFolderType.cs b/MediaBrowser.Model/Channels/ChannelFolderType.cs
index 9261cb5cd3..7c97afd023 100644
--- a/MediaBrowser.Model/Channels/ChannelFolderType.cs
+++ b/MediaBrowser.Model/Channels/ChannelFolderType.cs
@@ -6,6 +6,12 @@ namespace MediaBrowser.Model.Channels
MusicAlbum = 1,
- PhotoAlbum = 2
+ PhotoAlbum = 2,
+
+ MusicArtist = 3,
+
+ Series = 4,
+
+ Season = 5
}
} \ No newline at end of file
diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs
index 516d00ee6d..91d28a2969 100644
--- a/MediaBrowser.Model/Configuration/EncodingOptions.cs
+++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs
@@ -6,10 +6,10 @@ namespace MediaBrowser.Model.Configuration
public int EncodingThreadCount { get; set; }
public string TranscodingTempPath { get; set; }
public double DownMixAudioBoost { get; set; }
- public bool EnableDebugLogging { get; set; }
public bool EnableThrottling { get; set; }
public int ThrottleDelaySeconds { get; set; }
public string HardwareAccelerationType { get; set; }
+ public string EncoderAppPath { get; set; }
public EncodingOptions()
{
diff --git a/MediaBrowser.Model/Configuration/FanartOptions.cs b/MediaBrowser.Model/Configuration/FanartOptions.cs
index e992abe5de..6924b25d7d 100644
--- a/MediaBrowser.Model/Configuration/FanartOptions.cs
+++ b/MediaBrowser.Model/Configuration/FanartOptions.cs
@@ -4,11 +4,6 @@ namespace MediaBrowser.Model.Configuration
public class FanartOptions
{
/// <summary>
- /// Gets or sets a value indicating whether [enable automatic updates].
- /// </summary>
- /// <value><c>true</c> if [enable automatic updates]; otherwise, <c>false</c>.</value>
- public bool EnableAutomaticUpdates { get; set; }
- /// <summary>
/// Gets or sets the user API key.
/// </summary>
/// <value>The user API key.</value>
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index 1cb19afdf2..f779fcd610 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -67,7 +67,7 @@ namespace MediaBrowser.Model.Configuration
/// </summary>
/// <value><c>true</c> if [enable case sensitive item ids]; otherwise, <c>false</c>.</value>
public bool EnableCaseSensitiveItemIds { get; set; }
-
+
/// <summary>
/// Gets or sets the metadata path.
/// </summary>
@@ -87,12 +87,6 @@ namespace MediaBrowser.Model.Configuration
public bool SaveLocalMeta { get; set; }
/// <summary>
- /// Gets or sets a value indicating whether [enable localized guids].
- /// </summary>
- /// <value><c>true</c> if [enable localized guids]; otherwise, <c>false</c>.</value>
- public bool EnableLocalizedGuids { get; set; }
-
- /// <summary>
/// Gets or sets the preferred metadata language.
/// </summary>
/// <value>The preferred metadata language.</value>
@@ -161,7 +155,7 @@ namespace MediaBrowser.Model.Configuration
/// </summary>
/// <value>The dashboard source path.</value>
public string DashboardSourcePath { get; set; }
-
+
/// <summary>
/// Gets or sets the image saving convention.
/// </summary>
@@ -190,33 +184,39 @@ namespace MediaBrowser.Model.Configuration
public bool EnableVideoArchiveFiles { get; set; }
public int RemoteClientBitrateLimit { get; set; }
- public bool DenyIFrameEmbedding { get; set; }
-
public AutoOnOff EnableLibraryMonitor { get; set; }
public int SharingExpirationDays { get; set; }
- public bool EnableDateLastRefresh { get; set; }
-
public string[] Migrations { get; set; }
public int MigrationVersion { get; set; }
public int SchemaVersion { get; set; }
+ public int SqliteCachePages { get; set; }
public bool DownloadImagesInAdvance { get; set; }
public bool EnableAnonymousUsageReporting { get; set; }
public bool EnableStandaloneMusicKeys { get; set; }
+ public bool EnableLocalizedGuids { get; set; }
+ public bool EnableFolderView { get; set; }
+ public bool EnableGroupingIntoCollections { get; set; }
+ public bool DisplaySpecialsWithinSeasons { get; set; }
+ public bool DisplayCollectionsView { get; set; }
+ public string[] LocalNetworkAddresses { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
/// </summary>
public ServerConfiguration()
{
+ LocalNetworkAddresses = new string[] { };
Migrations = new string[] { };
+ SqliteCachePages = 10000;
- EnableLocalizedGuids = true;
EnableCustomPathSubFolders = true;
+ EnableLocalizedGuids = true;
+ DisplaySpecialsWithinSeasons = true;
ImageSavingConvention = ImageSavingConvention.Compatible;
PublicPort = 8096;
@@ -229,10 +229,8 @@ namespace MediaBrowser.Model.Configuration
EnableAnonymousUsageReporting = true;
EnableAutomaticRestart = true;
- DenyIFrameEmbedding = true;
EnableUPnP = true;
-
SharingExpirationDays = 30;
MinResumePct = 5;
MaxResumePct = 90;
diff --git a/MediaBrowser.Model/Configuration/TheMovieDbOptions.cs b/MediaBrowser.Model/Configuration/TheMovieDbOptions.cs
deleted file mode 100644
index 9a73e34764..0000000000
--- a/MediaBrowser.Model/Configuration/TheMovieDbOptions.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-
-namespace MediaBrowser.Model.Configuration
-{
- public class TheMovieDbOptions
- {
- /// <summary>
- /// Gets or sets a value indicating whether [enable automatic updates].
- /// </summary>
- /// <value><c>true</c> if [enable automatic updates]; otherwise, <c>false</c>.</value>
- public bool EnableAutomaticUpdates { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/Configuration/TvdbOptions.cs b/MediaBrowser.Model/Configuration/TvdbOptions.cs
deleted file mode 100644
index 034af609c4..0000000000
--- a/MediaBrowser.Model/Configuration/TvdbOptions.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-
-namespace MediaBrowser.Model.Configuration
-{
- public class TvdbOptions
- {
- /// <summary>
- /// Gets or sets a value indicating whether [enable automatic updates].
- /// </summary>
- /// <value><c>true</c> if [enable automatic updates]; otherwise, <c>false</c>.</value>
- public bool EnableAutomaticUpdates { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/Configuration/UserConfiguration.cs b/MediaBrowser.Model/Configuration/UserConfiguration.cs
index 5f42dd2de3..69dc23b21c 100644
--- a/MediaBrowser.Model/Configuration/UserConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/UserConfiguration.cs
@@ -34,14 +34,11 @@ namespace MediaBrowser.Model.Configuration
public SubtitlePlaybackMode SubtitleMode { get; set; }
public bool DisplayCollectionsView { get; set; }
- public bool DisplayFoldersView { get; set; }
public bool EnableLocalPassword { get; set; }
public string[] OrderedViews { get; set; }
- public bool IncludeTrailersInSuggestions { get; set; }
-
public string[] LatestItemsExcludes { get; set; }
public string[] PlainFolderViews { get; set; }
@@ -51,7 +48,8 @@ namespace MediaBrowser.Model.Configuration
public bool RememberAudioSelections { get; set; }
public bool RememberSubtitleSelections { get; set; }
public bool EnableNextEpisodeAutoPlay { get; set; }
-
+ public bool DisplayFoldersView { get; set; }
+
/// <summary>
/// Initializes a new instance of the <see cref="UserConfiguration" /> class.
/// </summary>
@@ -69,8 +67,6 @@ namespace MediaBrowser.Model.Configuration
PlainFolderViews = new string[] { };
- IncludeTrailersInSuggestions = true;
-
GroupedFolders = new string[] { };
}
}
diff --git a/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs b/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs
index 8a412ac2c6..ed18fed655 100644
--- a/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs
+++ b/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs
@@ -56,5 +56,25 @@ namespace MediaBrowser.Model.Dlna
MaxHeight = maxHeight
};
}
+
+ private static double GetVideoBitrateScaleFactor(string codec)
+ {
+ if (string.Equals(codec, "h265", StringComparison.OrdinalIgnoreCase) ||
+ string.Equals(codec, "hevc", StringComparison.OrdinalIgnoreCase))
+ {
+ return .5;
+ }
+ return 1;
+ }
+
+ public static int ScaleBitrate(int bitrate, string inputVideoCodec, string outputVideoCodec)
+ {
+ var inputScaleFactor = GetVideoBitrateScaleFactor(inputVideoCodec);
+ var outputScaleFactor = GetVideoBitrateScaleFactor(outputVideoCodec);
+ var scaleFactor = outputScaleFactor/inputScaleFactor;
+ var newBitrate = scaleFactor*bitrate;
+
+ return Convert.ToInt32(newBitrate);
+ }
}
}
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs
index 7721bfd150..41efa51b98 100644
--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs
+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs
@@ -216,7 +216,15 @@ namespace MediaBrowser.Model.Dlna
playlistItem.TranscodeSeekInfo = transcodingProfile.TranscodeSeekInfo;
playlistItem.EstimateContentLength = transcodingProfile.EstimateContentLength;
playlistItem.Container = transcodingProfile.Container;
- playlistItem.AudioCodec = transcodingProfile.AudioCodec;
+
+ if (string.IsNullOrEmpty(transcodingProfile.AudioCodec))
+ {
+ playlistItem.AudioCodecs = new string[] { };
+ }
+ else
+ {
+ playlistItem.AudioCodecs = transcodingProfile.AudioCodec.Split(',');
+ }
playlistItem.SubProtocol = transcodingProfile.Protocol;
List<CodecProfile> audioCodecProfiles = new List<CodecProfile>();
@@ -439,22 +447,7 @@ namespace MediaBrowser.Model.Dlna
playlistItem.EstimateContentLength = transcodingProfile.EstimateContentLength;
playlistItem.TranscodeSeekInfo = transcodingProfile.TranscodeSeekInfo;
- // TODO: We should probably preserve the full list and sent it to the server that way
- string[] supportedAudioCodecs = transcodingProfile.AudioCodec.Split(',');
- string inputAudioCodec = audioStream == null ? null : audioStream.Codec;
- foreach (string supportedAudioCodec in supportedAudioCodecs)
- {
- if (StringHelper.EqualsIgnoreCase(supportedAudioCodec, inputAudioCodec))
- {
- playlistItem.AudioCodec = supportedAudioCodec;
- break;
- }
- }
-
- if (string.IsNullOrEmpty(playlistItem.AudioCodec))
- {
- playlistItem.AudioCodec = supportedAudioCodecs[0];
- }
+ playlistItem.AudioCodecs = transcodingProfile.AudioCodec.Split(',');
playlistItem.VideoCodec = transcodingProfile.VideoCodec;
playlistItem.CopyTimestamps = transcodingProfile.CopyTimestamps;
@@ -488,7 +481,7 @@ namespace MediaBrowser.Model.Dlna
List<ProfileCondition> audioTranscodingConditions = new List<ProfileCondition>();
foreach (CodecProfile i in options.Profile.CodecProfiles)
{
- if (i.Type == CodecType.VideoAudio && i.ContainsCodec(playlistItem.AudioCodec, transcodingProfile.Container))
+ if (i.Type == CodecType.VideoAudio && i.ContainsCodec(playlistItem.TargetAudioCodec, transcodingProfile.Container))
{
foreach (ProfileCondition c in i.Conditions)
{
@@ -842,17 +835,17 @@ namespace MediaBrowser.Model.Dlna
{
bool requiresConversion = !StringHelper.EqualsIgnoreCase(subtitleStream.Codec, profile.Format);
- if (requiresConversion && !allowConversion)
+ if (!requiresConversion)
{
- continue;
+ return profile;
}
- if (!requiresConversion)
+ if (!allowConversion)
{
- return profile;
+ continue;
}
- if (subtitleStream.IsTextSubtitleStream && subtitleStream.SupportsExternalStream)
+ if (subtitleStream.IsTextSubtitleStream && subtitleStream.SupportsExternalStream && subtitleStream.SupportsSubtitleConversionTo(profile.Format))
{
return profile;
}
diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs
index 313c30e2c5..43a31f6492 100644
--- a/MediaBrowser.Model/Dlna/StreamInfo.cs
+++ b/MediaBrowser.Model/Dlna/StreamInfo.cs
@@ -14,6 +14,11 @@ namespace MediaBrowser.Model.Dlna
/// </summary>
public class StreamInfo
{
+ public StreamInfo()
+ {
+ AudioCodecs = new string[] { };
+ }
+
public string ItemId { get; set; }
public PlayMethod PlayMethod { get; set; }
@@ -32,7 +37,7 @@ namespace MediaBrowser.Model.Dlna
public bool CopyTimestamps { get; set; }
public bool ForceLiveStream { get; set; }
- public string AudioCodec { get; set; }
+ public string[] AudioCodecs { get; set; }
public int? AudioStreamIndex { get; set; }
@@ -191,12 +196,16 @@ namespace MediaBrowser.Model.Dlna
{
List<NameValuePair> list = new List<NameValuePair>();
+ string audioCodecs = item.AudioCodecs.Length == 0 ?
+ string.Empty :
+ string.Join(",", item.AudioCodecs);
+
list.Add(new NameValuePair("DeviceProfileId", item.DeviceProfileId ?? string.Empty));
list.Add(new NameValuePair("DeviceId", item.DeviceId ?? string.Empty));
list.Add(new NameValuePair("MediaSourceId", item.MediaSourceId ?? string.Empty));
list.Add(new NameValuePair("Static", item.IsDirectStream.ToString().ToLower()));
list.Add(new NameValuePair("VideoCodec", item.VideoCodec ?? string.Empty));
- list.Add(new NameValuePair("AudioCodec", item.AudioCodec ?? string.Empty));
+ list.Add(new NameValuePair("AudioCodec", audioCodecs));
list.Add(new NameValuePair("AudioStreamIndex", item.AudioStreamIndex.HasValue ? StringHelper.ToStringCultureInvariant(item.AudioStreamIndex.Value) : string.Empty));
list.Add(new NameValuePair("SubtitleStreamIndex", item.SubtitleStreamIndex.HasValue && item.SubtitleDeliveryMethod != SubtitleDeliveryMethod.External ? StringHelper.ToStringCultureInvariant(item.SubtitleStreamIndex.Value) : string.Empty));
list.Add(new NameValuePair("VideoBitrate", item.VideoBitrate.HasValue ? StringHelper.ToStringCultureInvariant(item.VideoBitrate.Value) : string.Empty));
@@ -278,7 +287,7 @@ namespace MediaBrowser.Model.Dlna
// HLS will preserve timestamps so we can just grab the full subtitle stream
long startPositionTicks = StringHelper.EqualsIgnoreCase(SubProtocol, "hls")
? 0
- : (PlayMethod == PlayMethod.Transcode && !CopyTimestamps ? StartPositionTicks : 0);
+ : (PlayMethod == PlayMethod.Transcode && !CopyTimestamps ? StartPositionTicks : 0);
// First add the selected track
if (SubtitleStreamIndex.HasValue)
@@ -335,7 +344,8 @@ namespace MediaBrowser.Model.Dlna
Name = stream.Language ?? "Unknown",
Format = subtitleProfile.Format,
Index = stream.Index,
- DeliveryMethod = subtitleProfile.Method
+ DeliveryMethod = subtitleProfile.Method,
+ DisplayTitle = stream.DisplayTitle
};
if (info.DeliveryMethod == SubtitleDeliveryMethod.External)
@@ -554,9 +564,22 @@ namespace MediaBrowser.Model.Dlna
{
MediaStream stream = TargetAudioStream;
- return IsDirectStream
- ? (stream == null ? null : stream.Codec)
- : AudioCodec;
+ string inputCodec = stream == null ? null : stream.Codec;
+
+ if (IsDirectStream)
+ {
+ return inputCodec;
+ }
+
+ foreach (string codec in AudioCodecs)
+ {
+ if (StringHelper.EqualsIgnoreCase(codec, inputCodec))
+ {
+ return codec;
+ }
+ }
+
+ return AudioCodecs.Length == 0 ? null : AudioCodecs[0];
}
}
diff --git a/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs b/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs
index 61b2895fc1..7a89308dcc 100644
--- a/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs
+++ b/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs
@@ -7,6 +7,7 @@ namespace MediaBrowser.Model.Dlna
public string Name { get; set; }
public bool IsForced { get; set; }
public string Format { get; set; }
+ public string DisplayTitle { get; set; }
public int Index { get; set; }
public SubtitleDeliveryMethod DeliveryMethod { get; set; }
public bool IsExternalUrl { get; set; }
diff --git a/MediaBrowser.Model/Dto/ItemCounts.cs b/MediaBrowser.Model/Dto/ItemCounts.cs
index a3a00c3412..07ddfa1ac6 100644
--- a/MediaBrowser.Model/Dto/ItemCounts.cs
+++ b/MediaBrowser.Model/Dto/ItemCounts.cs
@@ -60,5 +60,6 @@
/// </summary>
/// <value>The book count.</value>
public int BookCount { get; set; }
+ public int ItemCount { get; set; }
}
}
diff --git a/MediaBrowser.Model/Entities/ImageType.cs b/MediaBrowser.Model/Entities/ImageType.cs
index 18097abb44..6e0ba717f0 100644
--- a/MediaBrowser.Model/Entities/ImageType.cs
+++ b/MediaBrowser.Model/Entities/ImageType.cs
@@ -9,50 +9,50 @@ namespace MediaBrowser.Model.Entities
/// <summary>
/// The primary
/// </summary>
- Primary,
+ Primary = 0,
/// <summary>
/// The art
/// </summary>
- Art,
+ Art = 1,
/// <summary>
/// The backdrop
/// </summary>
- Backdrop,
+ Backdrop = 2,
/// <summary>
/// The banner
/// </summary>
- Banner,
+ Banner = 3,
/// <summary>
/// The logo
/// </summary>
- Logo,
+ Logo = 4,
/// <summary>
/// The thumb
/// </summary>
- Thumb,
+ Thumb = 5,
/// <summary>
/// The disc
/// </summary>
- Disc,
+ Disc = 6,
/// <summary>
/// The box
/// </summary>
- Box,
+ Box = 7,
/// <summary>
/// The screenshot
/// </summary>
- Screenshot,
+ Screenshot = 8,
/// <summary>
/// The menu
/// </summary>
- Menu,
+ Menu = 9,
/// <summary>
/// The chapter image
/// </summary>
- Chapter,
+ Chapter = 10,
/// <summary>
/// The box rear
/// </summary>
- BoxRear
+ BoxRear = 11
}
}
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index 64c7d9aa6c..990de332e1 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -36,6 +36,9 @@ namespace MediaBrowser.Model.Entities
/// <value>The comment.</value>
public string Comment { get; set; }
+ public string TimeBase { get; set; }
+ public string CodecTimeBase { get; set; }
+
public string Title { get; set; }
public string DisplayTitle
@@ -72,15 +75,12 @@ namespace MediaBrowser.Model.Entities
{
attributes.Add(StringHelper.ToStringCultureInvariant(Channels.Value) + " ch");
}
-
- string name = string.Join(" ", attributes.ToArray());
-
if (IsDefault)
{
- name += " (D)";
+ attributes.Add("Default");
}
- return name;
+ return string.Join(" ", attributes.ToArray());
}
if (Type == MediaStreamType.Subtitle)
@@ -89,29 +89,19 @@ namespace MediaBrowser.Model.Entities
if (!string.IsNullOrEmpty(Language))
{
- attributes.Add(Language);
- }
- if (!string.IsNullOrEmpty(Codec))
- {
- attributes.Add(Codec);
+ attributes.Add(StringHelper.FirstToUpper(Language));
}
-
- string name = string.Join(" ", attributes.ToArray());
-
if (IsDefault)
{
- name += " (D)";
+ attributes.Add("Default");
}
if (IsForced)
{
- name += " (F)";
+ attributes.Add("Forced");
}
- if (IsExternal)
- {
- name += " (EXT)";
- }
+ string name = string.Join(" ", attributes.ToArray());
return name;
}
@@ -292,6 +282,36 @@ namespace MediaBrowser.Model.Entities
!StringHelper.EqualsIgnoreCase(codec, "sub");
}
+ public bool SupportsSubtitleConversionTo(string codec)
+ {
+ if (!IsTextSubtitleStream)
+ {
+ return false;
+ }
+
+ // Can't convert from this
+ if (StringHelper.EqualsIgnoreCase(Codec, "ass"))
+ {
+ return false;
+ }
+ if (StringHelper.EqualsIgnoreCase(Codec, "ssa"))
+ {
+ return false;
+ }
+
+ // Can't convert to this
+ if (StringHelper.EqualsIgnoreCase(codec, "ass"))
+ {
+ return false;
+ }
+ if (StringHelper.EqualsIgnoreCase(codec, "ssa"))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
/// <summary>
/// Gets or sets a value indicating whether [supports external stream].
/// </summary>
diff --git a/MediaBrowser.Model/Entities/MediaUrl.cs b/MediaBrowser.Model/Entities/MediaUrl.cs
index 24e3b14927..2e17bba8a8 100644
--- a/MediaBrowser.Model/Entities/MediaUrl.cs
+++ b/MediaBrowser.Model/Entities/MediaUrl.cs
@@ -5,6 +5,5 @@ namespace MediaBrowser.Model.Entities
{
public string Url { get; set; }
public string Name { get; set; }
- public VideoSize? VideoSize { get; set; }
}
}
diff --git a/MediaBrowser.Model/Entities/VideoSize.cs b/MediaBrowser.Model/Entities/VideoSize.cs
deleted file mode 100644
index 0100f3b904..0000000000
--- a/MediaBrowser.Model/Entities/VideoSize.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace MediaBrowser.Model.Entities
-{
- public enum VideoSize
- {
- StandardDefinition,
- HighDefinition
- }
-} \ No newline at end of file
diff --git a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs
index e00443d191..242a2d24e4 100644
--- a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs
+++ b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs
@@ -1,4 +1,6 @@
using System.Collections.Generic;
+using MediaBrowser.Model.Dto;
+using MediaBrowser.Model.Extensions;
namespace MediaBrowser.Model.LiveTv
{
@@ -73,11 +75,33 @@ namespace MediaBrowser.Model.LiveTv
public string[] EnabledTuners { get; set; }
public bool EnableAllTuners { get; set; }
+ public string[] NewsCategories { get; set; }
+ public string[] SportsCategories { get; set; }
+ public string[] KidsCategories { get; set; }
+ public string[] MovieCategories { get; set; }
+ public NameValuePair[] ChannelMappings { get; set; }
public ListingsProviderInfo()
{
+ NewsCategories = new string[] { "news", "journalism", "documentary", "current affairs" };
+ SportsCategories = new string[] { "sports", "basketball", "baseball", "football" };
+ KidsCategories = new string[] { "kids", "family", "children", "childrens", "disney" };
+ MovieCategories = new string[] { "movie" };
EnabledTuners = new string[] { };
EnableAllTuners = true;
+ ChannelMappings = new NameValuePair[] {};
+ }
+
+ public string GetMappedChannel(string channelNumber)
+ {
+ foreach (NameValuePair mapping in ChannelMappings)
+ {
+ if (StringHelper.EqualsIgnoreCase(mapping.Name, channelNumber))
+ {
+ return mapping.Value;
+ }
+ }
+ return channelNumber;
}
}
}
diff --git a/MediaBrowser.Model/LiveTv/RecordingQuery.cs b/MediaBrowser.Model/LiveTv/RecordingQuery.cs
index 0cf9976025..923d303f80 100644
--- a/MediaBrowser.Model/LiveTv/RecordingQuery.cs
+++ b/MediaBrowser.Model/LiveTv/RecordingQuery.cs
@@ -70,5 +70,12 @@ namespace MediaBrowser.Model.LiveTv
public bool? EnableImages { get; set; }
public int? ImageTypeLimit { get; set; }
public ImageType[] EnableImageTypes { get; set; }
+
+ public bool EnableTotalRecordCount { get; set; }
+
+ public RecordingQuery()
+ {
+ EnableTotalRecordCount = true;
+ }
}
}
diff --git a/MediaBrowser.Model/LiveTv/TimerQuery.cs b/MediaBrowser.Model/LiveTv/TimerQuery.cs
index e6ceff5300..87b6b89acd 100644
--- a/MediaBrowser.Model/LiveTv/TimerQuery.cs
+++ b/MediaBrowser.Model/LiveTv/TimerQuery.cs
@@ -13,5 +13,7 @@
/// </summary>
/// <value>The series timer identifier.</value>
public string SeriesTimerId { get; set; }
+
+ public bool? IsActive { get; set; }
}
} \ No newline at end of file
diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj
index 7c469b9fb9..e54273b84c 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -97,8 +97,6 @@
<Compile Include="Configuration\FanartOptions.cs" />
<Compile Include="Configuration\MetadataConfiguration.cs" />
<Compile Include="Configuration\PeopleMetadataOptions.cs" />
- <Compile Include="Configuration\TheMovieDbOptions.cs" />
- <Compile Include="Configuration\TvdbOptions.cs" />
<Compile Include="Configuration\XbmcMetadataOptions.cs" />
<Compile Include="Configuration\SubtitlePlaybackMode.cs" />
<Compile Include="Connect\ConnectAuthenticationExchangeResult.cs" />
@@ -229,7 +227,6 @@
<Compile Include="Entities\ProviderIdsExtensions.cs" />
<Compile Include="Entities\ScrollDirection.cs" />
<Compile Include="Entities\SortOrder.cs" />
- <Compile Include="Entities\VideoSize.cs" />
<Compile Include="Events\GenericEventArgs.cs" />
<Compile Include="Extensions\DoubleHelper.cs" />
<Compile Include="Extensions\IHasPropertyChangedEvent.cs" />
@@ -398,6 +395,7 @@
<Compile Include="Sync\SyncProfileOption.cs" />
<Compile Include="Sync\SyncQualityOption.cs" />
<Compile Include="Sync\SyncTarget.cs" />
+ <Compile Include="System\Architecture.cs" />
<Compile Include="System\LogFile.cs" />
<Compile Include="System\PublicSystemInfo.cs" />
<Compile Include="Updates\CheckForUpdateResult.cs" />
diff --git a/MediaBrowser.Model/Querying/ItemSortBy.cs b/MediaBrowser.Model/Querying/ItemSortBy.cs
index 9c2926b542..6f4ebd0c50 100644
--- a/MediaBrowser.Model/Querying/ItemSortBy.cs
+++ b/MediaBrowser.Model/Querying/ItemSortBy.cs
@@ -85,5 +85,6 @@ namespace MediaBrowser.Model.Querying
public const string GameSystem = "GameSystem";
public const string IsFavoriteOrLiked = "IsFavoriteOrLiked";
public const string DateLastContentAdded = "DateLastContentAdded";
+ public const string SeriesDatePlayed = "SeriesDatePlayed";
}
}
diff --git a/MediaBrowser.Model/System/Architecture.cs b/MediaBrowser.Model/System/Architecture.cs
new file mode 100644
index 0000000000..09eedddc13
--- /dev/null
+++ b/MediaBrowser.Model/System/Architecture.cs
@@ -0,0 +1,9 @@
+namespace MediaBrowser.Model.System
+{
+ public enum Architecture
+ {
+ X86 = 0,
+ X64 = 1,
+ Arm = 2
+ }
+}
diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs
index 6b54a90d44..3d1de5b379 100644
--- a/MediaBrowser.Model/System/SystemInfo.cs
+++ b/MediaBrowser.Model/System/SystemInfo.cs
@@ -152,6 +152,10 @@ namespace MediaBrowser.Model.System
/// <value><c>true</c> if [supports automatic run at startup]; otherwise, <c>false</c>.</value>
public bool SupportsAutoRunAtStartup { get; set; }
+ public string EncoderLocationType { get; set; }
+
+ public Architecture SystemArchitecture { get; set; }
+
/// <summary>
/// Initializes a new instance of the <see cref="SystemInfo" /> class.
/// </summary>