diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-03-25 13:52:36 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-03-25 13:52:36 -0400 |
| commit | d9108f69f35080acb5ebefaefcd469595529afa2 (patch) | |
| tree | 3f04e719877b9cdec9529ca34406b753f6492abc /MediaBrowser.Model | |
| parent | d6832e7a41c2a24f7dd998284e8e4f6eacf1d188 (diff) | |
| parent | 72fe76ab1008f0bd38157cc37cde45797b5f6417 (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/Emby
Diffstat (limited to 'MediaBrowser.Model')
| -rw-r--r-- | MediaBrowser.Model/ApiClient/ServerCredentials.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Model/ApiClient/ServerInfo.cs | 1 | ||||
| -rw-r--r-- | MediaBrowser.Model/Configuration/ServerConfiguration.cs | 11 | ||||
| -rw-r--r-- | MediaBrowser.Model/Configuration/UserConfiguration.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/StreamBuilder.cs | 35 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/StreamInfo.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/BaseItemDto.cs | 23 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/ItemByNameCounts.cs | 63 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/ItemCounts.cs | 10 | ||||
| -rw-r--r-- | MediaBrowser.Model/Entities/TrailerType.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Model/FodyWeavers.xml | 4 | ||||
| -rw-r--r-- | MediaBrowser.Model/LiveTv/LiveTvOptions.cs | 6 | ||||
| -rw-r--r-- | MediaBrowser.Model/MediaBrowser.Model.csproj | 10 | ||||
| -rw-r--r-- | MediaBrowser.Model/Providers/SubtitleOptions.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Querying/ItemFields.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Model/Session/PlaybackStopInfo.cs | 9 | ||||
| -rw-r--r-- | MediaBrowser.Model/packages.config | 5 |
17 files changed, 73 insertions, 130 deletions
diff --git a/MediaBrowser.Model/ApiClient/ServerCredentials.cs b/MediaBrowser.Model/ApiClient/ServerCredentials.cs index f9af0fa4e..0f0ab65d4 100644 --- a/MediaBrowser.Model/ApiClient/ServerCredentials.cs +++ b/MediaBrowser.Model/ApiClient/ServerCredentials.cs @@ -41,11 +41,6 @@ namespace MediaBrowser.Model.ApiClient { existing.DateLastAccessed = server.DateLastAccessed; } - - if (server.DateLastLocalConnection > existing.DateLastLocalConnection) - { - existing.DateLastLocalConnection = server.DateLastLocalConnection; - } existing.UserLinkType = server.UserLinkType; diff --git a/MediaBrowser.Model/ApiClient/ServerInfo.cs b/MediaBrowser.Model/ApiClient/ServerInfo.cs index 53ae5be52..e1fa581d7 100644 --- a/MediaBrowser.Model/ApiClient/ServerInfo.cs +++ b/MediaBrowser.Model/ApiClient/ServerInfo.cs @@ -19,7 +19,6 @@ namespace MediaBrowser.Model.ApiClient public String AccessToken { get; set; } public List<WakeOnLanInfo> WakeOnLanInfos { get; set; } public DateTime DateLastAccessed { get; set; } - public DateTime DateLastLocalConnection { get; set; } public String ExchangeToken { get; set; } public UserLinkType? UserLinkType { get; set; } public ConnectionMode? LastConnectionMode { get; set; } diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index 64edbdea9..041f51a89 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -63,11 +63,11 @@ namespace MediaBrowser.Model.Configuration public bool IsPortAuthorized { get; set; } /// <summary> - /// Gets or sets the item by name path. + /// Gets or sets a value indicating whether [enable case sensitive item ids]. /// </summary> - /// <value>The item by name path.</value> - public string ItemsByNamePath { get; set; } - + /// <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> @@ -207,7 +207,8 @@ namespace MediaBrowser.Model.Configuration public bool DownloadImagesInAdvance { get; set; } public bool EnableAnonymousUsageReporting { get; set; } - + public bool EnableStandaloneMusicKeys { get; set; } + /// <summary> /// Initializes a new instance of the <see cref="ServerConfiguration" /> class. /// </summary> diff --git a/MediaBrowser.Model/Configuration/UserConfiguration.cs b/MediaBrowser.Model/Configuration/UserConfiguration.cs index a024eeab4..f294d1dec 100644 --- a/MediaBrowser.Model/Configuration/UserConfiguration.cs +++ b/MediaBrowser.Model/Configuration/UserConfiguration.cs @@ -60,7 +60,8 @@ namespace MediaBrowser.Model.Configuration EnableNextEpisodeAutoPlay = true; RememberAudioSelections = true; RememberSubtitleSelections = true; - + DisplayChannelsInline = true; + HidePlayedInLatest = true; PlayDefaultAudioTrack = true; diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index d4ca379c0..b04f1b0fb 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -423,7 +423,24 @@ namespace MediaBrowser.Model.Dlna playlistItem.Container = transcodingProfile.Container; playlistItem.EstimateContentLength = transcodingProfile.EstimateContentLength; playlistItem.TranscodeSeekInfo = transcodingProfile.TranscodeSeekInfo; - playlistItem.AudioCodec = transcodingProfile.AudioCodec.Split(',')[0]; + + // TODO: We should probably preserve the full list and sent it tp 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.VideoCodec = transcodingProfile.VideoCodec; playlistItem.CopyTimestamps = transcodingProfile.CopyTimestamps; playlistItem.SubProtocol = transcodingProfile.Protocol; @@ -761,7 +778,12 @@ namespace MediaBrowser.Model.Dlna // Look for an external profile that matches the stream type (text/graphical) foreach (SubtitleProfile profile in subtitleProfiles) { - if (profile.Method != SubtitleDeliveryMethod.External) + if (profile.Method != SubtitleDeliveryMethod.External && profile.Method != SubtitleDeliveryMethod.Hls) + { + continue; + } + + if (profile.Method == SubtitleDeliveryMethod.Hls && playMethod != PlayMethod.Transcode) { continue; } @@ -771,7 +793,8 @@ namespace MediaBrowser.Model.Dlna continue; } - if (subtitleStream.IsTextSubtitleStream == MediaStream.IsTextFormat(profile.Format)) + if ((profile.Method == SubtitleDeliveryMethod.External && subtitleStream.IsTextSubtitleStream == MediaStream.IsTextFormat(profile.Format)) || + (profile.Method == SubtitleDeliveryMethod.Hls && subtitleStream.IsTextSubtitleStream)) { bool requiresConversion = !StringHelper.EqualsIgnoreCase(subtitleStream.Codec, profile.Format); @@ -781,12 +804,6 @@ namespace MediaBrowser.Model.Dlna { return profile; } - - // For sync we can handle the longer extraction times - if (context == EncodingContext.Static && subtitleStream.IsTextSubtitleStream) - { - return profile; - } } } } diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs index 79ee1b5c5..9118efb35 100644 --- a/MediaBrowser.Model/Dlna/StreamInfo.cs +++ b/MediaBrowser.Model/Dlna/StreamInfo.cs @@ -234,7 +234,8 @@ namespace MediaBrowser.Model.Dlna } list.Add(new NameValuePair("CopyTimestamps", (item.CopyTimestamps).ToString().ToLower())); - + list.Add(new NameValuePair("SubtitleMethod", item.SubtitleStreamIndex.HasValue && item.SubtitleDeliveryMethod != SubtitleDeliveryMethod.External ? item.SubtitleDeliveryMethod.ToString() : string.Empty)); + return list; } @@ -344,6 +345,11 @@ namespace MediaBrowser.Model.Dlna StringHelper.ToStringCultureInvariant(startPositionTicks), subtitleProfile.Format); + if (!string.IsNullOrEmpty(accessToken)) + { + info.Url += "?api_key=" + accessToken; + } + info.IsExternalUrl = false; } else diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index ef2de5d78..7928d0bf9 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -43,6 +43,12 @@ namespace MediaBrowser.Model.Dto /// </summary> /// <value>The etag.</value> public string Etag { get; set; } + + /// <summary> + /// Gets or sets the type of the source. + /// </summary> + /// <value>The type of the source.</value> + public string SourceType { get; set; } /// <summary> /// Gets or sets the playlist item identifier. @@ -207,12 +213,6 @@ namespace MediaBrowser.Model.Dto public string ShortOverview { get; set; } /// <summary> - /// Gets or sets the name of the TMDB collection. - /// </summary> - /// <value>The name of the TMDB collection.</value> - public string TmdbCollectionName { get; set; } - - /// <summary> /// Gets or sets the taglines. /// </summary> /// <value>The taglines.</value> @@ -291,6 +291,12 @@ namespace MediaBrowser.Model.Dto public bool? IsPlaceHolder { get; set; } /// <summary> + /// Gets or sets the number. + /// </summary> + /// <value>The number.</value> + public string Number { get; set; } + + /// <summary> /// Gets or sets the index number. /// </summary> /// <value>The index number.</value> @@ -793,6 +799,11 @@ namespace MediaBrowser.Model.Dto public List<MetadataFields> LockedFields { get; set; } /// <summary> + /// Gets or sets the trailer count. + /// </summary> + /// <value>The trailer count.</value> + public int? TrailerCount { get; set; } + /// <summary> /// Gets or sets the movie count. /// </summary> /// <value>The movie count.</value> diff --git a/MediaBrowser.Model/Dto/ItemByNameCounts.cs b/MediaBrowser.Model/Dto/ItemByNameCounts.cs deleted file mode 100644 index 7c51f07bd..000000000 --- a/MediaBrowser.Model/Dto/ItemByNameCounts.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; - -namespace MediaBrowser.Model.Dto -{ - /// <summary> - /// Class ItemByNameCounts - /// </summary> - public class ItemByNameCounts - { - public string UserId { get; set; } - - /// <summary> - /// Gets or sets the total count. - /// </summary> - /// <value>The total count.</value> - public int TotalCount { get; set; } - /// <summary> - /// Gets or sets the adult video count. - /// </summary> - /// <value>The adult video count.</value> - public int AdultVideoCount { get; set; } - /// <summary> - /// Gets or sets the movie count. - /// </summary> - /// <value>The movie count.</value> - public int MovieCount { get; set; } - /// <summary> - /// Gets or sets the series count. - /// </summary> - /// <value>The series count.</value> - public int SeriesCount { get; set; } - /// <summary> - /// Gets or sets the episode count. - /// </summary> - /// <value>The episode count.</value> - public int EpisodeCount { get; set; } - /// <summary> - /// Gets or sets the game count. - /// </summary> - /// <value>The game count.</value> - public int GameCount { get; set; } - /// <summary> - /// Gets or sets the trailer count. - /// </summary> - /// <value>The trailer count.</value> - public int TrailerCount { get; set; } - /// <summary> - /// Gets or sets the song count. - /// </summary> - /// <value>The song count.</value> - public int SongCount { get; set; } - /// <summary> - /// Gets or sets the album count. - /// </summary> - /// <value>The album count.</value> - public int AlbumCount { get; set; } - /// <summary> - /// Gets or sets the music video count. - /// </summary> - /// <value>The music video count.</value> - public int MusicVideoCount { get; set; } - } -} diff --git a/MediaBrowser.Model/Dto/ItemCounts.cs b/MediaBrowser.Model/Dto/ItemCounts.cs index c8745ebe3..e80de26b1 100644 --- a/MediaBrowser.Model/Dto/ItemCounts.cs +++ b/MediaBrowser.Model/Dto/ItemCounts.cs @@ -62,15 +62,5 @@ namespace MediaBrowser.Model.Dto /// </summary> /// <value>The book count.</value> public int BookCount { get; set; } - /// <summary> - /// Gets or sets the unique types. - /// </summary> - /// <value>The unique types.</value> - public List<string> UniqueTypes { get; set; } - - public ItemCounts() - { - UniqueTypes = new List<string>(); - } } } diff --git a/MediaBrowser.Model/Entities/TrailerType.cs b/MediaBrowser.Model/Entities/TrailerType.cs index c96a05bcd..085f461cf 100644 --- a/MediaBrowser.Model/Entities/TrailerType.cs +++ b/MediaBrowser.Model/Entities/TrailerType.cs @@ -5,6 +5,7 @@ namespace MediaBrowser.Model.Entities ComingSoonToTheaters = 1, ComingSoonToDvd = 2, ComingSoonToStreaming = 3, - Archive = 4 + Archive = 4, + LocalTrailer = 5 } }
\ No newline at end of file diff --git a/MediaBrowser.Model/FodyWeavers.xml b/MediaBrowser.Model/FodyWeavers.xml deleted file mode 100644 index 736992810..000000000 --- a/MediaBrowser.Model/FodyWeavers.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Weavers> - <PropertyChanged /> -</Weavers>
\ No newline at end of file diff --git a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs index e705102db..71f87ac3a 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs @@ -29,8 +29,14 @@ namespace MediaBrowser.Model.LiveTv public string Id { get; set; } public string Url { get; set; } public string Type { get; set; } + public string DeviceId { get; set; } public bool ImportFavoritesOnly { get; set; } public bool IsEnabled { get; set; } + public string M3UUrl { get; set; } + public string InfoUrl { get; set; } + public string FriendlyName { get; set; } + public int Tuners { get; set; } + public string DiseqC { get; set; } public int DataVersion { get; set; } diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index fda240249..41952963c 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -14,6 +14,7 @@ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <ReleaseVersion> </ReleaseVersion> + <NuGetPackageImportStamp>60e95275</NuGetPackageImportStamp> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -214,7 +215,6 @@ <Compile Include="Dto\IItemDto.cs" /> <Compile Include="Dto\ImageByNameInfo.cs" /> <Compile Include="Dto\ImageInfo.cs" /> - <Compile Include="Dto\ItemByNameCounts.cs" /> <Compile Include="Dto\ItemCounts.cs" /> <Compile Include="Dto\ItemIndex.cs" /> <Compile Include="Dto\RatingType.cs" /> @@ -441,7 +441,6 @@ <Compile Include="Users\UserAction.cs" /> <Compile Include="Users\UserActionType.cs" /> <Compile Include="Users\UserPolicy.cs" /> - <None Include="FodyWeavers.xml" /> <None Include="MediaBrowser.Model.snk" /> </ItemGroup> <ItemGroup> @@ -458,13 +457,6 @@ <PropertyGroup> <PostBuildEvent /> </PropertyGroup> - <Import Project="..\packages\Fody.1.29.2\build\dotnet\Fody.targets" Condition="Exists('..\packages\Fody.1.29.2\build\dotnet\Fody.targets')" /> - <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> - <PropertyGroup> - <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> - </PropertyGroup> - <Error Condition="!Exists('..\packages\Fody.1.29.2\build\dotnet\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.1.29.2\build\dotnet\Fody.targets'))" /> - </Target> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> diff --git a/MediaBrowser.Model/Providers/SubtitleOptions.cs b/MediaBrowser.Model/Providers/SubtitleOptions.cs index 84f01e0b7..2b15c0e1f 100644 --- a/MediaBrowser.Model/Providers/SubtitleOptions.cs +++ b/MediaBrowser.Model/Providers/SubtitleOptions.cs @@ -2,7 +2,7 @@ namespace MediaBrowser.Model.Providers { public class SubtitleOptions { - public bool SkipIfGraphicalSubtitlesPresent { get; set; } + public bool SkipIfEmbeddedSubtitlesPresent { get; set; } public bool SkipIfAudioTrackMatches { get; set; } public string[] DownloadLanguages { get; set; } public bool DownloadMovieSubtitles { get; set; } diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs index 97fec8fdd..1540f178a 100644 --- a/MediaBrowser.Model/Querying/ItemFields.cs +++ b/MediaBrowser.Model/Querying/ItemFields.cs @@ -236,11 +236,6 @@ VoteCount, /// <summary> - /// The TMDB collection name - /// </summary> - TmdbCollectionName, - - /// <summary> /// The trailer url of the item /// </summary> RemoteTrailers, diff --git a/MediaBrowser.Model/Session/PlaybackStopInfo.cs b/MediaBrowser.Model/Session/PlaybackStopInfo.cs index 80d719f03..3b4ac36a7 100644 --- a/MediaBrowser.Model/Session/PlaybackStopInfo.cs +++ b/MediaBrowser.Model/Session/PlaybackStopInfo.cs @@ -12,25 +12,21 @@ namespace MediaBrowser.Model.Session /// </summary> /// <value>The item.</value> public BaseItemInfo Item { get; set; } - /// <summary> /// Gets or sets the item identifier. /// </summary> /// <value>The item identifier.</value> public string ItemId { get; set; } - /// <summary> /// Gets or sets the session id. /// </summary> /// <value>The session id.</value> public string SessionId { get; set; } - /// <summary> /// Gets or sets the media version identifier. /// </summary> /// <value>The media version identifier.</value> public string MediaSourceId { get; set; } - /// <summary> /// Gets or sets the position ticks. /// </summary> @@ -46,5 +42,10 @@ namespace MediaBrowser.Model.Session /// </summary> /// <value>The play session identifier.</value> public string PlaySessionId { get; set; } + /// <summary> + /// Gets or sets a value indicating whether this <see cref="PlaybackStopInfo"/> is failed. + /// </summary> + /// <value><c>true</c> if failed; otherwise, <c>false</c>.</value> + public bool Failed { get; set; } } }
\ No newline at end of file diff --git a/MediaBrowser.Model/packages.config b/MediaBrowser.Model/packages.config deleted file mode 100644 index df2ddcf0f..000000000 --- a/MediaBrowser.Model/packages.config +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<packages> - <package id="Fody" version="1.29.2" targetFramework="net45" developmentDependency="true" /> - <package id="PropertyChanged.Fody" version="1.50.4" targetFramework="net45" developmentDependency="true" /> -</packages>
\ No newline at end of file |
