diff options
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | CONTRIBUTORS.md | 13 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Channels/ChannelManager.cs | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/IO/SharpCifs/Smb/SmbFile.cs | 20 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs | 106 | ||||
| -rw-r--r-- | MediaBrowser.Common/Extensions/BaseExtensions.cs | 20 |
6 files changed, 13 insertions, 152 deletions
diff --git a/.gitignore b/.gitignore index ff9e52259..9bbfd9b74 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ !* +.directory + ################# ## Eclipse ################# diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 3a2c229d1..e6892313c 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -8,15 +8,16 @@ - [flemse](https://github.com/flemse) - [bfayers](https://github.com/bfayers) - [Bond_009](https://github.com/Bond-009) + - [sparky8251](https://github.com/sparky8251) # Emby Contributors - - [LukePulverenti](https://github.com/LukePulverenti) - - [ebr11](https://github.com/ebr11) - - [lalmanzar](https://github.com/lalmanzar) - - [schneifu](https://github.com/schneifu) - - [Mark2xv](https://github.com/Mark2xv) - - [ScottRapsey](https://github.com/ScottRapsey) + - [LukePulverenti](https://github.com/LukePulverenti) + - [ebr11](https://github.com/ebr11) + - [lalmanzar](https://github.com/lalmanzar) + - [schneifu](https://github.com/schneifu) + - [Mark2xv](https://github.com/Mark2xv) + - [ScottRapsey](https://github.com/ScottRapsey) - [skynet600](https://github.com/skynet600) - [Cheesegeezer](https://githum.com/Cheesegeezer) - [Radeon](https://github.com/radeonorama) diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs index 00da46f30..c2160d338 100644 --- a/Emby.Server.Implementations/Channels/ChannelManager.cs +++ b/Emby.Server.Implementations/Channels/ChannelManager.cs @@ -901,8 +901,8 @@ namespace Emby.Server.Implementations.Channels private T GetItemById<T>(string idString, string channelName, out bool isNew) where T : BaseItem, new() { - var id = GetIdToHash(idString, channelName).GetMBId(typeof(T)); - + var id = _libraryManager.GetNewItemId(GetIdToHash(idString, channelName), typeof(T)); + T item = null; try diff --git a/Emby.Server.Implementations/IO/SharpCifs/Smb/SmbFile.cs b/Emby.Server.Implementations/IO/SharpCifs/Smb/SmbFile.cs index 151ec35c4..7fd9f0d84 100644 --- a/Emby.Server.Implementations/IO/SharpCifs/Smb/SmbFile.cs +++ b/Emby.Server.Implementations/IO/SharpCifs/Smb/SmbFile.cs @@ -3381,26 +3381,6 @@ namespace SharpCifs.Smb } /// <summary> - /// Returns a - /// <see cref="System.Uri">System.Uri</see> - /// for this <code>SmbFile</code>. The - /// <code>URL</code> may be used as any other <code>URL</code> might to - /// access an SMB resource. Currently only retrieving data and information - /// is supported (i.e. no <tt>doOutput</tt>). - /// </summary> - /// <returns> - /// A new <code> - /// <see cref="System.Uri">System.Uri</see> - /// </code> for this <code>SmbFile</code> - /// </returns> - /// <exception cref="System.UriFormatException">System.UriFormatException</exception> - [Obsolete(@"Use getURL() instead")] - public virtual Uri ToUrl() - { - return Url; - } - - /// <summary> /// Computes a hashCode for this file based on the URL string and IP /// address if the server. /// </summary> diff --git a/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs b/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs index 6d7785b90..8d0fb7997 100644 --- a/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs +++ b/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs @@ -189,7 +189,7 @@ namespace System.Net internal #endif - IPNetwork(BigInteger ipaddress, AddressFamily family, byte cidr) + IPNetwork(BigInteger ipaddress, AddressFamily family, byte cidr) { int maxCidr = family == Sockets.AddressFamily.InterNetwork ? 32 : 128; @@ -1164,18 +1164,6 @@ namespace System.Net } - [Obsolete("static Contains is deprecated, please use instance Contains.")] - public static bool Contains(IPNetwork network, IPAddress ipaddress) - { - - if (network == null) - { - throw new ArgumentNullException("network"); - } - - return network.Contains(ipaddress); - } - /// <summary> /// return true is network2 is fully contained in network /// </summary> @@ -1201,18 +1189,6 @@ namespace System.Net return contains; } - [Obsolete("static Contains is deprecated, please use instance Contains.")] - public static bool Contains(IPNetwork network, IPNetwork network2) - { - - if (network == null) - { - throw new ArgumentNullException("network"); - } - - return network.Contains(network2); - } - #endregion #region overlap @@ -1245,18 +1221,6 @@ namespace System.Net return overlap; } - [Obsolete("static Overlap is deprecated, please use instance Overlap.")] - public static bool Overlap(IPNetwork network, IPNetwork network2) - { - - if (network == null) - { - throw new ArgumentNullException("network"); - } - - return network.Overlap(network2); - } - #endregion #region ToString @@ -1341,18 +1305,6 @@ namespace System.Net || IPNetwork.IANA_CBLK_RESERVED1.Contains(this); } - [Obsolete("static IsIANAReserved is deprecated, please use instance IsIANAReserved.")] - public static bool IsIANAReserved(IPNetwork ipnetwork) - { - - if (ipnetwork == null) - { - throw new ArgumentNullException("ipnetwork"); - } - - return ipnetwork.IsIANAReserved(); - } - #endregion #region Subnet @@ -1371,16 +1323,6 @@ namespace System.Net return ipnetworkCollection; } - [Obsolete("static Subnet is deprecated, please use instance Subnet.")] - public static IPNetworkCollection Subnet(IPNetwork network, byte cidr) - { - if (network == null) - { - throw new ArgumentNullException("network"); - } - return network.Subnet(cidr); - } - /// <summary> /// Subnet a network into multiple nets of cidr mask /// Subnet 192.168.0.0/24 into cidr 25 gives 192.168.0.0/25, 192.168.0.128/25 @@ -1402,16 +1344,6 @@ namespace System.Net return true; } - [Obsolete("static TrySubnet is deprecated, please use instance TrySubnet.")] - public static bool TrySubnet(IPNetwork network, byte cidr, out IPNetworkCollection ipnetworkCollection) - { - if (network == null) - { - throw new ArgumentNullException("network"); - } - return network.TrySubnet(cidr, out ipnetworkCollection); - } - #if TRAVISCI public #else @@ -1476,12 +1408,6 @@ namespace System.Net return supernet; } - [Obsolete("static Supernet is deprecated, please use instance Supernet.")] - public static IPNetwork Supernet(IPNetwork network, IPNetwork network2) - { - return network.Supernet(network2); - } - /// <summary> /// Try to supernet two consecutive cidr equal subnet into a single one /// 192.168.0.0/24 + 192.168.1.0/24 = 192.168.0.0/23 @@ -1500,16 +1426,6 @@ namespace System.Net return parsed; } - [Obsolete("static TrySupernet is deprecated, please use instance TrySupernet.")] - public static bool TrySupernet(IPNetwork network, IPNetwork network2, out IPNetwork supernet) - { - if (network == null) - { - throw new ArgumentNullException("network"); - } - return network.TrySupernet(network2, out supernet); - } - #if TRAVISCI public #else @@ -1920,18 +1836,6 @@ namespace System.Net return sw.ToString(); } - [Obsolete("static Print is deprecated, please use instance Print.")] - public static string Print(IPNetwork ipnetwork) - { - - if (ipnetwork == null) - { - throw new ArgumentNullException("ipnetwork"); - } - - return ipnetwork.Print(); - } - #endregion #region TryGuessCidr @@ -2018,12 +1922,6 @@ namespace System.Net #region ListIPAddress - [Obsolete("static ListIPAddress is deprecated, please use instance ListIPAddress.")] - public static IPAddressCollection ListIPAddress(IPNetwork ipnetwork) - { - return ipnetwork.ListIPAddress(); - } - public IPAddressCollection ListIPAddress() { return new IPAddressCollection(this); @@ -2167,4 +2065,4 @@ namespace System.Net #endregion } -}
\ No newline at end of file +} diff --git a/MediaBrowser.Common/Extensions/BaseExtensions.cs b/MediaBrowser.Common/Extensions/BaseExtensions.cs index d7f4424fa..520c04244 100644 --- a/MediaBrowser.Common/Extensions/BaseExtensions.cs +++ b/MediaBrowser.Common/Extensions/BaseExtensions.cs @@ -34,25 +34,5 @@ namespace MediaBrowser.Common.Extensions { return CryptographyProvider.GetMD5(str); } - - /// <summary> - /// Gets the MB id. - /// </summary> - /// <param name="str">The STR.</param> - /// <param name="type">The type.</param> - /// <returns>Guid.</returns> - /// <exception cref="System.ArgumentNullException">type</exception> - [Obsolete("Use LibraryManager.GetNewItemId")] - public static Guid GetMBId(this string str, Type type) - { - if (type == null) - { - throw new ArgumentNullException("type"); - } - - var key = type.FullName + str.ToLower(); - - return key.GetMD5(); - } } } |
