From c7f559f8cefa4c4b90df3bff72290c8bd5b18e01 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 21 Oct 2016 22:08:34 -0400 Subject: [PATCH] make model project portable --- Emby.Drawing/Emby.Drawing.csproj | 3 +- MediaBrowser.Api/MediaBrowser.Api.csproj | 5 +- MediaBrowser.Api/Movies/MoviesService.cs | 2 +- MediaBrowser.Api/packages.config | 1 - .../HttpClientManager/HttpClientManager.cs | 31 +- ...MediaBrowser.Common.Implementations.csproj | 5 +- .../Networking/BaseNetworkManager.cs | 4 +- .../packages.config | 1 - .../MediaBrowser.Common.csproj | 1 - MediaBrowser.Common/Net/HttpResponseInfo.cs | 6 +- MediaBrowser.Common/Net/INetworkManager.cs | 13 - .../Entities/CollectionFolder.cs | 14 +- MediaBrowser.Controller/Entities/TV/Season.cs | 1 - MediaBrowser.Controller/Entities/TV/Series.cs | 16 +- MediaBrowser.Controller/Entities/User.cs | 16 +- .../Entities/UserViewBuilder.cs | 2 +- .../Library/NameExtensions.cs | 2 +- .../MediaBrowser.Controller.csproj | 10 +- .../Threading/PeriodicTimer.cs | 2 +- MediaBrowser.Controller/packages.config | 1 - MediaBrowser.Dlna/DlnaManager.cs | 89 +- MediaBrowser.Dlna/MediaBrowser.Dlna.csproj | 108 +- .../ProfileSerialization/CodecProfile.cs | 68 + .../ProfileSerialization/ContainerProfile.cs | 31 + .../ProfileSerialization/DeviceProfile.cs | 351 +++++ .../ProfileSerialization/DirectPlayProfile.cs | 51 + .../ProfileSerialization/HttpHeaderInfo.cs | 17 + .../ProfileSerialization/ProfileCondition.cs | 39 + .../ProfileSerialization/ResponseProfile.cs | 64 + .../ProfileSerialization/SubtitleProfile.cs | 48 + .../TranscodingProfile.cs | 58 + .../ProfileSerialization/XmlAttribute.cs | 13 + .../Profiles/Json/BubbleUPnp.json | 1 + MediaBrowser.Dlna/Profiles/Json/Default.json | 1 + .../Profiles/Json/Denon AVR.json | 1 + .../Profiles/Json/DirecTV HD-DVR.json | 1 + .../Profiles/Json/Dish Hopper-Joey.json | 1 + MediaBrowser.Dlna/Profiles/Json/Kodi.json | 1 + .../Profiles/Json/LG Smart TV.json | 1 + .../Profiles/Json/Linksys DMA2100.json | 1 + .../Profiles/Json/MediaMonkey.json | 1 + .../Profiles/Json/Panasonic Viera.json | 1 + .../Profiles/Json/Popcorn Hour.json | 1 + .../Profiles/Json/Samsung Smart TV.json | 1 + .../Json/Sony Blu-ray Player 2013.json | 1 + .../Json/Sony Blu-ray Player 2014.json | 1 + .../Json/Sony Blu-ray Player 2015.json | 1 + .../Json/Sony Blu-ray Player 2016.json | 1 + .../Profiles/Json/Sony Blu-ray Player.json | 1 + .../Profiles/Json/Sony Bravia (2010).json | 1 + .../Profiles/Json/Sony Bravia (2011).json | 1 + .../Profiles/Json/Sony Bravia (2012).json | 1 + .../Profiles/Json/Sony Bravia (2013).json | 1 + .../Profiles/Json/Sony Bravia (2014).json | 1 + .../Profiles/Json/Sony PlayStation 3.json | 1 + .../Profiles/Json/Sony PlayStation 4.json | 1 + MediaBrowser.Dlna/Profiles/Json/Vlc.json | 1 + .../Profiles/Json/WDTV Live.json | 1 + MediaBrowser.Dlna/Profiles/Json/Xbox 360.json | 1 + MediaBrowser.Dlna/Profiles/Json/Xbox One.json | 1 + .../Profiles/Json/foobar2000.json | 1 + MediaBrowser.Dlna/Profiles/Xml/BubbleUPnp.xml | 62 - MediaBrowser.Dlna/Profiles/Xml/Default.xml | 50 - MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml | 50 - .../Profiles/Xml/DirecTV HD-DVR.xml | 67 - .../Profiles/Xml/Dish Hopper-Joey.xml | 92 -- MediaBrowser.Dlna/Profiles/Xml/Kodi.xml | 62 - .../Profiles/Xml/LG Smart TV.xml | 87 -- .../Profiles/Xml/Linksys DMA2100.xml | 50 - .../Profiles/Xml/MediaMonkey.xml | 56 - .../Profiles/Xml/Panasonic Viera.xml | 84 -- .../Profiles/Xml/Popcorn Hour.xml | 88 -- .../Profiles/Xml/Samsung Smart TV.xml | 125 -- .../Profiles/Xml/Sony Blu-ray Player 2013.xml | 87 -- .../Profiles/Xml/Sony Blu-ray Player 2014.xml | 87 -- .../Profiles/Xml/Sony Blu-ray Player 2015.xml | 85 -- .../Profiles/Xml/Sony Blu-ray Player 2016.xml | 85 -- .../Profiles/Xml/Sony Blu-ray Player.xml | 112 -- .../Profiles/Xml/Sony Bravia (2010).xml | 133 -- .../Profiles/Xml/Sony Bravia (2011).xml | 136 -- .../Profiles/Xml/Sony Bravia (2012).xml | 112 -- .../Profiles/Xml/Sony Bravia (2013).xml | 111 -- .../Profiles/Xml/Sony Bravia (2014).xml | 111 -- .../Profiles/Xml/Sony PlayStation 3.xml | 105 -- .../Profiles/Xml/Sony PlayStation 4.xml | 105 -- MediaBrowser.Dlna/Profiles/Xml/Vlc.xml | 62 - MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml | 94 -- MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml | 116 -- MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml | 123 -- MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml | 56 - MediaBrowser.Dlna/packages.config | 1 - .../MediaBrowser.LocalMetadata.csproj | 5 +- .../MediaBrowser.MediaEncoding.csproj | 5 +- .../MediaBrowser.Model.Portable.csproj | 1224 ----------------- .../Properties/AssemblyInfo.cs | 23 - MediaBrowser.Model.Portable/app.config | 15 - .../MediaBrowser.Model.net35.csproj | 1178 ---------------- .../MediaBrowser.Model.snk | Bin 596 -> 0 bytes .../Properties/AssemblyInfo.cs | 30 - MediaBrowser.Model/Dlna/CodecProfile.cs | 3 - MediaBrowser.Model/Dlna/ConditionProcessor.cs | 21 +- MediaBrowser.Model/Dlna/ContainerProfile.cs | 2 - MediaBrowser.Model/Dlna/DeviceProfile.cs | 7 +- MediaBrowser.Model/Dlna/DirectPlayProfile.cs | 5 - MediaBrowser.Model/Dlna/HttpHeaderInfo.cs | 3 - MediaBrowser.Model/Dlna/ProfileCondition.cs | 4 - MediaBrowser.Model/Dlna/ResponseProfile.cs | 6 - MediaBrowser.Model/Dlna/StreamBuilder.cs | 19 +- MediaBrowser.Model/Dlna/SubtitleProfile.cs | 4 - MediaBrowser.Model/Dlna/TranscodingProfile.cs | 13 - MediaBrowser.Model/Dlna/XmlAttribute.cs | 2 - MediaBrowser.Model/Dto/BaseItemDto.cs | 2 +- MediaBrowser.Model/Dto/BaseItemPerson.cs | 2 +- MediaBrowser.Model/Dto/ChapterInfoDto.cs | 2 +- MediaBrowser.Model/Dto/MediaSourceInfo.cs | 2 +- MediaBrowser.Model/Dto/StudioDto.cs | 2 +- MediaBrowser.Model/Dto/UserDto.cs | 2 +- MediaBrowser.Model/Entities/BaseItemInfo.cs | 2 +- MediaBrowser.Model/Extensions/IntHelper.cs | 21 - .../Extensions/LinqExtensions.cs | 84 ++ .../Health/IHealthMonitor.cs | 2 +- MediaBrowser.Model/LiveTv/ChannelInfoDto.cs | 2 +- .../LiveTv/SeriesTimerInfoDto.cs | 2 +- MediaBrowser.Model/MediaBrowser.Model.csproj | 69 +- MediaBrowser.Model/MediaBrowser.Model.snk | Bin 596 -> 0 bytes .../IgnoreDataMemberAttribute.cs | 12 + .../Updates/PackageVersionInfo.cs | 2 +- MediaBrowser.Model/project.json | 7 + MediaBrowser.Model/project.lock.json | 14 + .../MediaBrowser.Providers.csproj | 8 +- MediaBrowser.Providers/packages.config | 1 - .../Channels/ChannelPostScanTask.cs | 2 +- .../Collections/CollectionImageProvider.cs | 2 +- .../Connect/ConnectEntryPoint.cs | 2 +- .../Dto/DtoService.cs | 2 +- .../EntryPoints/ExternalPortForwarding.cs | 2 +- .../EntryPoints/LibraryChangedNotifier.cs | 2 +- .../EntryPoints/LoadRegistrations.cs | 2 +- .../EntryPoints/UserDataChangeNotifier.cs | 2 +- .../IO/FileRefresher.cs | 2 +- .../Intros/DefaultIntroProvider.cs | 2 +- .../Library/LibraryManager.cs | 1 - .../LiveTv/LiveTvManager.cs | 2 +- ...MediaBrowser.Server.Implementations.csproj | 5 +- .../News/NewsEntryPoint.cs | 2 +- .../Playlists/PlaylistImageProvider.cs | 2 +- .../Sync/SyncJobProcessor.cs | 2 +- .../Sync/SyncManager.cs | 6 +- .../Udp/UdpServer.cs | 6 +- .../CollectionFolderImageProvider.cs | 2 +- .../UserViews/DynamicImageProvider.cs | 2 +- .../app.config | 2 +- .../packages.config | 1 - .../MediaBrowser.Server.Mono.csproj | 2 +- MediaBrowser.Server.Mono/app.config | 2 +- .../ApplicationHost.cs | 6 +- .../EntryPoints/KeepServerAwake.cs | 2 +- .../MediaBrowser.Server.Startup.Common.csproj | 2 +- MediaBrowser.Tests/MediaBrowser.Tests.csproj | 5 +- MediaBrowser.Tests/app.config | 8 +- .../MediaBrowser.WebDashboard.csproj | 5 +- MediaBrowser.WebDashboard/packages.config | 2 +- .../MediaBrowser.XbmcMetadata.csproj | 5 +- MediaBrowser.sln | 59 +- Mono.Nat/Mono.Nat.csproj | 2 +- .../OpenSubtitlesHandler.csproj | 7 +- 166 files changed, 1185 insertions(+), 5478 deletions(-) rename {MediaBrowser.Common => MediaBrowser.Controller}/Threading/PeriodicTimer.cs (97%) create mode 100644 MediaBrowser.Dlna/ProfileSerialization/CodecProfile.cs create mode 100644 MediaBrowser.Dlna/ProfileSerialization/ContainerProfile.cs create mode 100644 MediaBrowser.Dlna/ProfileSerialization/DeviceProfile.cs create mode 100644 MediaBrowser.Dlna/ProfileSerialization/DirectPlayProfile.cs create mode 100644 MediaBrowser.Dlna/ProfileSerialization/HttpHeaderInfo.cs create mode 100644 MediaBrowser.Dlna/ProfileSerialization/ProfileCondition.cs create mode 100644 MediaBrowser.Dlna/ProfileSerialization/ResponseProfile.cs create mode 100644 MediaBrowser.Dlna/ProfileSerialization/SubtitleProfile.cs create mode 100644 MediaBrowser.Dlna/ProfileSerialization/TranscodingProfile.cs create mode 100644 MediaBrowser.Dlna/ProfileSerialization/XmlAttribute.cs create mode 100644 MediaBrowser.Dlna/Profiles/Json/BubbleUPnp.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Default.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Denon AVR.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/DirecTV HD-DVR.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Dish Hopper-Joey.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Kodi.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/LG Smart TV.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Linksys DMA2100.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/MediaMonkey.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Panasonic Viera.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Popcorn Hour.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Samsung Smart TV.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Sony Blu-ray Player 2013.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Sony Blu-ray Player 2014.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Sony Blu-ray Player 2015.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Sony Blu-ray Player 2016.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Sony Blu-ray Player.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Sony Bravia (2010).json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Sony Bravia (2011).json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Sony Bravia (2012).json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Sony Bravia (2013).json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Sony Bravia (2014).json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Sony PlayStation 3.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Sony PlayStation 4.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Vlc.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/WDTV Live.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Xbox 360.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/Xbox One.json create mode 100644 MediaBrowser.Dlna/Profiles/Json/foobar2000.json delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/BubbleUPnp.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Default.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/DirecTV HD-DVR.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Dish Hopper-Joey.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Kodi.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/MediaMonkey.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Popcorn Hour.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2014).xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 4.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Vlc.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml delete mode 100644 MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml delete mode 100644 MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj delete mode 100644 MediaBrowser.Model.Portable/Properties/AssemblyInfo.cs delete mode 100644 MediaBrowser.Model.Portable/app.config delete mode 100644 MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj delete mode 100644 MediaBrowser.Model.net35/MediaBrowser.Model.snk delete mode 100644 MediaBrowser.Model.net35/Properties/AssemblyInfo.cs delete mode 100644 MediaBrowser.Model/Extensions/IntHelper.cs create mode 100644 MediaBrowser.Model/Extensions/LinqExtensions.cs rename {MediaBrowser.Controller => MediaBrowser.Model}/Health/IHealthMonitor.cs (86%) delete mode 100644 MediaBrowser.Model/MediaBrowser.Model.snk create mode 100644 MediaBrowser.Model/Serialization/IgnoreDataMemberAttribute.cs create mode 100644 MediaBrowser.Model/project.json create mode 100644 MediaBrowser.Model/project.lock.json diff --git a/Emby.Drawing/Emby.Drawing.csproj b/Emby.Drawing/Emby.Drawing.csproj index 6c16838404..8de9e23f54 100644 --- a/Emby.Drawing/Emby.Drawing.csproj +++ b/Emby.Drawing/Emby.Drawing.csproj @@ -9,9 +9,10 @@ Properties Emby.Drawing Emby.Drawing - v4.5 + v4.6 512 ..\ + true diff --git a/MediaBrowser.Api/MediaBrowser.Api.csproj b/MediaBrowser.Api/MediaBrowser.Api.csproj index d7091df566..dafee4b8b6 100644 --- a/MediaBrowser.Api/MediaBrowser.Api.csproj +++ b/MediaBrowser.Api/MediaBrowser.Api.csproj @@ -11,7 +11,7 @@ MediaBrowser.Api 512 ..\ - v4.5.1 + v4.6 @@ -50,9 +50,6 @@ False ..\packages\CommonIO.1.0.0.9\lib\net45\CommonIO.dll - - ..\packages\morelinq.1.4.0\lib\net35\MoreLinq.dll - ..\packages\Patterns.Logging.1.0.0.2\lib\portable-net45+sl4+wp71+win8+wpa81\Patterns.Logging.dll diff --git a/MediaBrowser.Api/Movies/MoviesService.cs b/MediaBrowser.Api/Movies/MoviesService.cs index 559bca7557..6645e0759f 100644 --- a/MediaBrowser.Api/Movies/MoviesService.cs +++ b/MediaBrowser.Api/Movies/MoviesService.cs @@ -8,7 +8,6 @@ using MediaBrowser.Controller.Persistence; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Querying; -using MoreLinq; using ServiceStack; using System; using System.Collections.Generic; @@ -16,6 +15,7 @@ using System.Linq; using System.Threading.Tasks; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.LiveTv; +using MediaBrowser.Model.Extensions; namespace MediaBrowser.Api.Movies { diff --git a/MediaBrowser.Api/packages.config b/MediaBrowser.Api/packages.config index 4f2cbae7cb..ccef6d6862 100644 --- a/MediaBrowser.Api/packages.config +++ b/MediaBrowser.Api/packages.config @@ -1,6 +1,5 @@  - \ No newline at end of file diff --git a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs index eec18e9857..063529cfc8 100644 --- a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs +++ b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs @@ -342,7 +342,6 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager ResponseUrl = url, Content = memoryStream, StatusCode = HttpStatusCode.OK, - Headers = new NameValueCollection(), ContentLength = memoryStream.Length }; } @@ -487,7 +486,7 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager private HttpResponseInfo GetResponseInfo(HttpWebResponse httpResponse, Stream content, long? contentLength, IDisposable disposable) { - return new HttpResponseInfo(disposable) + var responseInfo = new HttpResponseInfo(disposable) { Content = content, @@ -495,17 +494,22 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager ContentType = httpResponse.ContentType, - Headers = new NameValueCollection(httpResponse.Headers), - ContentLength = contentLength, ResponseUrl = httpResponse.ResponseUri.ToString() }; + + if (httpResponse.Headers != null) + { + SetHeaders(httpResponse.Headers, responseInfo); + } + + return responseInfo; } private HttpResponseInfo GetResponseInfo(HttpWebResponse httpResponse, string tempFile, long? contentLength) { - return new HttpResponseInfo + var responseInfo = new HttpResponseInfo { TempFilePath = tempFile, @@ -513,10 +517,23 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager ContentType = httpResponse.ContentType, - Headers = httpResponse.Headers, - ContentLength = contentLength }; + + if (httpResponse.Headers != null) + { + SetHeaders(httpResponse.Headers, responseInfo); + } + + return responseInfo; + } + + private void SetHeaders(WebHeaderCollection headers, HttpResponseInfo responseInfo) + { + foreach (var key in headers.AllKeys) + { + responseInfo.Headers[key] = headers[key]; + } } public Task Post(HttpRequestOptions options) diff --git a/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj b/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj index f3444f01b0..88f9262fcb 100644 --- a/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj +++ b/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj @@ -24,7 +24,7 @@ DEBUG;TRACE prompt 4 - v4.5.1 + v4.6 none @@ -56,9 +56,6 @@ ..\packages\Microsoft.IO.RecyclableMemoryStream.1.1.0.0\lib\net45\Microsoft.IO.RecyclableMemoryStream.dll True - - ..\packages\morelinq.1.4.0\lib\net35\MoreLinq.dll - ..\packages\NLog.4.3.8\lib\net45\NLog.dll True diff --git a/MediaBrowser.Common.Implementations/Networking/BaseNetworkManager.cs b/MediaBrowser.Common.Implementations/Networking/BaseNetworkManager.cs index 1b5e260d71..5e00514d55 100644 --- a/MediaBrowser.Common.Implementations/Networking/BaseNetworkManager.cs +++ b/MediaBrowser.Common.Implementations/Networking/BaseNetworkManager.cs @@ -6,7 +6,7 @@ using System.Linq; using System.Net; using System.Net.NetworkInformation; using System.Net.Sockets; -using MoreLinq; +using MediaBrowser.Model.Extensions; namespace MediaBrowser.Common.Implementations.Networking { @@ -308,7 +308,7 @@ namespace MediaBrowser.Common.Implementations.Networking string[] values = endpointstring.Split(new char[] { ':' }); IPAddress ipaddy; int port = -1; - + //check if we have an IPv6 or ports if (values.Length <= 2) // ipv4 or hostname { diff --git a/MediaBrowser.Common.Implementations/packages.config b/MediaBrowser.Common.Implementations/packages.config index 40c727a063..90a6aae245 100644 --- a/MediaBrowser.Common.Implementations/packages.config +++ b/MediaBrowser.Common.Implementations/packages.config @@ -2,7 +2,6 @@ - diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj index a46aaf9f7b..bdf4daca37 100644 --- a/MediaBrowser.Common/MediaBrowser.Common.csproj +++ b/MediaBrowser.Common/MediaBrowser.Common.csproj @@ -91,7 +91,6 @@ - diff --git a/MediaBrowser.Common/Net/HttpResponseInfo.cs b/MediaBrowser.Common/Net/HttpResponseInfo.cs index 890c893e61..ed941a4474 100644 --- a/MediaBrowser.Common/Net/HttpResponseInfo.cs +++ b/MediaBrowser.Common/Net/HttpResponseInfo.cs @@ -1,5 +1,5 @@ using System; -using System.Collections.Specialized; +using System.Collections.Generic; using System.IO; using System.Net; @@ -50,16 +50,18 @@ namespace MediaBrowser.Common.Net /// Gets or sets the headers. /// /// The headers. - public NameValueCollection Headers { get; set; } + public Dictionary Headers { get; set; } private readonly IDisposable _disposable; public HttpResponseInfo(IDisposable disposable) { _disposable = disposable; + Headers = new Dictionary(StringComparer.OrdinalIgnoreCase); } public HttpResponseInfo() { + Headers = new Dictionary(StringComparer.OrdinalIgnoreCase); } public void Dispose() diff --git a/MediaBrowser.Common/Net/INetworkManager.cs b/MediaBrowser.Common/Net/INetworkManager.cs index de63ddd513..0a565f6701 100644 --- a/MediaBrowser.Common/Net/INetworkManager.cs +++ b/MediaBrowser.Common/Net/INetworkManager.cs @@ -7,12 +7,6 @@ namespace MediaBrowser.Common.Net { public interface INetworkManager { - /// - /// Gets the machine's local ip address - /// - /// IPAddress. - IEnumerable GetLocalIpAddresses(); - /// /// Gets a random port number that is currently available /// @@ -45,13 +39,6 @@ namespace MediaBrowser.Common.Net /// PC's in the Domain IEnumerable GetNetworkDevices(); - /// - /// Parses the specified endpointstring. - /// - /// The endpointstring. - /// IPEndPoint. - IPEndPoint Parse(string endpointstring); - /// /// Determines whether [is in local network] [the specified endpoint]. /// diff --git a/MediaBrowser.Controller/Entities/CollectionFolder.cs b/MediaBrowser.Controller/Entities/CollectionFolder.cs index 41e277b7ca..414b2b2c3a 100644 --- a/MediaBrowser.Controller/Entities/CollectionFolder.cs +++ b/MediaBrowser.Controller/Entities/CollectionFolder.cs @@ -11,8 +11,8 @@ using System.Threading.Tasks; using CommonIO; using MediaBrowser.Controller.Configuration; using MediaBrowser.Model.Configuration; +using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Serialization; -using MoreLinq; namespace MediaBrowser.Controller.Entities { @@ -29,7 +29,7 @@ namespace MediaBrowser.Controller.Entities PhysicalLocationsList = new List(); } - [IgnoreDataMember] + [System.Runtime.Serialization.IgnoreDataMember] protected override bool SupportsShortcutChildren { get @@ -38,7 +38,7 @@ namespace MediaBrowser.Controller.Entities } } - [IgnoreDataMember] + [System.Runtime.Serialization.IgnoreDataMember] public override bool SupportsPlayedStatus { get @@ -129,7 +129,7 @@ namespace MediaBrowser.Controller.Entities /// Allow different display preferences for each collection folder /// /// The display prefs id. - [IgnoreDataMember] + [System.Runtime.Serialization.IgnoreDataMember] public override Guid DisplayPreferencesId { get @@ -138,7 +138,7 @@ namespace MediaBrowser.Controller.Entities } } - [IgnoreDataMember] + [System.Runtime.Serialization.IgnoreDataMember] public override IEnumerable PhysicalLocations { get @@ -283,7 +283,7 @@ namespace MediaBrowser.Controller.Entities /// Our children are actually just references to the ones in the physical root... /// /// The actual children. - [IgnoreDataMember] + [System.Runtime.Serialization.IgnoreDataMember] protected override IEnumerable ActualChildren { get { return GetActualChildren(); } @@ -322,7 +322,7 @@ namespace MediaBrowser.Controller.Entities return result; } - [IgnoreDataMember] + [System.Runtime.Serialization.IgnoreDataMember] public override bool SupportsPeople { get diff --git a/MediaBrowser.Controller/Entities/TV/Season.cs b/MediaBrowser.Controller/Entities/TV/Season.cs index ce13f5fc5f..fa713c5cab 100644 --- a/MediaBrowser.Controller/Entities/TV/Season.cs +++ b/MediaBrowser.Controller/Entities/TV/Season.cs @@ -2,7 +2,6 @@ using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Querying; using MediaBrowser.Model.Users; -using MoreLinq; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs index 39703f67ac..df464b52a8 100644 --- a/MediaBrowser.Controller/Entities/TV/Series.cs +++ b/MediaBrowser.Controller/Entities/TV/Series.cs @@ -9,8 +9,8 @@ using System.Linq; using System.Runtime.Serialization; using System.Threading; using System.Threading.Tasks; +using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Providers; -using MoreLinq; namespace MediaBrowser.Controller.Entities.TV { @@ -106,6 +106,12 @@ namespace MediaBrowser.Controller.Entities.TV private string AddLibrariesToPresentationUniqueKey(string key) { + var lang = GetPreferredMetadataLanguage(); + if (!string.IsNullOrWhiteSpace(lang)) + { + key += "-" + lang; + } + var folders = LibraryManager.GetCollectionFolders(this) .Select(i => i.Id.ToString("N")) .ToArray(); @@ -209,8 +215,8 @@ namespace MediaBrowser.Controller.Entities.TV var query = new InternalItemsQuery(user) { AncestorWithPresentationUniqueKey = seriesKey, - IncludeItemTypes = new[] {typeof (Season).Name}, - SortBy = new[] {ItemSortBy.SortName} + IncludeItemTypes = new[] { typeof(Season).Name }, + SortBy = new[] { ItemSortBy.SortName } }; if (!config.DisplayMissingEpisodes && !config.DisplayUnairedEpisodes) @@ -267,8 +273,8 @@ namespace MediaBrowser.Controller.Entities.TV var query = new InternalItemsQuery(user) { AncestorWithPresentationUniqueKey = seriesKey, - IncludeItemTypes = new[] {typeof (Episode).Name, typeof (Season).Name}, - SortBy = new[] {ItemSortBy.SortName} + IncludeItemTypes = new[] { typeof(Episode).Name, typeof(Season).Name }, + SortBy = new[] { ItemSortBy.SortName } }; var config = user.Configuration; if (!config.DisplayMissingEpisodes && !config.DisplayUnairedEpisodes) diff --git a/MediaBrowser.Controller/Entities/User.cs b/MediaBrowser.Controller/Entities/User.cs index 46da469fa5..00320e9b77 100644 --- a/MediaBrowser.Controller/Entities/User.cs +++ b/MediaBrowser.Controller/Entities/User.cs @@ -42,7 +42,7 @@ namespace MediaBrowser.Controller.Entities /// Gets or sets the path. /// /// The path. - [IgnoreDataMember] + [System.Runtime.Serialization.IgnoreDataMember] public override string Path { get @@ -81,7 +81,7 @@ namespace MediaBrowser.Controller.Entities /// If the item is a folder, it returns the folder itself /// /// The containing folder path. - [IgnoreDataMember] + [System.Runtime.Serialization.IgnoreDataMember] public override string ContainingFolderPath { get @@ -94,7 +94,7 @@ namespace MediaBrowser.Controller.Entities /// Gets a value indicating whether this instance is owned item. /// /// true if this instance is owned item; otherwise, false. - [IgnoreDataMember] + [System.Runtime.Serialization.IgnoreDataMember] public override bool IsOwnedItem { get @@ -107,7 +107,7 @@ namespace MediaBrowser.Controller.Entities /// Gets the root folder. /// /// The root folder. - [IgnoreDataMember] + [System.Runtime.Serialization.IgnoreDataMember] public Folder RootFolder { get @@ -129,7 +129,7 @@ namespace MediaBrowser.Controller.Entities private volatile UserConfiguration _config; private readonly object _configSyncLock = new object(); - [IgnoreDataMember] + [System.Runtime.Serialization.IgnoreDataMember] public UserConfiguration Configuration { get @@ -152,7 +152,7 @@ namespace MediaBrowser.Controller.Entities private volatile UserPolicy _policy; private readonly object _policySyncLock = new object(); - [IgnoreDataMember] + [System.Runtime.Serialization.IgnoreDataMember] public UserPolicy Policy { get @@ -232,7 +232,7 @@ namespace MediaBrowser.Controller.Entities /// Gets the path to the user's configuration directory /// /// The configuration directory path. - [IgnoreDataMember] + [System.Runtime.Serialization.IgnoreDataMember] public string ConfigurationDirectoryPath { get @@ -308,7 +308,7 @@ namespace MediaBrowser.Controller.Entities return Configuration.GroupedFolders.Select(i => new Guid(i)).Contains(id); } - [IgnoreDataMember] + [System.Runtime.Serialization.IgnoreDataMember] public override bool SupportsPeople { get diff --git a/MediaBrowser.Controller/Entities/UserViewBuilder.cs b/MediaBrowser.Controller/Entities/UserViewBuilder.cs index 38397572e3..f813fac715 100644 --- a/MediaBrowser.Controller/Entities/UserViewBuilder.cs +++ b/MediaBrowser.Controller/Entities/UserViewBuilder.cs @@ -17,7 +17,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Configuration; -using MoreLinq; +using MediaBrowser.Model.Extensions; namespace MediaBrowser.Controller.Entities { diff --git a/MediaBrowser.Controller/Library/NameExtensions.cs b/MediaBrowser.Controller/Library/NameExtensions.cs index 72f036b0a5..19d0fc772f 100644 --- a/MediaBrowser.Controller/Library/NameExtensions.cs +++ b/MediaBrowser.Controller/Library/NameExtensions.cs @@ -1,9 +1,9 @@ using MediaBrowser.Common.Extensions; -using MoreLinq; using System; using System.Collections.Generic; using System.Globalization; using System.Linq; +using MediaBrowser.Model.Extensions; namespace MediaBrowser.Controller.Library { diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 36d59d3e44..c14e25030c 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -1,5 +1,5 @@  - + Debug @@ -11,9 +11,10 @@ MediaBrowser.Controller 512 ..\ - v4.5 + v4.6 + true @@ -51,9 +52,6 @@ ..\packages\Interfaces.IO.1.0.0.5\lib\portable-net45+sl4+wp71+win8+wpa81\Interfaces.IO.dll - - ..\packages\morelinq.1.4.0\lib\net35\MoreLinq.dll - ..\packages\Patterns.Logging.1.0.0.2\lib\portable-net45+sl4+wp71+win8+wpa81\Patterns.Logging.dll @@ -168,7 +166,6 @@ - @@ -391,6 +388,7 @@ + diff --git a/MediaBrowser.Common/Threading/PeriodicTimer.cs b/MediaBrowser.Controller/Threading/PeriodicTimer.cs similarity index 97% rename from MediaBrowser.Common/Threading/PeriodicTimer.cs rename to MediaBrowser.Controller/Threading/PeriodicTimer.cs index 75ccada4ef..f9d19b9a10 100644 --- a/MediaBrowser.Common/Threading/PeriodicTimer.cs +++ b/MediaBrowser.Controller/Threading/PeriodicTimer.cs @@ -2,7 +2,7 @@ using System.Threading; using Microsoft.Win32; -namespace MediaBrowser.Common.Threading +namespace MediaBrowser.Controller.Threading { public class PeriodicTimer : IDisposable { diff --git a/MediaBrowser.Controller/packages.config b/MediaBrowser.Controller/packages.config index 84422d9da9..08345d1c58 100644 --- a/MediaBrowser.Controller/packages.config +++ b/MediaBrowser.Controller/packages.config @@ -2,6 +2,5 @@ - \ No newline at end of file diff --git a/MediaBrowser.Dlna/DlnaManager.cs b/MediaBrowser.Dlna/DlnaManager.cs index aae157e7a8..2c134ec99f 100644 --- a/MediaBrowser.Dlna/DlnaManager.cs +++ b/MediaBrowser.Dlna/DlnaManager.cs @@ -277,9 +277,27 @@ namespace MediaBrowser.Dlna { try { - return _fileSystem.GetFiles(path) + var allFiles = _fileSystem.GetFiles(path) + .ToList(); + + var xmlFies = allFiles .Where(i => string.Equals(i.Extension, ".xml", StringComparison.OrdinalIgnoreCase)) - .Select(i => ParseProfileXmlFile(i.FullName, type)) + .ToList(); + + var jsonFiles = allFiles + .Where(i => string.Equals(i.Extension, ".json", StringComparison.OrdinalIgnoreCase)) + .ToList(); + + var jsonFileNames = jsonFiles + .Select(i => Path.GetFileNameWithoutExtension(i.Name)) + .ToList(); + + var parseFiles = jsonFiles.ToList(); + + parseFiles.AddRange(xmlFies.Where(i => !jsonFileNames.Contains(Path.GetFileNameWithoutExtension(i.Name), StringComparer.Ordinal))); + + return parseFiles + .Select(i => ParseProfileFile(i.FullName, type)) .Where(i => i != null) .ToList(); } @@ -289,7 +307,7 @@ namespace MediaBrowser.Dlna } } - private DeviceProfile ParseProfileXmlFile(string path, DeviceProfileType type) + private DeviceProfile ParseProfileFile(string path, DeviceProfileType type) { lock (_profiles) { @@ -301,7 +319,19 @@ namespace MediaBrowser.Dlna try { - var profile = (DeviceProfile)_xmlSerializer.DeserializeFromFile(typeof(DeviceProfile), path); + DeviceProfile profile; + + if (string.Equals(Path.GetExtension(path), ".xml", StringComparison.OrdinalIgnoreCase)) + { + var tempProfile = (MediaBrowser.Dlna.ProfileSerialization.DeviceProfile)_xmlSerializer.DeserializeFromFile(typeof(MediaBrowser.Dlna.ProfileSerialization.DeviceProfile), path); + + var json = _jsonSerializer.SerializeToString(tempProfile); + profile = (DeviceProfile)_jsonSerializer.DeserializeFromString(json); + } + else + { + profile = (DeviceProfile)_jsonSerializer.DeserializeFromFile(typeof(DeviceProfile), path); + } profile.Id = path.ToLower().GetMD5().ToString("N"); profile.ProfileType = type; @@ -312,7 +342,7 @@ namespace MediaBrowser.Dlna } catch (Exception ex) { - _logger.ErrorException("Error parsing profile xml: {0}", ex, path); + _logger.ErrorException("Error parsing profile file: {0}", ex, path); return null; } @@ -328,7 +358,7 @@ namespace MediaBrowser.Dlna var info = GetProfileInfosInternal().First(i => string.Equals(i.Info.Id, id, StringComparison.OrdinalIgnoreCase)); - return ParseProfileXmlFile(info.Path, info.Info.Type); + return ParseProfileFile(info.Path, info.Info.Type); } private IEnumerable GetProfileInfosInternal() @@ -348,21 +378,6 @@ namespace MediaBrowser.Dlna return GetProfileInfosInternal().Select(i => i.Info); } - private IEnumerable GetProfileInfos(string path, DeviceProfileType type) - { - try - { - return _fileSystem.GetFiles(path) - .Where(i => string.Equals(i.Extension, ".xml", StringComparison.OrdinalIgnoreCase)) - .Select(i => GetInternalProfileInfo(i, type)) - .ToList(); - } - catch (DirectoryNotFoundException) - { - return new List(); - } - } - private InternalProfileInfo GetInternalProfileInfo(FileSystemMetadata file, DeviceProfileType type) { return new InternalProfileInfo @@ -381,7 +396,7 @@ namespace MediaBrowser.Dlna private void ExtractSystemProfiles() { var assembly = GetType().Assembly; - var namespaceName = GetType().Namespace + ".Profiles.Xml."; + var namespaceName = GetType().Namespace + ".Profiles.Json."; var systemProfilesPath = SystemProfilesPath; @@ -439,7 +454,7 @@ namespace MediaBrowser.Dlna throw new ArgumentException("Profile is missing Name"); } - var newFilename = _fileSystem.GetValidFilename(profile.Name) + ".xml"; + var newFilename = _fileSystem.GetValidFilename(profile.Name) + ".json"; var path = Path.Combine(UserProfilesPath, newFilename); SaveProfile(profile, path, DeviceProfileType.User); @@ -460,7 +475,7 @@ namespace MediaBrowser.Dlna var current = GetProfileInfosInternal().First(i => string.Equals(i.Info.Id, profile.Id, StringComparison.OrdinalIgnoreCase)); - var newFilename = _fileSystem.GetValidFilename(profile.Name) + ".xml"; + var newFilename = _fileSystem.GetValidFilename(profile.Name) + ".json"; var path = Path.Combine(UserProfilesPath, newFilename); if (!string.Equals(path, current.Path, StringComparison.Ordinal) && @@ -478,7 +493,21 @@ namespace MediaBrowser.Dlna { _profiles[path] = new Tuple(GetInternalProfileInfo(_fileSystem.GetFileInfo(path), type), profile); } - _xmlSerializer.SerializeToFile(profile, path); + SerializeToJson(profile, path); + } + + internal void SerializeToJson(DeviceProfile profile, string path) + { + _jsonSerializer.SerializeToFile(profile, path); + + try + { + File.Delete(Path.ChangeExtension(path, ".xml")); + } + catch + { + + } } /// @@ -532,14 +561,14 @@ namespace MediaBrowser.Dlna class DlnaProfileEntryPoint : IServerEntryPoint { private readonly IApplicationPaths _appPaths; - private readonly IXmlSerializer _xmlSerializer; + private readonly IJsonSerializer _jsonSerializer; private readonly IFileSystem _fileSystem; - public DlnaProfileEntryPoint(IApplicationPaths appPaths, IXmlSerializer xmlSerializer, IFileSystem fileSystem) + public DlnaProfileEntryPoint(IApplicationPaths appPaths, IFileSystem fileSystem, IJsonSerializer jsonSerializer) { _appPaths = appPaths; - _xmlSerializer = xmlSerializer; _fileSystem = fileSystem; + _jsonSerializer = jsonSerializer; } public void Run() @@ -587,9 +616,9 @@ namespace MediaBrowser.Dlna foreach (var item in list) { - var path = Path.Combine(_appPaths.ProgramDataPath, _fileSystem.GetValidFilename(item.Name) + ".xml"); + var path = Path.Combine(_appPaths.ProgramDataPath, _fileSystem.GetValidFilename(item.Name) + ".json"); - _xmlSerializer.SerializeToFile(item, path); + _jsonSerializer.SerializeToFile(item, path); } } diff --git a/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj b/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj index ebffe6c575..8d2aef5d0c 100644 --- a/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj +++ b/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj @@ -24,7 +24,7 @@ DEBUG;TRACE prompt 4 - v4.5.1 + v4.6 none @@ -45,9 +45,6 @@ False ..\packages\CommonIO.1.0.0.9\lib\net45\CommonIO.dll - - ..\packages\morelinq.1.4.0\lib\net35\MoreLinq.dll - ..\packages\Patterns.Logging.1.0.0.2\lib\portable-net45+sl4+wp71+win8+wpa81\Patterns.Logging.dll @@ -96,6 +93,16 @@ + + + + + + + + + + @@ -173,55 +180,16 @@ MediaBrowser.Model - - - - - - - - - - - - - - Designer - - - - - Designer - - - - - - Designer - - - - - - - - - - - - - - @@ -230,31 +198,39 @@ - - - - - - - - - - Designer - - - - - Designer - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - Activity\ActivityLogEntry.cs - - - ApiClient\ApiClientExtensions.cs - - - ApiClient\ApiHelpers.cs - - - ApiClient\ConnectionMode.cs - - - ApiClient\ConnectionOptions.cs - - - ApiClient\ConnectionResult.cs - - - ApiClient\ConnectionState.cs - - - ApiClient\ConnectSignupResponse.cs - - - ApiClient\GeneralCommandEventArgs.cs - - - ApiClient\HttpResponseEventArgs.cs - - - ApiClient\IApiClient.cs - - - ApiClient\IClientWebSocket.cs - - - ApiClient\IConnectionManager.cs - - - ApiClient\IDevice.cs - - - ApiClient\IServerEvents.cs - - - ApiClient\NetworkStatus.cs - - - ApiClient\RemoteLogoutReason.cs - - - ApiClient\ServerCredentials.cs - - - ApiClient\ServerDiscoveryInfo.cs - - - ApiClient\ServerInfo.cs - - - ApiClient\ServerUserInfo.cs - - - ApiClient\SessionUpdatesEventArgs.cs - - - ApiClient\WakeOnLanInfo.cs - - - Branding\BrandingOptions.cs - - - Channels\AllChannelMediaQuery.cs - - - Channels\ChannelFeatures.cs - - - Channels\ChannelFolderType.cs - - - Channels\ChannelInfo.cs - - - Channels\ChannelItemQuery.cs - - - Channels\ChannelItemSortField.cs - - - Channels\ChannelMediaContentType.cs - - - Channels\ChannelMediaType.cs - - - Channels\ChannelQuery.cs - - - Collections\CollectionCreationResult.cs - - - Configuration\AccessSchedule.cs - - - Configuration\BaseApplicationConfiguration.cs - - - Configuration\ChannelOptions.cs - - - Configuration\ChapterOptions.cs - - - Configuration\DlnaOptions.cs - - - Configuration\DynamicDayOfWeek.cs - - - Configuration\EncodingOptions.cs - - - Configuration\FanartOptions.cs - - - Configuration\ImageOption.cs - - - Configuration\ImageSavingConvention.cs - - - Configuration\LibraryOptions.cs - - - Configuration\MetadataConfiguration.cs - - - Configuration\MetadataOptions.cs - - - Configuration\MetadataPlugin.cs - - - Configuration\MetadataPluginSummary.cs - - - Configuration\MetadataPluginType.cs - - - Configuration\PathSubstitution.cs - - - Configuration\PeopleMetadataOptions.cs - - - Configuration\ServerConfiguration.cs - - - Configuration\SubtitlePlaybackMode.cs - - - Configuration\UnratedItem.cs - - - Configuration\UserConfiguration.cs - - - Configuration\XbmcMetadataOptions.cs - - - ApiClient\ConnectAuthenticationExchangeResult.cs - - - Connect\ConnectAuthenticationResult.cs - - - Connect\ConnectAuthorization.cs - - - Connect\ConnectAuthorizationRequest.cs - - - Connect\ConnectPassword.cs - - - Connect\ConnectUser.cs - - - Connect\ConnectUserQuery.cs - - - Connect\ConnectUserServer.cs - - - Connect\PinCreationResult.cs - - - Connect\PinExchangeResult.cs - - - Connect\PinStatusResult.cs - - - Connect\UserLinkType.cs - - - Devices\ContentUploadHistory.cs - - - Devices\DeviceInfo.cs - - - Devices\DeviceOptions.cs - - - Devices\DeviceQuery.cs - - - Devices\DevicesOptions.cs - - - Devices\LocalFileInfo.cs - - - Dlna\AudioOptions.cs - - - Dlna\CodecProfile.cs - - - Dlna\CodecType.cs - - - Dlna\ConditionProcessor.cs - - - Dlna\ContainerProfile.cs - - - Dlna\ContentFeatureBuilder.cs - - - Dlna\DeviceIdentification.cs - - - Dlna\DeviceProfile.cs - - - Dlna\DeviceProfileInfo.cs - - - Dlna\DeviceProfileType.cs - - - Dlna\DirectPlayProfile.cs - - - Dlna\DlnaFlags.cs - - - Dlna\DlnaMaps.cs - - - Dlna\DlnaProfileType.cs - - - Dlna\EncodingContext.cs - - - Dlna\HeaderMatchType.cs - - - Dlna\HttpHeaderInfo.cs - - - Dlna\ITranscoderSupport.cs - - - Dlna\MediaFormatProfile.cs - - - Dlna\MediaFormatProfileResolver.cs - - - Dlna\PlaybackErrorCode.cs - - - Dlna\PlaybackException.cs - - - Dlna\ProfileCondition.cs - - - Dlna\ProfileConditionType.cs - - - Dlna\ProfileConditionValue.cs - - - Dlna\ResolutionConfiguration.cs - - - Dlna\ResolutionNormalizer.cs - - - Dlna\ResolutionOptions.cs - - - Dlna\ResponseProfile.cs - - - Dlna\SearchCriteria.cs - - - Dlna\SearchType.cs - - - Dlna\SortCriteria.cs - - - Dlna\StreamBuilder.cs - - - Dlna\StreamInfo.cs - - - Dlna\StreamInfoSorter.cs - - - Dlna\SubtitleDeliveryMethod.cs - - - Dlna\SubtitleProfile.cs - - - Dlna\SubtitleStreamInfo.cs - - - Dlna\TranscodeSeekInfo.cs - - - Dlna\TranscodingProfile.cs - - - Dlna\VideoOptions.cs - - - Dlna\XmlAttribute.cs - - - Drawing\DrawingUtils.cs - - - Drawing\ImageFormat.cs - - - Drawing\ImageOrientation.cs - - - Drawing\ImageSize.cs - - - Dto\BaseItemDto.cs - - - Dto\BaseItemPerson.cs - - - Dto\ChapterInfoDto.cs - - - Dto\GameSystemSummary.cs - - - Dto\IHasServerId.cs - - - Dto\IHasSyncInfo.cs - - - Dto\IItemDto.cs - - - Dto\ImageByNameInfo.cs - - - Dto\ImageInfo.cs - - - Dto\ImageOptions.cs - - - Dto\ItemCounts.cs - - - Dto\ItemIndex.cs - - - Dto\ItemLayout.cs - - - Dto\MediaSourceInfo.cs - - - Dto\MediaSourceType.cs - - - Dto\MetadataEditorInfo.cs - - - Dto\NameIdPair.cs - - - Dto\NameValuePair.cs - - - Dto\RatingType.cs - - - Dto\RecommendationDto.cs - - - Dto\RecommendationType.cs - - - Dto\StudioDto.cs - - - Dto\SubtitleDownloadOptions.cs - - - Dto\UserDto.cs - - - Dto\UserItemDataDto.cs - - - Entities\BaseItemInfo.cs - - - Entities\ChapterInfo.cs - - - Entities\CollectionType.cs - - - Entities\DisplayPreferences.cs - - - Entities\EmptyRequestResult.cs - - - Entities\ExtraType.cs - - - Entities\IHasProviderIds.cs - - - Entities\ImageType.cs - - - Entities\IsoType.cs - - - Entities\ItemReview.cs - - - Entities\LibraryUpdateInfo.cs - - - Entities\LocationType.cs - - - Entities\MBRegistrationRecord.cs - - - Entities\MediaStream.cs - - - Entities\MediaStreamType.cs - - - Entities\MediaType.cs - - - Entities\MediaUrl.cs - - - Entities\MetadataFields.cs - - - Entities\MetadataProviders.cs - - - Entities\PackageReviewInfo.cs - - - Entities\ParentalRating.cs - - - Entities\PersonType.cs - - - Entities\PluginSecurityInfo.cs - - - Entities\ProviderIdsExtensions.cs - - - Entities\ScrollDirection.cs - - - Entities\SeriesStatus.cs - - - Entities\SortOrder.cs - - - Entities\TrailerType.cs - - - Entities\UserDataSaveReason.cs - - - Entities\Video3DFormat.cs - - - Entities\VideoType.cs - - - Entities\VirtualFolderInfo.cs - - - Events\GenericEventArgs.cs - - - Extensions\BoolHelper.cs - - - Extensions\DoubleHelper.cs - - - Extensions\FloatHelper.cs - - - Extensions\IntHelper.cs - - - Extensions\ListHelper.cs - - - Extensions\StringHelper.cs - - - FileOrganization\AutoOrganizeOptions.cs - - - FileOrganization\EpisodeFileOrganizationRequest.cs - - - FileOrganization\FileOrganizationResult.cs - - - FileOrganization\FileOrganizationResultQuery.cs - - - FileOrganization\FileOrganizerType.cs - - - FileOrganization\FileSortingStatus.cs - - - FileOrganization\SmartMatchInfo.cs - - - FileOrganization\TvFileOrganizationOptions.cs - - - Globalization\CountryInfo.cs - - - Globalization\CultureDto.cs - - - Globalization\LocalizatonOption.cs - - - IO\FileSystemEntryInfo.cs - - - IO\FileSystemEntryType.cs - - - IO\IIsoManager.cs - - - IO\IIsoMount.cs - - - IO\IIsoMounter.cs - - - IO\IZipClient.cs - - - Library\PlayAccess.cs - - - LiveTv\BaseTimerInfoDto.cs - - - LiveTv\ChannelInfoDto.cs - - - LiveTv\ChannelType.cs - - - LiveTv\DayPattern.cs - - - LiveTv\GuideInfo.cs - - - LiveTv\LiveTvChannelQuery.cs - - - LiveTv\LiveTvInfo.cs - - - LiveTv\LiveTvOptions.cs - - - LiveTv\LiveTvServiceInfo.cs - - - LiveTv\LiveTvServiceStatus.cs - - - LiveTv\LiveTvTunerInfoDto.cs - - - LiveTv\LiveTvTunerStatus.cs - - - LiveTv\ProgramAudio.cs - - - LiveTv\ProgramQuery.cs - - - LiveTv\RecommendedProgramQuery.cs - - - LiveTv\RecordingGroupQuery.cs - - - LiveTv\RecordingQuery.cs - - - LiveTv\RecordingStatus.cs - - - LiveTv\SeriesTimerInfoDto.cs - - - LiveTv\SeriesTimerQuery.cs - - - LiveTv\TimerInfoDto.cs - - - LiveTv\TimerQuery.cs - - - Logging\ILogger.cs - - - Logging\ILogManager.cs - - - Logging\LogSeverity.cs - - - Logging\NullLogger.cs - - - MediaInfo\AudioCodec.cs - - - MediaInfo\BlurayDiscInfo.cs - - - MediaInfo\Container.cs - - - MediaInfo\IBlurayExaminer.cs - - - MediaInfo\LiveStreamRequest.cs - - - MediaInfo\LiveStreamResponse.cs - - - MediaInfo\MediaInfo.cs - - - MediaInfo\MediaProtocol.cs - - - MediaInfo\PlaybackInfoRequest.cs - - - MediaInfo\PlaybackInfoResponse.cs - - - MediaInfo\SubtitleFormat.cs - - - MediaInfo\SubtitleTrackEvent.cs - - - MediaInfo\SubtitleTrackInfo.cs - - - MediaInfo\TransportStreamTimestamp.cs - - - MediaInfo\VideoCodec.cs - - - Net\EndPointInfo.cs - - - Net\HttpException.cs - - - Net\HttpResponse.cs - - - Net\MimeTypes.cs - - - Net\NetworkShare.cs - - - Net\NetworkShareType.cs - - - Net\WebSocketMessage.cs - - - Net\WebSocketMessageType.cs - - - Net\WebSocketState.cs - - - News\NewsItem.cs - - - News\NewsQuery.cs - - - Notifications\Notification.cs - - - Notifications\NotificationLevel.cs - - - Notifications\NotificationOption.cs - - - Notifications\NotificationOptions.cs - - - Notifications\NotificationQuery.cs - - - Notifications\NotificationRequest.cs - - - Notifications\NotificationResult.cs - - - Notifications\NotificationServiceInfo.cs - - - Notifications\NotificationsSummary.cs - - - Notifications\NotificationType.cs - - - Notifications\NotificationTypeInfo.cs - - - Notifications\SendToUserType.cs - - - Playlists\PlaylistCreationRequest.cs - - - Playlists\PlaylistCreationResult.cs - - - Playlists\PlaylistItemQuery.cs - - - Plugins\BasePluginConfiguration.cs - - - Plugins\PluginInfo.cs - - - Providers\ExternalIdInfo.cs - - - Providers\ExternalUrl.cs - - - Providers\ImageProviderInfo.cs - - - Providers\RemoteImageInfo.cs - - - Providers\RemoteImageQuery.cs - - - Providers\RemoteImageResult.cs - - - Providers\RemoteSearchResult.cs - - - Providers\RemoteSubtitleInfo.cs - - - Providers\SubtitleOptions.cs - - - Providers\SubtitleProviderInfo.cs - - - Querying\AllThemeMediaResult.cs - - - Querying\ArtistsQuery.cs - - - Querying\EpisodeQuery.cs - - - Querying\ItemCountsQuery.cs - - - Querying\ItemFields.cs - - - Querying\ItemFilter.cs - - - Querying\ItemQuery.cs - - - Querying\ItemsByNameQuery.cs - - - Querying\ItemSortBy.cs - - - Querying\ItemsResult.cs - - - Querying\LatestItemsQuery.cs - - - Querying\MovieRecommendationQuery.cs - - - Querying\NextUpQuery.cs - - - Querying\PersonsQuery.cs - - - Querying\QueryFilters.cs - - - Querying\QueryResult.cs - - - Querying\SeasonQuery.cs - - - Querying\SessionQuery.cs - - - Querying\SimilarItemsQuery.cs - - - Querying\ThemeMediaResult.cs - - - Querying\UpcomingEpisodesQuery.cs - - - Querying\UserQuery.cs - - - Registration\RegistrationInfo.cs - - - Search\SearchHint.cs - - - Search\SearchHintResult.cs - - - Search\SearchQuery.cs - - - Serialization\IJsonSerializer.cs - - - Serialization\IXmlSerializer.cs - - - Session\BrowseRequest.cs - - - Session\ClientCapabilities.cs - - - Session\GeneralCommand.cs - - - Session\GeneralCommandType.cs - - - Session\MessageCommand.cs - - - Session\PlaybackProgressInfo.cs - - - Session\PlaybackStartInfo.cs - - - Session\PlaybackStopInfo.cs - - - Session\PlayCommand.cs - - - Session\PlayerStateInfo.cs - - - Session\PlayMethod.cs - - - Session\PlayRequest.cs - - - Session\PlaystateCommand.cs - - - Session\PlaystateRequest.cs - - - Session\SessionInfoDto.cs - - - Session\SessionUserInfo.cs - - - Session\TranscodingInfo.cs - - - Session\UserDataChangeInfo.cs - - - Social\SocialShareInfo.cs - - - Sync\CompleteSyncJobInfo.cs - - - Sync\DeviceFileInfo.cs - - - Sync\ItemFIleInfo.cs - - - Sync\ItemFileType.cs - - - Sync\LocalItem.cs - - - Sync\LocalItemInfo.cs - - - Sync\LocalItemQuery.cs - - - Sync\SyncCategory.cs - - - Sync\SyncDataRequest.cs - - - Sync\SyncDataResponse.cs - - - Sync\SyncDialogOptions.cs - - - Sync\SyncedItem.cs - - - Sync\SyncJob.cs - - - Sync\SyncJobCreationResult.cs - - - Sync\SyncJobItem.cs - - - SyncJobItemQuery.cs - - - Sync\SyncJobItemStatus.cs - - - Sync\SyncJobQuery.cs - - - Sync\SyncJobRequest.cs - - - Sync\SyncJobStatus.cs - - - Sync\SyncOptions.cs - - - Sync\SyncParameter.cs - - - Sync\SyncProfileOption.cs - - - Sync\SyncQualityOption.cs - - - Sync\SyncTarget.cs - - - System\Architecture.cs - - - System\LogFile.cs - - - System\PublicSystemInfo.cs - - - System\SystemInfo.cs - - - Tasks\SystemEvent.cs - - - Tasks\TaskCompletionStatus.cs - - - Tasks\TaskInfo.cs - - - Tasks\TaskResult.cs - - - Tasks\TaskState.cs - - - Tasks\TaskTriggerInfo.cs - - - Updates\CheckForUpdateResult.cs - - - Updates\InstallationInfo.cs - - - Updates\PackageInfo.cs - - - Updates\PackageTargetSystem.cs - - - Updates\PackageVersionClass.cs - - - Updates\PackageVersionInfo.cs - - - Users\AuthenticationResult.cs - - - Users\ForgotPasswordAction.cs - - - Users\ForgotPasswordResult.cs - - - Users\PinRedeemResult.cs - - - Users\UserAction.cs - - - Users\UserActionType.cs - - - Users\UserPolicy.cs - - - Properties\SharedVersion.cs - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - - - - - - - \ No newline at end of file diff --git a/MediaBrowser.Model.Portable/Properties/AssemblyInfo.cs b/MediaBrowser.Model.Portable/Properties/AssemblyInfo.cs deleted file mode 100644 index a24dd014e4..0000000000 --- a/MediaBrowser.Model.Portable/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Resources; -using System.Reflection; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("MediaBrowser.Model.Portable")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("MediaBrowser.Model.Portable")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: NeutralResourcesLanguage("en")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// \ No newline at end of file diff --git a/MediaBrowser.Model.Portable/app.config b/MediaBrowser.Model.Portable/app.config deleted file mode 100644 index 3c73782929..0000000000 --- a/MediaBrowser.Model.Portable/app.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj b/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj deleted file mode 100644 index bf3aae1bfd..0000000000 --- a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj +++ /dev/null @@ -1,1178 +0,0 @@ - - - - - Debug - AnyCPU - {657B5410-7C3B-4806-9753-D254102CE537} - Library - Properties - MediaBrowser.Model - MediaBrowser.Model - v3.5 - 512 - - ..\ - ..\packages\Fody.1.17.0.0 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - none - true - bin\Release\ - TRACE - prompt - 4 - - - true - - - MediaBrowser.Model.snk - - - Always - - - - - - - - - - - - - Activity\ActivityLogEntry.cs - - - ApiClient\ApiHelpers.cs - - - ApiClient\ConnectionMode.cs - - - ApiClient\ConnectionOptions.cs - - - ApiClient\ConnectionState.cs - - - ApiClient\ConnectSignupResponse.cs - - - ApiClient\GeneralCommandEventArgs.cs - - - ApiClient\HttpResponseEventArgs.cs - - - ApiClient\IServerEvents.cs - - - ApiClient\NetworkStatus.cs - - - ApiClient\RemoteLogoutReason.cs - - - ApiClient\ServerCredentials.cs - - - ApiClient\ServerDiscoveryInfo.cs - - - ApiClient\ServerInfo.cs - - - ApiClient\ServerUserInfo.cs - - - ApiClient\SessionUpdatesEventArgs.cs - - - ApiClient\WakeOnLanInfo.cs - - - Branding\BrandingOptions.cs - - - Channels\AllChannelMediaQuery.cs - - - Channels\ChannelFeatures.cs - - - Channels\ChannelFolderType.cs - - - Channels\ChannelInfo.cs - - - Channels\ChannelItemQuery.cs - - - Channels\ChannelItemSortField.cs - - - Channels\ChannelMediaContentType.cs - - - Channels\ChannelMediaType.cs - - - Channels\ChannelQuery.cs - - - Collections\CollectionCreationResult.cs - - - Configuration\AccessSchedule.cs - - - Configuration\BaseApplicationConfiguration.cs - - - Configuration\ChannelOptions.cs - - - Configuration\ChapterOptions.cs - - - Configuration\DlnaOptions.cs - - - Configuration\DynamicDayOfWeek.cs - - - Configuration\EncodingOptions.cs - - - Configuration\FanartOptions.cs - - - Configuration\ImageOption.cs - - - Configuration\ImageSavingConvention.cs - - - Configuration\LibraryOptions.cs - - - Configuration\MetadataConfiguration.cs - - - Configuration\MetadataOptions.cs - - - Configuration\MetadataPlugin.cs - - - Configuration\MetadataPluginSummary.cs - - - Configuration\MetadataPluginType.cs - - - Configuration\PathSubstitution.cs - - - Configuration\PeopleMetadataOptions.cs - - - Configuration\ServerConfiguration.cs - - - Configuration\SubtitlePlaybackMode.cs - - - Configuration\UnratedItem.cs - - - Configuration\UserConfiguration.cs - - - Configuration\XbmcMetadataOptions.cs - - - Connect\ConnectAuthenticationExchangeResult.cs - - - Connect\ConnectAuthenticationResult.cs - - - Connect\ConnectAuthorization.cs - - - Connect\ConnectAuthorizationRequest.cs - - - Connect\ConnectPassword.cs - - - Connect\ConnectUser.cs - - - Connect\ConnectUserQuery.cs - - - Connect\ConnectUserServer.cs - - - Connect\PinCreationResult.cs - - - Connect\PinExchangeResult.cs - - - Connect\PinStatusResult.cs - - - Connect\UserLinkType.cs - - - Devices\ContentUploadHistory.cs - - - Devices\DeviceInfo.cs - - - Devices\DeviceOptions.cs - - - Devices\DeviceQuery.cs - - - Devices\DevicesOptions.cs - - - Devices\LocalFileInfo.cs - - - Dlna\AudioOptions.cs - - - Dlna\CodecProfile.cs - - - Dlna\CodecType.cs - - - Dlna\ConditionProcessor.cs - - - Dlna\ContainerProfile.cs - - - Dlna\ContentFeatureBuilder.cs - - - Dlna\DeviceIdentification.cs - - - Dlna\DeviceProfile.cs - - - Dlna\DeviceProfileInfo.cs - - - Dlna\DeviceProfileType.cs - - - Dlna\DirectPlayProfile.cs - - - Dlna\DlnaFlags.cs - - - Dlna\DlnaMaps.cs - - - Dlna\DlnaProfileType.cs - - - Dlna\EncodingContext.cs - - - Dlna\HeaderMatchType.cs - - - Dlna\HttpHeaderInfo.cs - - - Dlna\ITranscoderSupport.cs - - - Dlna\MediaFormatProfile.cs - - - Dlna\MediaFormatProfileResolver.cs - - - Dlna\PlaybackErrorCode.cs - - - Dlna\PlaybackException.cs - - - Dlna\ProfileCondition.cs - - - Dlna\ProfileConditionType.cs - - - Dlna\ProfileConditionValue.cs - - - Dlna\ResolutionConfiguration.cs - - - Dlna\ResolutionNormalizer.cs - - - Dlna\ResolutionOptions.cs - - - Dlna\ResponseProfile.cs - - - Dlna\SearchCriteria.cs - - - Dlna\SearchType.cs - - - Dlna\SortCriteria.cs - - - Dlna\StreamBuilder.cs - - - Dlna\StreamInfo.cs - - - Dlna\StreamInfoSorter.cs - - - Dlna\SubtitleDeliveryMethod.cs - - - Dlna\SubtitleProfile.cs - - - Dlna\SubtitleStreamInfo.cs - - - Dlna\TranscodeSeekInfo.cs - - - Dlna\TranscodingProfile.cs - - - Dlna\VideoOptions.cs - - - Dlna\XmlAttribute.cs - - - Drawing\DrawingUtils.cs - - - Drawing\ImageFormat.cs - - - Drawing\ImageOrientation.cs - - - Drawing\ImageSize.cs - - - Dto\BaseItemDto.cs - - - Dto\BaseItemPerson.cs - - - Dto\ChapterInfoDto.cs - - - Dto\GameSystemSummary.cs - - - Dto\IHasServerId.cs - - - Dto\IHasSyncInfo.cs - - - Dto\IItemDto.cs - - - Dto\ImageByNameInfo.cs - - - Dto\ImageInfo.cs - - - Dto\ImageOptions.cs - - - Dto\ItemCounts.cs - - - Dto\ItemIndex.cs - - - Dto\ItemLayout.cs - - - Dto\MediaSourceInfo.cs - - - Dto\MediaSourceType.cs - - - Dto\MetadataEditorInfo.cs - - - Dto\NameIdPair.cs - - - Dto\NameValuePair.cs - - - Dto\RatingType.cs - - - Dto\RecommendationDto.cs - - - Dto\RecommendationType.cs - - - Dto\StudioDto.cs - - - Dto\SubtitleDownloadOptions.cs - - - Dto\UserDto.cs - - - Dto\UserItemDataDto.cs - - - Entities\BaseItemInfo.cs - - - Entities\ChapterInfo.cs - - - Entities\CollectionType.cs - - - Entities\DisplayPreferences.cs - - - Entities\EmptyRequestResult.cs - - - Entities\ExtraType.cs - - - Entities\IHasProviderIds.cs - - - Entities\ImageType.cs - - - Entities\IsoType.cs - - - Entities\ItemReview.cs - - - Entities\LibraryUpdateInfo.cs - - - Entities\LocationType.cs - - - Entities\MBRegistrationRecord.cs - - - Entities\MediaStream.cs - - - Entities\MediaStreamType.cs - - - Entities\MediaType.cs - - - Entities\MediaUrl.cs - - - Entities\MetadataFields.cs - - - Entities\MetadataProviders.cs - - - Entities\PackageReviewInfo.cs - - - Entities\ParentalRating.cs - - - Entities\PersonType.cs - - - Entities\PluginSecurityInfo.cs - - - Entities\ProviderIdsExtensions.cs - - - Entities\ScrollDirection.cs - - - Entities\SeriesStatus.cs - - - Entities\SortOrder.cs - - - Entities\TrailerType.cs - - - Entities\UserDataSaveReason.cs - - - Entities\Video3DFormat.cs - - - Entities\VideoType.cs - - - Entities\VirtualFolderInfo.cs - - - Events\GenericEventArgs.cs - - - Extensions\BoolHelper.cs - - - Extensions\DoubleHelper.cs - - - Extensions\FloatHelper.cs - - - Extensions\IntHelper.cs - - - Extensions\ListHelper.cs - - - Extensions\StringHelper.cs - - - FileOrganization\AutoOrganizeOptions.cs - - - FileOrganization\EpisodeFileOrganizationRequest.cs - - - FileOrganization\FileOrganizationResult.cs - - - FileOrganization\FileOrganizationResultQuery.cs - - - FileOrganization\FileOrganizerType.cs - - - FileOrganization\FileSortingStatus.cs - - - FileOrganization\SmartMatchInfo.cs - - - FileOrganization\TvFileOrganizationOptions.cs - - - Globalization\CountryInfo.cs - - - Globalization\CultureDto.cs - - - Globalization\LocalizatonOption.cs - - - IO\FileSystemEntryInfo.cs - - - IO\FileSystemEntryType.cs - - - IO\IIsoMount.cs - - - Library\PlayAccess.cs - - - LiveTv\BaseTimerInfoDto.cs - - - LiveTv\ChannelInfoDto.cs - - - LiveTv\ChannelType.cs - - - LiveTv\DayPattern.cs - - - LiveTv\GuideInfo.cs - - - LiveTv\LiveTvChannelQuery.cs - - - LiveTv\LiveTvInfo.cs - - - LiveTv\LiveTvOptions.cs - - - LiveTv\LiveTvServiceInfo.cs - - - LiveTv\LiveTvServiceStatus.cs - - - LiveTv\LiveTvTunerInfoDto.cs - - - LiveTv\LiveTvTunerStatus.cs - - - LiveTv\ProgramAudio.cs - - - LiveTv\ProgramQuery.cs - - - LiveTv\RecommendedProgramQuery.cs - - - LiveTv\RecordingGroupQuery.cs - - - LiveTv\RecordingQuery.cs - - - LiveTv\RecordingStatus.cs - - - LiveTv\SeriesTimerInfoDto.cs - - - LiveTv\SeriesTimerQuery.cs - - - LiveTv\TimerInfoDto.cs - - - LiveTv\TimerQuery.cs - - - Logging\ILogger.cs - - - Logging\ILogManager.cs - - - Logging\LogSeverity.cs - - - Logging\NullLogger.cs - - - MediaInfo\AudioCodec.cs - - - MediaInfo\BlurayDiscInfo.cs - - - MediaInfo\Container.cs - - - MediaInfo\IBlurayExaminer.cs - - - MediaInfo\LiveStreamRequest.cs - - - MediaInfo\LiveStreamResponse.cs - - - MediaInfo\MediaInfo.cs - - - MediaInfo\MediaProtocol.cs - - - MediaInfo\PlaybackInfoRequest.cs - - - MediaInfo\PlaybackInfoResponse.cs - - - MediaInfo\SubtitleFormat.cs - - - MediaInfo\SubtitleTrackEvent.cs - - - MediaInfo\SubtitleTrackInfo.cs - - - MediaInfo\TransportStreamTimestamp.cs - - - MediaInfo\VideoCodec.cs - - - Net\EndPointInfo.cs - - - Net\HttpException.cs - - - Net\HttpResponse.cs - - - Net\MimeTypes.cs - - - Net\NetworkShare.cs - - - Net\NetworkShareType.cs - - - Net\WebSocketMessage.cs - - - Net\WebSocketMessageType.cs - - - Net\WebSocketState.cs - - - News\NewsItem.cs - - - News\NewsQuery.cs - - - Notifications\Notification.cs - - - Notifications\NotificationLevel.cs - - - Notifications\NotificationOption.cs - - - Notifications\NotificationOptions.cs - - - Notifications\NotificationQuery.cs - - - Notifications\NotificationRequest.cs - - - Notifications\NotificationResult.cs - - - Notifications\NotificationServiceInfo.cs - - - Notifications\NotificationsSummary.cs - - - Notifications\NotificationType.cs - - - Notifications\NotificationTypeInfo.cs - - - Notifications\SendToUserType.cs - - - Playlists\PlaylistCreationRequest.cs - - - Playlists\PlaylistCreationResult.cs - - - Playlists\PlaylistItemQuery.cs - - - Plugins\BasePluginConfiguration.cs - - - Plugins\PluginInfo.cs - - - Providers\ExternalIdInfo.cs - - - Providers\ExternalUrl.cs - - - Providers\ImageProviderInfo.cs - - - Providers\RemoteImageInfo.cs - - - Providers\RemoteImageQuery.cs - - - Providers\RemoteImageResult.cs - - - Providers\RemoteSearchResult.cs - - - Providers\RemoteSubtitleInfo.cs - - - Providers\SubtitleOptions.cs - - - Providers\SubtitleProviderInfo.cs - - - Querying\AllThemeMediaResult.cs - - - Querying\ArtistsQuery.cs - - - Querying\EpisodeQuery.cs - - - Querying\ItemCountsQuery.cs - - - Querying\ItemFields.cs - - - Querying\ItemFilter.cs - - - Querying\ItemQuery.cs - - - Querying\ItemsByNameQuery.cs - - - Querying\ItemSortBy.cs - - - Querying\ItemsResult.cs - - - Querying\LatestItemsQuery.cs - - - Querying\MovieRecommendationQuery.cs - - - Querying\NextUpQuery.cs - - - Querying\PersonsQuery.cs - - - Querying\QueryFilters.cs - - - Querying\QueryResult.cs - - - Querying\SeasonQuery.cs - - - Querying\SessionQuery.cs - - - Querying\SimilarItemsQuery.cs - - - Querying\ThemeMediaResult.cs - - - Querying\UpcomingEpisodesQuery.cs - - - Querying\UserQuery.cs - - - Registration\RegistrationInfo.cs - - - Search\SearchHint.cs - - - Search\SearchHintResult.cs - - - Search\SearchQuery.cs - - - Serialization\IJsonSerializer.cs - - - Serialization\IXmlSerializer.cs - - - Session\BrowseRequest.cs - - - Session\ClientCapabilities.cs - - - Session\GeneralCommand.cs - - - Session\GeneralCommandType.cs - - - Session\MessageCommand.cs - - - Session\PlaybackProgressInfo.cs - - - Session\PlaybackStartInfo.cs - - - Session\PlaybackStopInfo.cs - - - Session\PlayCommand.cs - - - Session\PlayerStateInfo.cs - - - Session\PlayMethod.cs - - - Session\PlayRequest.cs - - - Session\PlaystateCommand.cs - - - Session\PlaystateRequest.cs - - - Session\SessionInfoDto.cs - - - Session\SessionUserInfo.cs - - - Session\TranscodingInfo.cs - - - Session\UserDataChangeInfo.cs - - - Social\SocialShareInfo.cs - - - Sync\CompleteSyncJobInfo.cs - - - Sync\DeviceFileInfo.cs - - - Sync\ItemFIleInfo.cs - - - Sync\ItemFileType.cs - - - Sync\LocalItem.cs - - - Sync\LocalItemInfo.cs - - - Sync\LocalItemQuery.cs - - - Sync\SyncCategory.cs - - - Sync\SyncDataRequest.cs - - - Sync\SyncDataResponse.cs - - - Sync\SyncDialogOptions.cs - - - Sync\SyncedItem.cs - - - Sync\SyncJob.cs - - - Sync\SyncJobCreationResult.cs - - - Sync\SyncJobItem.cs - - - Sync\SyncJobItemQuery.cs - - - Sync\SyncJobItemStatus.cs - - - Sync\SyncJobQuery.cs - - - Sync\SyncJobRequest.cs - - - Sync\SyncJobStatus.cs - - - Sync\SyncOptions.cs - - - Sync\SyncParameter.cs - - - Sync\SyncProfileOption.cs - - - Sync\SyncQualityOption.cs - - - Sync\SyncTarget.cs - - - System\Architecture.cs - - - System\LogFile.cs - - - System\PublicSystemInfo.cs - - - System\SystemInfo.cs - - - Tasks\SystemEvent.cs - - - Tasks\TaskCompletionStatus.cs - - - Tasks\TaskInfo.cs - - - Tasks\TaskResult.cs - - - Tasks\TaskState.cs - - - Tasks\TaskTriggerInfo.cs - - - Updates\CheckForUpdateResult.cs - - - Updates\InstallationInfo.cs - - - Updates\PackageInfo.cs - - - Updates\PackageTargetSystem.cs - - - Updates\PackageVersionClass.cs - - - Updates\PackageVersionInfo.cs - - - Users\AuthenticationResult.cs - - - Users\ForgotPasswordAction.cs - - - Users\ForgotPasswordResult.cs - - - Users\PinRedeemResult.cs - - - Users\UserAction.cs - - - Users\UserActionType.cs - - - Users\UserPolicy.cs - - - Properties\SharedVersion.cs - - - - - - - - - - - - - \ No newline at end of file diff --git a/MediaBrowser.Model.net35/MediaBrowser.Model.snk b/MediaBrowser.Model.net35/MediaBrowser.Model.snk deleted file mode 100644 index f8188c78e3d19a4676224851542fa0f707e07059..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50097T>PsY_BGRtT;pcVM!Sa7m5NRHIlebhX zy#`>d*~-@N!M(b$aD(<)G9o9q$5k9!)E>Vn!9CGl4jL`nqf;93BLJ!{YHS3Wy&p4=k8xm#v&dEBGK~LnDoGMg?Dgk?*JJN zzF@hg6!hyb@%J=WFz@>`(t3j`4Awtf&gpR6_57(cGI)P%W@H`bCr zuI%)PhI|q631jc(Z)CXg`+lHWY&OIE$S=S&aAGhvT*U2A^<%Q5mB!b>$}_1|bLXtb zdvHX2I?PY!EZzJf+#IdSKYQVRHRmgA5n{rqay2?WEuVqUX7!fH @@ -14,10 +13,10 @@ namespace MediaBrowser.Model.Dlna /// The name. public string Name { get; set; } - [XmlIgnore] + [IgnoreDataMember] public string Id { get; set; } - [XmlIgnore] + [IgnoreDataMember] public DeviceProfileType ProfileType { get; set; } /// diff --git a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs index 183299425e..3847a36712 100644 --- a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs +++ b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs @@ -1,20 +1,15 @@ using System.Collections.Generic; -using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna { public class DirectPlayProfile { - [XmlAttribute("container")] public string Container { get; set; } - [XmlAttribute("audioCodec")] public string AudioCodec { get; set; } - [XmlAttribute("videoCodec")] public string VideoCodec { get; set; } - [XmlAttribute("type")] public DlnaProfileType Type { get; set; } public List GetContainers() diff --git a/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs b/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs index 926963ef67..517757281c 100644 --- a/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs +++ b/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs @@ -4,13 +4,10 @@ namespace MediaBrowser.Model.Dlna { public class HttpHeaderInfo { - [XmlAttribute("name")] public string Name { get; set; } - [XmlAttribute("value")] public string Value { get; set; } - [XmlAttribute("match")] public HeaderMatchType Match { get; set; } } } \ No newline at end of file diff --git a/MediaBrowser.Model/Dlna/ProfileCondition.cs b/MediaBrowser.Model/Dlna/ProfileCondition.cs index 9234a27136..587c628ff2 100644 --- a/MediaBrowser.Model/Dlna/ProfileCondition.cs +++ b/MediaBrowser.Model/Dlna/ProfileCondition.cs @@ -4,16 +4,12 @@ namespace MediaBrowser.Model.Dlna { public class ProfileCondition { - [XmlAttribute("condition")] public ProfileConditionType Condition { get; set; } - [XmlAttribute("property")] public ProfileConditionValue Property { get; set; } - [XmlAttribute("value")] public string Value { get; set; } - [XmlAttribute("isRequired")] public bool IsRequired { get; set; } public ProfileCondition() diff --git a/MediaBrowser.Model/Dlna/ResponseProfile.cs b/MediaBrowser.Model/Dlna/ResponseProfile.cs index c1735f3b7c..15d76df824 100644 --- a/MediaBrowser.Model/Dlna/ResponseProfile.cs +++ b/MediaBrowser.Model/Dlna/ResponseProfile.cs @@ -5,22 +5,16 @@ namespace MediaBrowser.Model.Dlna { public class ResponseProfile { - [XmlAttribute("container")] public string Container { get; set; } - [XmlAttribute("audioCodec")] public string AudioCodec { get; set; } - [XmlAttribute("videoCodec")] public string VideoCodec { get; set; } - [XmlAttribute("type")] public DlnaProfileType Type { get; set; } - [XmlAttribute("orgPn")] public string OrgPn { get; set; } - [XmlAttribute("mimeType")] public string MimeType { get; set; } public ProfileCondition[] Conditions { get; set; } diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index 18e46b84c2..a3e447d04a 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -6,6 +6,7 @@ using MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.Session; using System; using System.Collections.Generic; +using System.Globalization; namespace MediaBrowser.Model.Dlna { @@ -483,7 +484,7 @@ namespace MediaBrowser.Model.Dlna if (!string.IsNullOrEmpty(transcodingProfile.MaxAudioChannels)) { int transcodingMaxAudioChannels; - if (IntHelper.TryParseCultureInvariant(transcodingProfile.MaxAudioChannels, out transcodingMaxAudioChannels)) + if (int.TryParse(transcodingProfile.MaxAudioChannels, NumberStyles.Any, CultureInfo.InvariantCulture, out transcodingMaxAudioChannels)) { playlistItem.TranscodingMaxAudioChannels = transcodingMaxAudioChannels; } @@ -1039,7 +1040,7 @@ namespace MediaBrowser.Model.Dlna case ProfileConditionValue.AudioBitrate: { int num; - if (IntHelper.TryParseCultureInvariant(value, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { item.AudioBitrate = num; } @@ -1048,7 +1049,7 @@ namespace MediaBrowser.Model.Dlna case ProfileConditionValue.AudioChannels: { int num; - if (IntHelper.TryParseCultureInvariant(value, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { item.MaxAudioChannels = num; } @@ -1069,7 +1070,7 @@ namespace MediaBrowser.Model.Dlna case ProfileConditionValue.RefFrames: { int num; - if (IntHelper.TryParseCultureInvariant(value, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { item.MaxRefFrames = num; } @@ -1078,7 +1079,7 @@ namespace MediaBrowser.Model.Dlna case ProfileConditionValue.VideoBitDepth: { int num; - if (IntHelper.TryParseCultureInvariant(value, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { item.MaxVideoBitDepth = num; } @@ -1092,7 +1093,7 @@ namespace MediaBrowser.Model.Dlna case ProfileConditionValue.Height: { int num; - if (IntHelper.TryParseCultureInvariant(value, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { item.MaxHeight = num; } @@ -1101,7 +1102,7 @@ namespace MediaBrowser.Model.Dlna case ProfileConditionValue.VideoBitrate: { int num; - if (IntHelper.TryParseCultureInvariant(value, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { item.VideoBitrate = num; } @@ -1119,7 +1120,7 @@ namespace MediaBrowser.Model.Dlna case ProfileConditionValue.VideoLevel: { int num; - if (IntHelper.TryParseCultureInvariant(value, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { item.VideoLevel = num; } @@ -1128,7 +1129,7 @@ namespace MediaBrowser.Model.Dlna case ProfileConditionValue.Width: { int num; - if (IntHelper.TryParseCultureInvariant(value, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { item.MaxWidth = num; } diff --git a/MediaBrowser.Model/Dlna/SubtitleProfile.cs b/MediaBrowser.Model/Dlna/SubtitleProfile.cs index 0723de222b..ea7e0bda8d 100644 --- a/MediaBrowser.Model/Dlna/SubtitleProfile.cs +++ b/MediaBrowser.Model/Dlna/SubtitleProfile.cs @@ -6,16 +6,12 @@ namespace MediaBrowser.Model.Dlna { public class SubtitleProfile { - [XmlAttribute("format")] public string Format { get; set; } - [XmlAttribute("method")] public SubtitleDeliveryMethod Method { get; set; } - [XmlAttribute("didlMode")] public string DidlMode { get; set; } - [XmlAttribute("language")] public string Language { get; set; } public List GetLanguages() diff --git a/MediaBrowser.Model/Dlna/TranscodingProfile.cs b/MediaBrowser.Model/Dlna/TranscodingProfile.cs index eeab996780..15127dcbad 100644 --- a/MediaBrowser.Model/Dlna/TranscodingProfile.cs +++ b/MediaBrowser.Model/Dlna/TranscodingProfile.cs @@ -5,43 +5,30 @@ namespace MediaBrowser.Model.Dlna { public class TranscodingProfile { - [XmlAttribute("container")] public string Container { get; set; } - [XmlAttribute("type")] public DlnaProfileType Type { get; set; } - [XmlAttribute("videoCodec")] public string VideoCodec { get; set; } - [XmlAttribute("audioCodec")] public string AudioCodec { get; set; } - [XmlAttribute("protocol")] public string Protocol { get; set; } - [XmlAttribute("estimateContentLength")] public bool EstimateContentLength { get; set; } - [XmlAttribute("enableMpegtsM2TsMode")] public bool EnableMpegtsM2TsMode { get; set; } - [XmlAttribute("transcodeSeekInfo")] public TranscodeSeekInfo TranscodeSeekInfo { get; set; } - [XmlAttribute("copyTimestamps")] public bool CopyTimestamps { get; set; } - [XmlAttribute("context")] public EncodingContext Context { get; set; } - [XmlAttribute("enableSubtitlesInManifest")] public bool EnableSubtitlesInManifest { get; set; } - [XmlAttribute("enableSplittingOnNonKeyFrames")] public bool EnableSplittingOnNonKeyFrames { get; set; } - [XmlAttribute("maxAudioChannels")] public string MaxAudioChannels { get; set; } public List GetAudioCodecs() diff --git a/MediaBrowser.Model/Dlna/XmlAttribute.cs b/MediaBrowser.Model/Dlna/XmlAttribute.cs index e8e13ba0de..661ccf4b61 100644 --- a/MediaBrowser.Model/Dlna/XmlAttribute.cs +++ b/MediaBrowser.Model/Dlna/XmlAttribute.cs @@ -4,10 +4,8 @@ namespace MediaBrowser.Model.Dlna { public class XmlAttribute { - [XmlAttribute("name")] public string Name { get; set; } - [XmlAttribute("value")] public string Value { get; set; } } } \ No newline at end of file diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index 9267222adf..8a3396e272 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -8,7 +8,7 @@ using MediaBrowser.Model.Sync; using System; using System.Collections.Generic; using System.Diagnostics; -using System.Runtime.Serialization; +using MediaBrowser.Model.Serialization; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/Dto/BaseItemPerson.cs b/MediaBrowser.Model/Dto/BaseItemPerson.cs index 7052f1b82c..e73872cb76 100644 --- a/MediaBrowser.Model/Dto/BaseItemPerson.cs +++ b/MediaBrowser.Model/Dto/BaseItemPerson.cs @@ -1,5 +1,5 @@ using System.Diagnostics; -using System.Runtime.Serialization; +using MediaBrowser.Model.Serialization; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/Dto/ChapterInfoDto.cs b/MediaBrowser.Model/Dto/ChapterInfoDto.cs index a71d979900..51e0a545af 100644 --- a/MediaBrowser.Model/Dto/ChapterInfoDto.cs +++ b/MediaBrowser.Model/Dto/ChapterInfoDto.cs @@ -1,5 +1,5 @@ using System.Diagnostics; -using System.Runtime.Serialization; +using MediaBrowser.Model.Serialization; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/Dto/MediaSourceInfo.cs b/MediaBrowser.Model/Dto/MediaSourceInfo.cs index 0b047f9e8f..814368d32f 100644 --- a/MediaBrowser.Model/Dto/MediaSourceInfo.cs +++ b/MediaBrowser.Model/Dto/MediaSourceInfo.cs @@ -3,7 +3,7 @@ using MediaBrowser.Model.Entities; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.MediaInfo; using System.Collections.Generic; -using System.Runtime.Serialization; +using MediaBrowser.Model.Serialization; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/Dto/StudioDto.cs b/MediaBrowser.Model/Dto/StudioDto.cs index a0027cc4e2..13623fb1a9 100644 --- a/MediaBrowser.Model/Dto/StudioDto.cs +++ b/MediaBrowser.Model/Dto/StudioDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel; using System.Diagnostics; -using System.Runtime.Serialization; +using MediaBrowser.Model.Serialization; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/Dto/UserDto.cs b/MediaBrowser.Model/Dto/UserDto.cs index 94e4f95a3f..f9e3f7718c 100644 --- a/MediaBrowser.Model/Dto/UserDto.cs +++ b/MediaBrowser.Model/Dto/UserDto.cs @@ -3,7 +3,7 @@ using MediaBrowser.Model.Connect; using MediaBrowser.Model.Users; using System; using System.Diagnostics; -using System.Runtime.Serialization; +using MediaBrowser.Model.Serialization; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/Entities/BaseItemInfo.cs b/MediaBrowser.Model/Entities/BaseItemInfo.cs index 88af18289c..af9091a78b 100644 --- a/MediaBrowser.Model/Entities/BaseItemInfo.cs +++ b/MediaBrowser.Model/Entities/BaseItemInfo.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Runtime.Serialization; +using MediaBrowser.Model.Serialization; namespace MediaBrowser.Model.Entities { diff --git a/MediaBrowser.Model/Extensions/IntHelper.cs b/MediaBrowser.Model/Extensions/IntHelper.cs deleted file mode 100644 index 6c5f26080a..0000000000 --- a/MediaBrowser.Model/Extensions/IntHelper.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Globalization; - -namespace MediaBrowser.Model.Extensions -{ - /// - /// Isolating these helpers allow this entire project to be easily converted to Java - /// - public static class IntHelper - { - /// - /// Tries the parse culture invariant. - /// - /// The s. - /// The result. - /// true if XXXX, false otherwise. - public static bool TryParseCultureInvariant(string s, out int result) - { - return int.TryParse(s, NumberStyles.Any, CultureInfo.InvariantCulture, out result); - } - } -} diff --git a/MediaBrowser.Model/Extensions/LinqExtensions.cs b/MediaBrowser.Model/Extensions/LinqExtensions.cs new file mode 100644 index 0000000000..6b2bdb4c77 --- /dev/null +++ b/MediaBrowser.Model/Extensions/LinqExtensions.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; + +namespace MediaBrowser.Model.Extensions +{ + // MoreLINQ - Extensions to LINQ to Objects + // Copyright (c) 2008 Jonathan Skeet. All rights reserved. + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + public static class LinqExtensions + { + /// + /// Returns all distinct elements of the given source, where "distinctness" + /// is determined via a projection and the default equality comparer for the projected type. + /// + /// + /// This operator uses deferred execution and streams the results, although + /// a set of already-seen keys is retained. If a key is seen multiple times, + /// only the first element with that key is returned. + /// + /// Type of the source sequence + /// Type of the projected element + /// Source sequence + /// Projection for determining "distinctness" + /// A sequence consisting of distinct elements from the source sequence, + /// comparing them by the specified key projection. + + public static IEnumerable DistinctBy(this IEnumerable source, + Func keySelector) + { + return source.DistinctBy(keySelector, null); + } + + /// + /// Returns all distinct elements of the given source, where "distinctness" + /// is determined via a projection and the specified comparer for the projected type. + /// + /// + /// This operator uses deferred execution and streams the results, although + /// a set of already-seen keys is retained. If a key is seen multiple times, + /// only the first element with that key is returned. + /// + /// Type of the source sequence + /// Type of the projected element + /// Source sequence + /// Projection for determining "distinctness" + /// The equality comparer to use to determine whether or not keys are equal. + /// If null, the default equality comparer for TSource is used. + /// A sequence consisting of distinct elements from the source sequence, + /// comparing them by the specified key projection. + + public static IEnumerable DistinctBy(this IEnumerable source, + Func keySelector, IEqualityComparer comparer) + { + if (source == null) throw new ArgumentNullException("source"); + if (keySelector == null) throw new ArgumentNullException("keySelector"); + return DistinctByImpl(source, keySelector, comparer); + } + + private static IEnumerable DistinctByImpl(IEnumerable source, + Func keySelector, IEqualityComparer comparer) + { + var knownKeys = new HashSet(comparer); + foreach (var element in source) + { + if (knownKeys.Add(keySelector(element))) + { + yield return element; + } + } + } + } +} diff --git a/MediaBrowser.Controller/Health/IHealthMonitor.cs b/MediaBrowser.Model/Health/IHealthMonitor.cs similarity index 86% rename from MediaBrowser.Controller/Health/IHealthMonitor.cs rename to MediaBrowser.Model/Health/IHealthMonitor.cs index b8ad98fc14..a4f95c1bcc 100644 --- a/MediaBrowser.Controller/Health/IHealthMonitor.cs +++ b/MediaBrowser.Model/Health/IHealthMonitor.cs @@ -3,7 +3,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.Notifications; -namespace MediaBrowser.Controller.Health +namespace MediaBrowser.Model.Health { public interface IHealthMonitor { diff --git a/MediaBrowser.Model/LiveTv/ChannelInfoDto.cs b/MediaBrowser.Model/LiveTv/ChannelInfoDto.cs index 8991aad866..a8ea864944 100644 --- a/MediaBrowser.Model/LiveTv/ChannelInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/ChannelInfoDto.cs @@ -3,7 +3,7 @@ using MediaBrowser.Model.Entities; using MediaBrowser.Model.Library; using System.Collections.Generic; using System.Diagnostics; -using System.Runtime.Serialization; +using MediaBrowser.Model.Serialization; namespace MediaBrowser.Model.LiveTv { diff --git a/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs b/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs index 997b090ff6..3880012874 100644 --- a/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Runtime.Serialization; +using MediaBrowser.Model.Serialization; namespace MediaBrowser.Model.LiveTv { diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index d898618219..6c9197c164 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -1,7 +1,8 @@  - + + 11.0 Debug AnyCPU {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B} @@ -9,12 +10,11 @@ Properties MediaBrowser.Model MediaBrowser.Model + en-US 512 - ..\ + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Profile7 v4.5 - - - 60e95275 true @@ -24,7 +24,6 @@ DEBUG;TRACE prompt 4 - AnyCPU pdbonly @@ -34,21 +33,10 @@ prompt 4 - - pdbonly - true - bin\Release Mono\ - TRACE - prompt - 4 - - - Always - - - - - + + + + Properties\SharedVersion.cs @@ -115,8 +103,15 @@ + + + + + + + @@ -124,7 +119,10 @@ + + + @@ -132,7 +130,9 @@ + + @@ -154,7 +154,6 @@ - @@ -172,36 +171,27 @@ - - - - - - - - - @@ -226,7 +216,6 @@ - @@ -316,6 +305,7 @@ + @@ -434,20 +424,7 @@ - - - - - - - - - - - - - - + - + \ No newline at end of file