The Free Software Media System - Server Backend & API
remove trailing whitespace
hawkenbd169e4fd4f5
diff --git a/BDInfo/Properties/AssemblyInfo.cs b/BDInfo/Properties/AssemblyInfo.csindex aa44da1909..5396452959 100644--- a/BDInfo/Properties/AssemblyInfo.cs+++ b/BDInfo/Properties/AssemblyInfo.cs@@ -3,7 +3,7 @@ using System.Reflection;using System.Runtime.CompilerServices;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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("BDInfo")]@@ -19,11 +19,11 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//-// You can specify all the values or you can default the Build and Revision Numbers+// You can specify all the values or you can default the Build and Revision Numbers// by using the '*' as shown below:// [assembly: AssemblyVersion("1.0.*")][assembly: AssemblyVersion("1.0.1")]\ No newline at end of filediff --git a/BDInfo/TSCodecDTS.cs b/BDInfo/TSCodecDTS.csindex 58eb60fc59..904dcd986c 100644--- a/BDInfo/TSCodecDTS.cs+++ b/BDInfo/TSCodecDTS.cs@@ -148,7 +148,7 @@ namespace BDInfostream.IsVBR = true;stream.IsInitialized = true;break;-+default:stream.IsVBR = false;stream.IsInitialized = true;diff --git a/BDInfo/TSCodecDTSHD.cs b/BDInfo/TSCodecDTSHD.csindex 169a8077f2..3c5ad85cc5 100644--- a/BDInfo/TSCodecDTSHD.cs+++ b/BDInfo/TSCodecDTSHD.cs@@ -22,9 +22,9 @@ namespace BDInfo{public abstract class TSCodecDTSHD{- private static int[] SampleRates = new int[]+ private static int[] SampleRates = new int[]{ 0x1F40, 0x3E80, 0x7D00, 0x0FA00, 0x1F400, 0x5622, 0x0AC44, 0x15888, 0x2B110, 0x56220, 0x2EE0, 0x5DC0, 0x0BB80, 0x17700, 0x2EE00, 0x5DC00 };-+public static void Scan(TSAudioStream stream,TSStreamBuffer buffer,@@ -131,7 +131,7 @@ namespace BDInfoelse{AssetSizes[i] = buffer.ReadBits(16) + 1;- }+ }}for (int i = 0; i < nuNumAssets; i++){@@ -189,7 +189,7 @@ namespace BDInfo}stream.SampleRate = SampleRates[nuMaxSampleRate];stream.BitDepth = nuBitResolution;-+stream.LFE = 0;if ((nuSpkrActivityMask & 0x8) == 0x8){@@ -240,7 +240,7 @@ namespace BDInfostream.IsInitialized = true;}stream.IsInitialized = (stream.BitRate > 0 ? true : false);- }+ }}}}diff --git a/BDInfo/TSCodecMPEG2.cs b/BDInfo/TSCodecMPEG2.csindex 3413a06e92..1d523528e0 100644--- a/BDInfo/TSCodecMPEG2.cs+++ b/BDInfo/TSCodecMPEG2.cs@@ -33,7 +33,7 @@ namespace BDInfoint pictureParse = 0;int sequenceHeaderParse = 0;int extensionParse = 0;- int sequenceExtensionParse = 0;+ int sequenceExtensionParse = 0;for (int i = 0; i < buffer.Length; i++){@@ -189,7 +189,7 @@ namespace BDInfo#if DEBUGif (sequenceExtensionParse == 0){- uint sequenceExtension =+ uint sequenceExtension =((parse & 0x8) >> 3);if (sequenceExtension == 0){diff --git a/BDInfo/TSCodecTrueHD.cs b/BDInfo/TSCodecTrueHD.csindex baf4fa3dfe..6ea78614cf 100644--- a/BDInfo/TSCodecTrueHD.cs+++ b/BDInfo/TSCodecTrueHD.cs@@ -36,7 +36,7 @@ namespace BDInfofor (int i = 0; i < buffer.Length; i++){sync = (sync << 8) + buffer.ReadByte();- if (sync == 0xF8726FBA)+ if (sync == 0xF8726FBA){syncFound = true;break;@@ -63,7 +63,7 @@ namespace BDInfoint ratebits = buffer.ReadBits(4);if (ratebits != 0xF){- stream.SampleRate =+ stream.SampleRate =(((ratebits & 8) > 0 ? 44100 : 48000) << (ratebits & 7));}int temp1 = buffer.ReadBits(8);@@ -149,9 +149,9 @@ namespace BDInfoint peak_bitrate = buffer.ReadBits(15);peak_bitrate = (peak_bitrate * stream.SampleRate) >> 4;- double peak_bitdepth =- (double)peak_bitrate /- (stream.ChannelCount + stream.LFE) /+ double peak_bitdepth =+ (double)peak_bitrate /+ (stream.ChannelCount + stream.LFE) /stream.SampleRate;if (peak_bitdepth > 14){@@ -164,7 +164,7 @@ namespace BDInfo#if DEBUGSystem.Diagnostics.Debug.WriteLine(string.Format(- "{0}\t{1}\t{2:F2}",+ "{0}\t{1}\t{2:F2}",stream.PID, peak_bitrate, peak_bitdepth));#endif/*diff --git a/BDInfo/TSCodecVC1.cs b/BDInfo/TSCodecVC1.csindex 164ef8c47e..ce9eabdb91 100644--- a/BDInfo/TSCodecVC1.cs+++ b/BDInfo/TSCodecVC1.cs@@ -50,18 +50,18 @@ namespace BDInfo{if ((parse & 0x80000000) == 0){- pictureType =+ pictureType =(uint)((parse & 0x78000000) >> 13);}else{- pictureType =+ pictureType =(uint)((parse & 0x3c000000) >> 12);}}else{- pictureType =+ pictureType =(uint)((parse & 0xf0000000) >> 14);}diff --git a/BDInfo/TSPlaylistFile.cs b/BDInfo/TSPlaylistFile.csindex da6fd37cc0..c4e8d62ec3 100644--- a/BDInfo/TSPlaylistFile.cs+++ b/BDInfo/TSPlaylistFile.cs@@ -42,7 +42,7 @@ namespace BDInfopublic List<double> Chapters = new List<double>();- public Dictionary<ushort, TSStream> Streams =+ public Dictionary<ushort, TSStream> Streams =new Dictionary<ushort, TSStream>();public Dictionary<ushort, TSStream> PlaylistStreams =new Dictionary<ushort, TSStream>();@@ -50,19 +50,19 @@ namespace BDInfonew List<TSStreamClip>();public List<Dictionary<ushort, TSStream>> AngleStreams =new List<Dictionary<ushort, TSStream>>();- public List<Dictionary<double, TSStreamClip>> AngleClips =+ public List<Dictionary<double, TSStreamClip>> AngleClips =new List<Dictionary<double, TSStreamClip>>();public int AngleCount = 0;- public List<TSStream> SortedStreams =+ public List<TSStream> SortedStreams =new List<TSStream>();- public List<TSVideoStream> VideoStreams =+ public List<TSVideoStream> VideoStreams =new List<TSVideoStream>();- public List<TSAudioStream> AudioStreams =+ public List<TSAudioStream> AudioStreams =new List<TSAudioStream>();- public List<TSTextStream> TextStreams =+ public List<TSTextStream> TextStreams =new List<TSTextStream>();- public List<TSGraphicsStream> GraphicsStreams =+ public List<TSGraphicsStream> GraphicsStreams =new List<TSGraphicsStream>();public TSPlaylistFile(@@ -388,8 +388,8 @@ namespace BDInfo#if DEBUGDebug.WriteLine(string.Format(- "{0} : {1} -> V:{2} A:{3} PG:{4} IG:{5} 2A:{6} 2V:{7} PIP:{8}",- Name, streamFileName, streamCountVideo, streamCountAudio, streamCountPG, streamCountIG,+ "{0} : {1} -> V:{2} A:{3} PG:{4} IG:{5} 2A:{6} 2V:{7} PIP:{8}",+ Name, streamFileName, streamCountVideo, streamCountAudio, streamCountPG, streamCountIG,streamCountSecondaryAudio, streamCountSecondaryVideo, streamCountPIP));#endif@@ -427,7 +427,7 @@ namespace BDInfo}/** TODO- *+ *for (int i = 0; i < streamCountPIP; i++){TSStream stream = CreatePlaylistStream(data, ref pos);@@ -955,7 +955,7 @@ namespace BDInfo}public int CompareVideoStreams(- TSVideoStream x,+ TSVideoStream x,TSVideoStream y){if (x == null && y == null)@@ -996,7 +996,7 @@ namespace BDInfo}public int CompareAudioStreams(- TSAudioStream x,+ TSAudioStream x,TSAudioStream y){if (x == y)diff --git a/BDInfo/TSStream.cs b/BDInfo/TSStream.csindex 5afb81c5e4..250308b1a8 100644--- a/BDInfo/TSStream.cs+++ b/BDInfo/TSStream.cs@@ -109,7 +109,7 @@ namespace BDInfopublic TSDescriptor Clone(){- TSDescriptor descriptor =+ TSDescriptor descriptor =new TSDescriptor(Name, (byte)Value.Length);Value.CopyTo(descriptor.Value, 0);return descriptor;@@ -153,15 +153,15 @@ namespace BDInfoprivate string _LanguageCode;public string LanguageCode{- get+ get{- return _LanguageCode;+ return _LanguageCode;}- set+ set{_LanguageCode = value;LanguageName = LanguageCodes.GetName(value);- }+ }}public bool IsVideoStream@@ -407,7 +407,7 @@ namespace BDInfo}public abstract TSStream Clone();-+protected void CopyTo(TSStream stream){stream.PID = PID;@@ -435,7 +435,7 @@ namespace BDInfopublic int Width;public int Height;- public bool IsInterlaced;+ public bool IsInterlaced;public int FrameRateEnumerator;public int FrameRateDenominator;public TSAspectRatio AspectRatio;@@ -581,7 +581,7 @@ namespace BDInfostream.FrameRate = _FrameRate;stream.Width = Width;stream.Height = Height;- stream.IsInterlaced = IsInterlaced;+ stream.IsInterlaced = IsInterlaced;stream.FrameRateEnumerator = FrameRateEnumerator;stream.FrameRateDenominator = FrameRateDenominator;stream.AspectRatio = AspectRatio;diff --git a/BDInfo/TSStreamClipFile.cs b/BDInfo/TSStreamClipFile.csindex f2accb88d8..f311dd8390 100644--- a/BDInfo/TSStreamClipFile.cs+++ b/BDInfo/TSStreamClipFile.cs@@ -69,7 +69,7 @@ namespace BDInfobyte[] fileType = new byte[8];Array.Copy(data, 0, fileType, 0, fileType.Length);-+FileType = _textEncoding.GetASCIIEncoding().GetString(fileType, 0, fileType.Length);if (FileType != "HDMV0100" &&FileType != "HDMV0200")@@ -78,7 +78,7 @@ namespace BDInfo"Clip info file {0} has an unknown file type {1}.",FileInfo.Name, FileType));}-#if DEBUG+#if DEBUGDebug.WriteLine(string.Format("\tFileType: {0}", FileType));#endif@@ -110,9 +110,9 @@ namespace BDInfoTSStream stream = null;ushort PID = (ushort)- ((clipData[streamOffset] << 8) ++ ((clipData[streamOffset] << 8) +clipData[streamOffset + 1]);-+streamOffset += 2;TSStreamType streamType = (TSStreamType)@@ -240,7 +240,7 @@ namespace BDInfo}streamOffset += clipData[streamOffset] + 1;- }+ }IsValid = true;}finallydiff --git a/BDInfo/TSStreamFile.cs b/BDInfo/TSStreamFile.csindex cfd402434d..00e6b338e0 100644--- a/BDInfo/TSStreamFile.cs+++ b/BDInfo/TSStreamFile.cs@@ -391,7 +391,7 @@ namespace BDInfo}Dictionary<ushort, TSStream> playlistStreams = playlist.Streams;- if (clip.AngleIndex > 0 &&+ if (clip.AngleIndex > 0 &&clip.AngleIndex < playlist.AngleStreams.Count + 1){playlistStreams = playlist.AngleStreams[clip.AngleIndex - 1];@@ -428,7 +428,7 @@ namespace BDInfoTSStream stream = Streams[PID];stream.PayloadBytes += streamState.WindowBytes;stream.PacketCount += streamState.WindowPackets;-+if (stream.IsVideoStream){TSStreamDiagnostics diag = new TSStreamDiagnostics();@@ -457,7 +457,7 @@ namespace BDInfoint dataSize = 16384;Stream fileStream = null;try- {+ {string fileName;if (BDInfoSettings.EnableSSIF &&InterleavedFile != null)@@ -482,13 +482,13 @@ namespace BDInfoStreamStates.Clear();StreamDiagnostics.Clear();- TSPacketParser parser =+ TSPacketParser parser =new TSPacketParser();-+long fileLength = (uint)fileStream.Length;byte[] buffer = new byte[dataSize];int bufferLength = 0;- while ((bufferLength =+ while ((bufferLength =fileStream.Read(buffer, 0, buffer.Length)) > 0){int offset = 0;@@ -598,8 +598,8 @@ namespace BDInfoparser.StreamState.TransferCount++;bool isFinished = ScanStream(- parser.Stream,- parser.StreamState,+ parser.Stream,+ parser.StreamState,parser.StreamState.StreamBuffer);if (!isFullScan && isFinished)@@ -680,10 +680,10 @@ namespace BDInfofor (int k = 0; k < (parser.PATOffset - 4); k += 4){uint programNumber = (uint)- ((parser.PAT[k] << 8) ++ ((parser.PAT[k] << 8) +parser.PAT[k + 1]);- ushort programPID = (ushort)+ ushort programPID = (ushort)(((parser.PAT[k + 2] & 0x1F) << 8) +parser.PAT[k + 3]);@@ -985,7 +985,7 @@ namespace BDInfoparser.PMTProgramDescriptorLength = buffer[i];parser.PMTProgramDescriptors.Add(new TSDescriptor(- parser.PMTProgramDescriptor,+ parser.PMTProgramDescriptor,parser.PMTProgramDescriptorLength));break;}@@ -998,7 +998,7 @@ namespace BDInfoparser.PMTProgramDescriptors.Count - 1];int valueIndex =- descriptor.Value.Length -+ descriptor.Value.Length -parser.PMTProgramDescriptorLength - 1;descriptor.Value[valueIndex] = buffer[i];@@ -1020,8 +1020,8 @@ namespace BDInfoparser.SyncState = false;}}- else if (parser.Stream != null &&- parser.StreamState != null &&+ else if (parser.Stream != null &&+ parser.StreamState != null &&parser.TransportScramblingControl == 0){TSStream stream = parser.Stream;@@ -1032,7 +1032,7 @@ namespace BDInfoif (streamState.TransferState){- if ((bufferLength - i) >= streamState.PacketLength &&+ if ((bufferLength - i) >= streamState.PacketLength &&streamState.PacketLength > 0){offset = streamState.PacketLength;@@ -1085,7 +1085,7 @@ namespace BDInfo--parser.PacketLength;bool headerFound = false;- if (stream.IsVideoStream &&+ if (stream.IsVideoStream &&streamState.Parse == 0x000001FD){headerFound = true;@@ -1170,18 +1170,18 @@ namespace BDInfo(byte)(streamState.Parse & 0xFF);#endifbreak;-+case 1:- streamState.PESHeaderFlags =+ streamState.PESHeaderFlags =(byte)(streamState.Parse & 0xFF);#if DEBUGstreamState.PESHeader[streamState.PESHeaderIndex++] =(byte)(streamState.Parse & 0xFF);#endifbreak;-+case 0:- streamState.PESHeaderLength =+ streamState.PESHeaderLength =(byte)(streamState.Parse & 0xFF);#if DEBUGstreamState.PESHeader[streamState.PESHeaderIndex++] =@@ -1211,48 +1211,48 @@ namespace BDInfoswitch (streamState.PTSParse){case 4:- streamState.PTSTemp =+ streamState.PTSTemp =((streamState.Parse & 0xE) << 29);#if DEBUG- streamState.PESHeader[streamState.PESHeaderIndex++] =+ streamState.PESHeader[streamState.PESHeaderIndex++] =(byte)(streamState.Parse & 0xff);#endifbreak;-+case 3:- streamState.PTSTemp |=+ streamState.PTSTemp |=((streamState.Parse & 0xFF) << 22);#if DEBUG- streamState.PESHeader[streamState.PESHeaderIndex++] =+ streamState.PESHeader[streamState.PESHeaderIndex++] =(byte)(streamState.Parse & 0xFF);#endifbreak;-+case 2:- streamState.PTSTemp |=+ streamState.PTSTemp |=((streamState.Parse & 0xFE) << 14);#if DEBUG- streamState.PESHeader[streamState.PESHeaderIndex++] =+ streamState.PESHeader[streamState.PESHeaderIndex++] =(byte)(streamState.Parse & 0xFF);#endifbreak;-+case 1:- streamState.PTSTemp |=+ streamState.PTSTemp |=((streamState.Parse & 0xFF) << 7);#if DEBUG- streamState.PESHeader[streamState.PESHeaderIndex++] =+ streamState.PESHeader[streamState.PESHeaderIndex++] =(byte)(streamState.Parse & 0xFF);#endifbreak;-+case 0:- streamState.PTSTemp |=+ streamState.PTSTemp |=((streamState.Parse & 0xFE) >> 1);#if DEBUG- streamState.PESHeader[streamState.PESHeaderIndex++] =+ streamState.PESHeader[streamState.PESHeaderIndex++] =(byte)(streamState.Parse & 0xff);-#endif+#endifstreamState.PTS = streamState.PTSTemp;if (streamState.PTS > streamState.PTSLast)@@ -1260,13 +1260,13 @@ namespace BDInfoif (streamState.PTSLast > 0){streamState.PTSTransfer = (streamState.PTS - streamState.PTSLast);- }+ }streamState.PTSLast = streamState.PTS;}streamState.PTSDiff = streamState.PTS - streamState.DTSPrev;- if (streamState.PTSCount > 0 &&+ if (streamState.PTSCount > 0 &&stream.IsVideoStream){UpdateStreamBitrates(stream.PID, streamState.PTS, streamState.PTSDiff);@@ -1280,7 +1280,7 @@ namespace BDInfo}Length = (double)(parser.PTSLast - parser.PTSFirst) / 90000;}-+streamState.DTSPrev = streamState.PTS;streamState.PTSCount++;if (streamState.PESHeaderLength == 0)@@ -1299,46 +1299,46 @@ namespace BDInfoswitch (streamState.DTSParse){case 9:- streamState.PTSTemp =+ streamState.PTSTemp =((streamState.Parse & 0xE) << 29);#if DEBUG- streamState.PESHeader[streamState.PESHeaderIndex++] =+ streamState.PESHeader[streamState.PESHeaderIndex++] =(byte)(streamState.Parse & 0xFF);#endifbreak;-+case 8:- streamState.PTSTemp |=+ streamState.PTSTemp |=((streamState.Parse & 0xFF) << 22);#if DEBUG- streamState.PESHeader[streamState.PESHeaderIndex++] =+ streamState.PESHeader[streamState.PESHeaderIndex++] =(byte)(streamState.Parse & 0xFF);#endifbreak;-+case 7:- streamState.PTSTemp |=+ streamState.PTSTemp |=((streamState.Parse & 0xFE) << 14);#if DEBUG- streamState.PESHeader[streamState.PESHeaderIndex++] =+ streamState.PESHeader[streamState.PESHeaderIndex++] =(byte)(streamState.Parse & 0xff);#endifbreak;-+case 6:- streamState.PTSTemp |=+ streamState.PTSTemp |=((streamState.Parse & 0xFF) << 7);#if DEBUG- streamState.PESHeader[streamState.PESHeaderIndex++] =+ streamState.PESHeader[streamState.PESHeaderIndex++] =(byte)(streamState.Parse & 0xFF);#endifbreak;-+case 5:- streamState.PTSTemp |=+ streamState.PTSTemp |=((streamState.Parse & 0xFE) >> 1);#if DEBUG- streamState.PESHeader[streamState.PESHeaderIndex++] =+ streamState.PESHeader[streamState.PESHeaderIndex++] =(byte)(streamState.Parse & 0xff);#endifstreamState.PTS = streamState.PTSTemp;@@ -1347,48 +1347,48 @@ namespace BDInfostreamState.PTSLast = streamState.PTS;}break;-+case 4:- streamState.DTSTemp =+ streamState.DTSTemp =((streamState.Parse & 0xE) << 29);#if DEBUG- streamState.PESHeader[streamState.PESHeaderIndex++] =+ streamState.PESHeader[streamState.PESHeaderIndex++] =(byte)(streamState.Parse & 0xff);#endifbreak;-+case 3:- streamState.DTSTemp |=+ streamState.DTSTemp |=((streamState.Parse & 0xFF) << 22);#if DEBUG- streamState.PESHeader[streamState.PESHeaderIndex++] =+ streamState.PESHeader[streamState.PESHeaderIndex++] =(byte)(streamState.Parse & 0xff);#endifbreak;-+case 2:- streamState.DTSTemp |=+ streamState.DTSTemp |=((streamState.Parse & 0xFE) << 14);#if DEBUG- streamState.PESHeader[streamState.PESHeaderIndex++] =+ streamState.PESHeader[streamState.PESHeaderIndex++] =(byte)(streamState.Parse & 0xff);#endifbreak;-+case 1:- streamState.DTSTemp |=+ streamState.DTSTemp |=((streamState.Parse & 0xFF) << 7);#if DEBUG- streamState.PESHeader[streamState.PESHeaderIndex++] =+ streamState.PESHeader[streamState.PESHeaderIndex++] =(byte)(streamState.Parse & 0xFF);#endifbreak;-+case 0:- streamState.DTSTemp |=+ streamState.DTSTemp |=((streamState.Parse & 0xFE) >> 1);#if DEBUG- streamState.PESHeader[streamState.PESHeaderIndex++] =+ streamState.PESHeader[streamState.PESHeaderIndex++] =(byte)(streamState.Parse & 0xff);#endifstreamState.PTSDiff = streamState.DTSTemp - streamState.DTSPrev;@@ -1482,8 +1482,8 @@ namespace BDInfo}private TSStream CreateStream(- ushort streamPID,- byte streamType,+ ushort streamPID,+ byte streamType,List<TSDescriptor> streamDescriptors){TSStream stream = null;@@ -1548,6 +1548,6 @@ namespace BDInfo}return stream;- }+ }}}diff --git a/DvdLib/Ifo/ProgramChain.cs b/DvdLib/Ifo/ProgramChain.csindex 6b4e5fa32f..85dfcea057 100644--- a/DvdLib/Ifo/ProgramChain.cs+++ b/DvdLib/Ifo/ProgramChain.cs@@ -68,7 +68,7 @@ namespace DvdLib.IfoProhibitedUserOperations = (UserOperation)br.ReadUInt32();AudioStreamControl = br.ReadBytes(16);SubpictureStreamControl = br.ReadBytes(128);-+_nextProgramNumber = br.ReadUInt16();_prevProgramNumber = br.ReadUInt16();_goupProgramNumber = br.ReadUInt16();diff --git a/DvdLib/Ifo/Title.cs b/DvdLib/Ifo/Title.csindex 70deb45bfa..6ef83b4fb1 100644--- a/DvdLib/Ifo/Title.cs+++ b/DvdLib/Ifo/Title.cs@@ -20,7 +20,7 @@ namespace DvdLib.Ifopublic ProgramChain EntryProgramChain { get; private set; }public readonly List<ProgramChain> ProgramChains;- public readonly List<Chapter> Chapters;+ public readonly List<Chapter> Chapters;public Title(uint titleNum){diff --git a/DvdLib/Properties/AssemblyInfo.cs b/DvdLib/Properties/AssemblyInfo.csindex cca792684f..08c0ed88c5 100644--- a/DvdLib/Properties/AssemblyInfo.cs+++ b/DvdLib/Properties/AssemblyInfo.cs@@ -3,7 +3,7 @@ using System.Reflection;using System.Runtime.CompilerServices;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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("DvdLib")]@@ -19,11 +19,11 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//-// You can specify all the values or you can default the Build and Revision Numbers+// You can specify all the values or you can default the Build and Revision Numbers// by using the '*' as shown below:// [assembly: AssemblyVersion("1.0.*")][assembly: AssemblyVersion("1.0.1")]\ No newline at end of filediff --git a/Emby.Dlna/Common/Argument.cs b/Emby.Dlna/Common/Argument.csindex 7e61c3d6d5..e6a220a7f4 100644--- a/Emby.Dlna/Common/Argument.cs+++ b/Emby.Dlna/Common/Argument.cs@@ -1,6 +1,6 @@namespace Emby.Dlna.Common-{+{public class Argument{public string Name { get; set; }diff --git a/Emby.Dlna/ConnectionManager/ServiceActionListBuilder.cs b/Emby.Dlna/ConnectionManager/ServiceActionListBuilder.csindex 9b22b77734..a37f81242b 100644--- a/Emby.Dlna/ConnectionManager/ServiceActionListBuilder.cs+++ b/Emby.Dlna/ConnectionManager/ServiceActionListBuilder.cs@@ -77,7 +77,7 @@ namespace Emby.Dlna.ConnectionManagerreturn action;}-+private ServiceAction GetCurrentConnectionInfo(){var action = new ServiceActiondiff --git a/Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs b/Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.csindex facc252146..05de8259ca 100644--- a/Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs+++ b/Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs@@ -8,7 +8,7 @@ namespace Emby.Dlna.ContentDirectory{public string GetXml(){- return new ServiceXmlBuilder().GetXml(new ServiceActionListBuilder().GetActions(),+ return new ServiceXmlBuilder().GetXml(new ServiceActionListBuilder().GetActions(),GetStateVariables());}diff --git a/Emby.Dlna/ContentDirectory/ServiceActionListBuilder.cs b/Emby.Dlna/ContentDirectory/ServiceActionListBuilder.csindex 8e5c07ce2f..26f5b671dc 100644--- a/Emby.Dlna/ContentDirectory/ServiceActionListBuilder.cs+++ b/Emby.Dlna/ContentDirectory/ServiceActionListBuilder.cs@@ -334,7 +334,7 @@ namespace Emby.Dlna.ContentDirectoryreturn action;}-+private ServiceAction GetXSetBookmarkAction(){var action = new ServiceActiondiff --git a/Emby.Dlna/IUpnpService.cs b/Emby.Dlna/IUpnpService.csindex caae87ba36..0a52e9acfc 100644--- a/Emby.Dlna/IUpnpService.cs+++ b/Emby.Dlna/IUpnpService.cs@@ -10,7 +10,7 @@ namespace Emby.Dlna/// <param name="headers">The headers.</param>/// <returns>System.String.</returns>string GetServiceXml(IDictionary<string, string> headers);-+/// <summary>/// Processes the control request./// </summary>diff --git a/Emby.Dlna/Main/DlnaEntryPoint.cs b/Emby.Dlna/Main/DlnaEntryPoint.csindex 6ab0767a5a..eae3f22de4 100644--- a/Emby.Dlna/Main/DlnaEntryPoint.cs+++ b/Emby.Dlna/Main/DlnaEntryPoint.cs@@ -75,11 +75,11 @@ namespace Emby.Dlna.MainIUserDataManager userDataManager,ILocalizationManager localizationManager,IMediaSourceManager mediaSourceManager,- IDeviceDiscovery deviceDiscovery,- IMediaEncoder mediaEncoder,- ISocketFactory socketFactory,- ITimerFactory timerFactory,- IEnvironmentInfo environmentInfo,+ IDeviceDiscovery deviceDiscovery,+ IMediaEncoder mediaEncoder,+ ISocketFactory socketFactory,+ ITimerFactory timerFactory,+ IEnvironmentInfo environmentInfo,INetworkManager networkManager,IUserViewManager userViewManager,IXmlReaderSettingsFactory xmlReaderSettingsFactory,@@ -104,19 +104,19 @@ namespace Emby.Dlna.Main_networkManager = networkManager;_logger = loggerFactory.CreateLogger("Dlna");- ContentDirectory = new ContentDirectory.ContentDirectory(dlnaManager,- userDataManager,- imageProcessor,- libraryManager,- config,- userManager,- _logger,- httpClient,- localizationManager,- mediaSourceManager,+ ContentDirectory = new ContentDirectory.ContentDirectory(dlnaManager,+ userDataManager,+ imageProcessor,+ libraryManager,+ config,+ userManager,+ _logger,+ httpClient,+ localizationManager,+ mediaSourceManager,userViewManager,- mediaEncoder,- xmlReaderSettingsFactory,+ mediaEncoder,+ xmlReaderSettingsFactory,tvSeriesManager);ConnectionManager = new ConnectionManager.ConnectionManager(dlnaManager, config, _logger, httpClient, xmlReaderSettingsFactory);@@ -271,12 +271,12 @@ namespace Emby.Dlna.Mainvar device = new SsdpRootDevice{CacheLifetime = TimeSpan.FromSeconds(1800), //How long SSDP clients can cache this info.- Location = uri, // Must point to the URL that serves your devices UPnP description document.+ Location = uri, // Must point to the URL that serves your devices UPnP description document.FriendlyName = "Jellyfin",Manufacturer = "Jellyfin",ModelName = "Jellyfin Server",Uuid = udn- // This must be a globally unique value that survives reboots etc. Get from storage or embedded hardware etc.+ // This must be a globally unique value that survives reboots etc. Get from storage or embedded hardware etc.};SetProperies(device, fullService);@@ -297,7 +297,7 @@ namespace Emby.Dlna.MainManufacturer = device.Manufacturer,ModelName = device.ModelName,Uuid = udn- // This must be a globally unique value that survives reboots etc. Get from storage or embedded hardware etc.+ // This must be a globally unique value that survives reboots etc. Get from storage or embedded hardware etc.};SetProperies(embeddedDevice, subDevice);diff --git a/Emby.Dlna/PlayTo/Device.cs b/Emby.Dlna/PlayTo/Device.csindex 13bed6b2fd..fdd3045779 100644--- a/Emby.Dlna/PlayTo/Device.cs+++ b/Emby.Dlna/PlayTo/Device.cs@@ -739,7 +739,7 @@ namespace Emby.Dlna.PlayToif (track == null){- //If track is null, some vendors do this, use GetMediaInfo instead+ //If track is null, some vendors do this, use GetMediaInfo insteadreturn new Tuple<bool, uBaseObject>(true, null);}diff --git a/Emby.Dlna/PlayTo/SsdpHttpClient.cs b/Emby.Dlna/PlayTo/SsdpHttpClient.csindex bfd163bf16..818744ba89 100644--- a/Emby.Dlna/PlayTo/SsdpHttpClient.cs+++ b/Emby.Dlna/PlayTo/SsdpHttpClient.cs@@ -25,10 +25,10 @@ namespace Emby.Dlna.PlayTo_config = config;}- public async Task<XDocument> SendCommandAsync(string baseUrl,- DeviceService service,- string command,- string postData,+ public async Task<XDocument> SendCommandAsync(string baseUrl,+ DeviceService service,+ string command,+ string postData,bool logRequest = true,string header = null){@@ -62,12 +62,12 @@ namespace Emby.Dlna.PlayTo}private readonly CultureInfo _usCulture = new CultureInfo("en-US");-- public async Task SubscribeAsync(string url,- string ip,- int port,- string localIp,- int eventport,++ public async Task SubscribeAsync(string url,+ string ip,+ int port,+ string localIp,+ int eventport,int timeOut = 3600){var options = new HttpRequestOptions@@ -121,9 +121,9 @@ namespace Emby.Dlna.PlayTo}}- private Task<HttpResponseInfo> PostSoapDataAsync(string url,- string soapAction,- string postData,+ private Task<HttpResponseInfo> PostSoapDataAsync(string url,+ string soapAction,+ string postData,string header,bool logRequest,CancellationToken cancellationToken)diff --git a/Emby.Dlna/PlayTo/TransportCommands.cs b/Emby.Dlna/PlayTo/TransportCommands.csindex 9e055f7921..09a8f07341 100644--- a/Emby.Dlna/PlayTo/TransportCommands.cs+++ b/Emby.Dlna/PlayTo/TransportCommands.cs@@ -171,7 +171,7 @@ namespace Emby.Dlna.PlayToif (state != null){var sendValue = state.AllowedValues.FirstOrDefault(a => string.Equals(a, commandParameter, StringComparison.OrdinalIgnoreCase)) ??- state.AllowedValues.FirstOrDefault() ??+ state.AllowedValues.FirstOrDefault() ??value;return string.Format("<{0} xmlns:dt=\"urn:schemas-microsoft-com:datatypes\" dt:dt=\"{1}\">{2}</{0}>", argument.Name, state.DataType ?? "string", sendValue);diff --git a/Emby.Dlna/PlayTo/uBaseObject.cs b/Emby.Dlna/PlayTo/uBaseObject.csindex 1de46317eb..0107b63c5a 100644--- a/Emby.Dlna/PlayTo/uBaseObject.cs+++ b/Emby.Dlna/PlayTo/uBaseObject.cs@@ -2,7 +2,7 @@namespace Emby.Dlna.PlayTo{- public class uBaseObject+ public class uBaseObject{public string Id { get; set; }diff --git a/Emby.Dlna/PlayTo/uParser.cs b/Emby.Dlna/PlayTo/uParser.csindex 5caf83a9a6..36ebdbf5c4 100644--- a/Emby.Dlna/PlayTo/uParser.cs+++ b/Emby.Dlna/PlayTo/uParser.cs@@ -20,7 +20,7 @@ namespace Emby.Dlna.PlayToif (document == null)return list;-+var item = (from result in document.Descendants("Result") select result).FirstOrDefault();if (item == null)diff --git a/Emby.Dlna/Profiles/SonyBravia2010Profile.cs b/Emby.Dlna/Profiles/SonyBravia2010Profile.csindex 75382067ff..7b452c536c 100644--- a/Emby.Dlna/Profiles/SonyBravia2010Profile.cs+++ b/Emby.Dlna/Profiles/SonyBravia2010Profile.cs@@ -41,7 +41,7 @@ namespace Emby.Dlna.ProfilesEnableSingleAlbumArtLimit = true;EnableAlbumArtInDidl = true;-+TranscodingProfiles = new[]{new TranscodingProfilediff --git a/Emby.Dlna/Properties/AssemblyInfo.cs b/Emby.Dlna/Properties/AssemblyInfo.csindex 6f924f9e96..6ee7177ced 100644--- a/Emby.Dlna/Properties/AssemblyInfo.cs+++ b/Emby.Dlna/Properties/AssemblyInfo.cs@@ -3,7 +3,7 @@ using System.Reflection;using System.Runtime.CompilerServices;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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("Emby.Dlna2")]@@ -19,11 +19,11 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//-// You can specify all the values or you can default the Build and Revision Numbers+// You can specify all the values or you can default the Build and Revision Numbers// by using the '*' as shown below:// [assembly: AssemblyVersion("1.0.*")][assembly: AssemblyVersion("1.0.0.0")]diff --git a/Emby.Dlna/Service/BaseService.cs b/Emby.Dlna/Service/BaseService.csindex 92b81a7acc..10ef12c6c2 100644--- a/Emby.Dlna/Service/BaseService.cs+++ b/Emby.Dlna/Service/BaseService.cs@@ -14,7 +14,7 @@ namespace Emby.Dlna.Serviceprotected BaseService(ILogger logger, IHttpClient httpClient){Logger = logger;- HttpClient = httpClient;+ HttpClient = httpClient;EventManager = new EventManager(Logger, HttpClient);}diff --git a/Emby.Dlna/Service/ControlErrorHandler.cs b/Emby.Dlna/Service/ControlErrorHandler.csindex a3cd77f0fb..431dea9320 100644--- a/Emby.Dlna/Service/ControlErrorHandler.cs+++ b/Emby.Dlna/Service/ControlErrorHandler.cs@@ -10,7 +10,7 @@ namespace Emby.Dlna.Servicepublic class ControlErrorHandler{private const string NS_SOAPENV = "http://schemas.xmlsoap.org/soap/envelope/";-+public ControlResponse GetResponse(Exception ex){var settings = new XmlWriterSettingsdiff --git a/Emby.Dlna/Ssdp/DeviceDiscovery.cs b/Emby.Dlna/Ssdp/DeviceDiscovery.csindex d91f711d2f..e01ff81497 100644--- a/Emby.Dlna/Ssdp/DeviceDiscovery.cs+++ b/Emby.Dlna/Ssdp/DeviceDiscovery.cs@@ -83,8 +83,8 @@ namespace Emby.Dlna.Ssdp{_deviceLocator = new SsdpDeviceLocator(_commsServer, _timerFactory);- // (Optional) Set the filter so we only see notifications for devices we care about- // (can be any search target value i.e device type, uuid value etc - any value that appears in the+ // (Optional) Set the filter so we only see notifications for devices we care about+ // (can be any search target value i.e device type, uuid value etc - any value that appears in the// DiscoverdSsdpDevice.NotificationType property or that is used with the searchTarget parameter of the Search method).//_DeviceLocator.NotificationFilter = "upnp:rootdevice";diff --git a/Emby.Drawing.Skia/Properties/AssemblyInfo.cs b/Emby.Drawing.Skia/Properties/AssemblyInfo.csindex c0dc7c5b4b..b8799f986c 100644--- a/Emby.Drawing.Skia/Properties/AssemblyInfo.cs+++ b/Emby.Drawing.Skia/Properties/AssemblyInfo.cs@@ -3,7 +3,7 @@ using System.Reflection;using System.Runtime.CompilerServices;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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("Emby.Drawing.Skia")]@@ -19,7 +19,7 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//\ No newline at end of filediff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.csindex 6a67be56d1..32f0559c68 100644--- a/Emby.Drawing/ImageProcessor.cs+++ b/Emby.Drawing/ImageProcessor.cs@@ -103,7 +103,7 @@ namespace Emby.Drawing"crw",// Remove until supported- //"nef",+ //"nef","orf","pef","arw",diff --git a/Emby.Drawing/Properties/AssemblyInfo.cs b/Emby.Drawing/Properties/AssemblyInfo.csindex b9e9c2ff77..aa5619f979 100644--- a/Emby.Drawing/Properties/AssemblyInfo.cs+++ b/Emby.Drawing/Properties/AssemblyInfo.cs@@ -1,7 +1,7 @@using System.Reflection;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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("Emby.Drawing")]@@ -13,8 +13,8 @@ using System.Runtime.InteropServices;[assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]-// Setting ComVisible to false makes the types in this assembly not visible-// to COM components. If you need to access a type in this assembly from+// Setting ComVisible to false makes the types in this assembly not visible+// to COM components. If you need to access a type in this assembly from// COM, set the ComVisible attribute to true on that type.[assembly: ComVisible(false)]@@ -24,7 +24,7 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//\ No newline at end of filediff --git a/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs b/Emby.IsoMounting/IsoMounter/LinuxIsoManager.csindex faaed482a0..ea44170718 100644--- a/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs+++ b/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs@@ -315,9 +315,9 @@ namespace IsoMounter);} else {-+throw new ArgumentNullException(nameof(isoPath));-+}try@@ -397,9 +397,9 @@ namespace IsoMounter);} else {-+throw new ArgumentNullException(nameof(mount));-+}if (GetUID() == 0) {@@ -444,7 +444,7 @@ namespace IsoMounter}#endregion-+#region Internal Methodsinternal void OnUnmount(LinuxMount mount)diff --git a/Emby.IsoMounting/IsoMounter/LinuxMount.cs b/Emby.IsoMounting/IsoMounter/LinuxMount.csindex edd26f08d4..da2eb19835 100644--- a/Emby.IsoMounting/IsoMounter/LinuxMount.cs+++ b/Emby.IsoMounting/IsoMounter/LinuxMount.cs@@ -48,7 +48,7 @@ namespace IsoMounterif (disposed) {return;}-+if (disposing) {//diff --git a/Emby.Naming/AudioBook/AudioBookInfo.cs b/Emby.Naming/AudioBook/AudioBookInfo.csindex e039e5359a..d7af63d915 100644--- a/Emby.Naming/AudioBook/AudioBookInfo.cs+++ b/Emby.Naming/AudioBook/AudioBookInfo.cs@@ -29,7 +29,7 @@ namespace Emby.Naming.AudioBook/// </summary>/// <value>The alternate versions.</value>public List<AudioBookFileInfo> AlternateVersions { get; set; }-+public AudioBookInfo(){Files = new List<AudioBookFileInfo>();diff --git a/Emby.Naming/AudioBook/AudioBookResolver.cs b/Emby.Naming/AudioBook/AudioBookResolver.csindex a206ee30bf..53abbedb2e 100644--- a/Emby.Naming/AudioBook/AudioBookResolver.cs+++ b/Emby.Naming/AudioBook/AudioBookResolver.cs@@ -46,7 +46,7 @@ namespace Emby.Naming.AudioBookvar parsingResult = new AudioBookFilePathParser(_options).Parse(path, IsDirectory);-+return new AudioBookFileInfo{Path = path,diff --git a/Emby.Naming/Common/NamingOptions.cs b/Emby.Naming/Common/NamingOptions.csindex 9e65440d08..014f4ebde6 100644--- a/Emby.Naming/Common/NamingOptions.cs+++ b/Emby.Naming/Common/NamingOptions.cs@@ -282,7 +282,7 @@ namespace Emby.Naming.Commonnew EpisodeExpression(@".*(\\|\/)(?<seriesname>((?[][ ._-]*[Ee]([0-9]+))[^\\\/])*)?[Ss](?<seasonnumber>[0-9]+)[][ ._-]*[Ee](?<epnumber>[0-9]+)([^\\/]*)$"){IsNamed = true- },+ },// <!-- foo.ep01, foo.EP_01 -->new EpisodeExpression(@"[\._ -]()[Ee][Pp]_?([0-9]+)([^\\/]*)$"),new EpisodeExpression("([0-9]{4})[\\.-]([0-9]{2})[\\.-]([0-9]{2})", true)diff --git a/Emby.Naming/TV/EpisodeResolver.cs b/Emby.Naming/TV/EpisodeResolver.csindex 2007d13077..cce4e73b80 100644--- a/Emby.Naming/TV/EpisodeResolver.cs+++ b/Emby.Naming/TV/EpisodeResolver.cs@@ -53,7 +53,7 @@ namespace Emby.Naming.TVvar parsingResult = new EpisodePathParser(_options).Parse(path, IsDirectory, isNamed, isOptimistic, supportsAbsoluteNumbers, fillExtendedInfo);-+return new EpisodeInfo{Path = path,diff --git a/Emby.Naming/Video/CleanDateTimeParser.cs b/Emby.Naming/Video/CleanDateTimeParser.csindex 572dd1c600..e2a2d921c2 100644--- a/Emby.Naming/Video/CleanDateTimeParser.cs+++ b/Emby.Naming/Video/CleanDateTimeParser.cs@@ -38,7 +38,7 @@ namespace Emby.Naming.Video}catch (ArgumentException){-+}var result = _options.CleanDateTimeRegexes.Select(i => Clean(name, i))diff --git a/Emby.Naming/Video/StackResolver.cs b/Emby.Naming/Video/StackResolver.csindex 2a71255368..995e95d421 100644--- a/Emby.Naming/Video/StackResolver.cs+++ b/Emby.Naming/Video/StackResolver.cs@@ -126,7 +126,7 @@ namespace Emby.Naming.Video}stack.Files.Add(file2.FullName);}- else+ else{// Sequeloffset = 0;diff --git a/Emby.Naming/Video/StubResolver.cs b/Emby.Naming/Video/StubResolver.csindex 69f1f50fa0..33d6baefd3 100644--- a/Emby.Naming/Video/StubResolver.cs+++ b/Emby.Naming/Video/StubResolver.cs@@ -18,7 +18,7 @@ namespace Emby.Naming.Video{var result = new StubResult();var extension = Path.GetExtension(path) ?? string.Empty;-+if (_options.StubFileExtensions.Contains(extension, StringComparer.OrdinalIgnoreCase)){result.IsStub = true;diff --git a/Emby.Naming/Video/VideoFileInfo.cs b/Emby.Naming/Video/VideoFileInfo.csindex 96839c31ef..3cdc483ff3 100644--- a/Emby.Naming/Video/VideoFileInfo.cs+++ b/Emby.Naming/Video/VideoFileInfo.cs@@ -55,7 +55,7 @@ namespace Emby.Naming.Video/// Gets or sets the type of the stub./// </summary>/// <value>The type of the stub.</value>- public string StubType { get; set; }+ public string StubType { get; set; }/// <summary>/// Gets or sets the type./// </summary>diff --git a/Emby.Naming/Video/VideoInfo.cs b/Emby.Naming/Video/VideoInfo.csindex f4d311b975..033a8ae2d0 100644--- a/Emby.Naming/Video/VideoInfo.cs+++ b/Emby.Naming/Video/VideoInfo.cs@@ -32,7 +32,7 @@ namespace Emby.Naming.Video/// </summary>/// <value>The alternate versions.</value>public List<VideoFileInfo> AlternateVersions { get; set; }-+public VideoInfo(){Files = new List<VideoFileInfo>();diff --git a/Emby.Naming/Video/VideoListResolver.cs b/Emby.Naming/Video/VideoListResolver.csindex 47be28104d..b052c79295 100644--- a/Emby.Naming/Video/VideoListResolver.cs+++ b/Emby.Naming/Video/VideoListResolver.cs@@ -55,9 +55,9 @@ namespace Emby.Naming.Videoinfo.Year = info.Files.First().Year;- var extraBaseNames = new List<string>+ var extraBaseNames = new List<string>{- stack.Name,+ stack.Name,Path.GetFileNameWithoutExtension(stack.Files[0])};diff --git a/Emby.Photos/Properties/AssemblyInfo.cs b/Emby.Photos/Properties/AssemblyInfo.csindex 49ac833457..20e7d952d9 100644--- a/Emby.Photos/Properties/AssemblyInfo.cs+++ b/Emby.Photos/Properties/AssemblyInfo.cs@@ -2,7 +2,7 @@using System.Runtime.CompilerServices;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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("Emby.Photos")]@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;[assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]-// Setting ComVisible to false makes the types in this assembly not visible-// to COM components. If you need to access a type in this assembly from+// Setting ComVisible to false makes the types in this assembly not visible+// to COM components. If you need to access a type in this assembly from// COM, set the ComVisible attribute to true on that type.[assembly: ComVisible(false)]@@ -25,10 +25,10 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//-// You can specify all the values or you can default the Build and Revision Numbers+// You can specify all the values or you can default the Build and Revision Numbers// by using the '*' as shown below:// [assembly: AssemblyVersion("1.0.*")]\ No newline at end of filediff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.csindex fb053f0e4a..ab8a858060 100644--- a/Emby.Server.Implementations/ApplicationHost.cs+++ b/Emby.Server.Implementations/ApplicationHost.cs@@ -1647,25 +1647,25 @@ namespace Emby.Server.Implementations// Gets all plugin assemblies by first reading all bytes of the .dll and calling Assembly.Load against that// This will prevent the .dll file from getting locked, and allow us to replace it when needed- // Include composable parts in the Api assembly+ // Include composable parts in the Api assemblylist.Add(GetAssembly(typeof(ApiEntryPoint)));- // Include composable parts in the Dashboard assembly+ // Include composable parts in the Dashboard assemblylist.Add(GetAssembly(typeof(DashboardService)));- // Include composable parts in the Model assembly+ // Include composable parts in the Model assemblylist.Add(GetAssembly(typeof(SystemInfo)));- // Include composable parts in the Common assembly+ // Include composable parts in the Common assemblylist.Add(GetAssembly(typeof(IApplicationHost)));- // Include composable parts in the Controller assembly+ // Include composable parts in the Controller assemblylist.Add(GetAssembly(typeof(IServerApplicationHost)));- // Include composable parts in the Providers assembly+ // Include composable parts in the Providers assemblylist.Add(GetAssembly(typeof(ProviderUtils)));- // Include composable parts in the Photos assembly+ // Include composable parts in the Photos assemblylist.Add(GetAssembly(typeof(PhotoProvider)));// Emby.Server implementations@@ -1674,16 +1674,16 @@ namespace Emby.Server.Implementations// MediaEncodinglist.Add(GetAssembly(typeof(MediaBrowser.MediaEncoding.Encoder.MediaEncoder)));- // Dlna+ // Dlnalist.Add(GetAssembly(typeof(DlnaEntryPoint)));- // Local metadata+ // Local metadatalist.Add(GetAssembly(typeof(BoxSetXmlSaver)));// Notificationslist.Add(GetAssembly(typeof(NotificationManager)));- // Xbmc+ // Xbmclist.Add(GetAssembly(typeof(ArtistNfoProvider)));list.AddRange(GetAssembliesWithPartsInternal().Select(i => new Tuple<Assembly, string>(i, null)));@@ -2219,7 +2219,7 @@ namespace Emby.Server.Implementations}/// <summary>- /// This returns localhost in the case of no external dns, and the hostname if the+ /// This returns localhost in the case of no external dns, and the hostname if the/// dns is prefixed with a valid Uri prefix./// </summary>/// <param name="externalDns">The external dns prefix to get the hostname of.</param>diff --git a/Emby.Server.Implementations/Browser/BrowserLauncher.cs b/Emby.Server.Implementations/Browser/BrowserLauncher.csindex 007f60a9bb..4c9f442d19 100644--- a/Emby.Server.Implementations/Browser/BrowserLauncher.cs+++ b/Emby.Server.Implementations/Browser/BrowserLauncher.cs@@ -41,7 +41,7 @@ namespace Emby.Server.Implementations.Browser}catch (NotSupportedException){-+}catch (Exception){diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.csindex c2160d3384..3986999775 100644--- a/Emby.Server.Implementations/Channels/ChannelManager.cs+++ b/Emby.Server.Implementations/Channels/ChannelManager.cs@@ -902,7 +902,7 @@ namespace Emby.Server.Implementations.Channelswhere T : BaseItem, new(){var id = _libraryManager.GetNewItemId(GetIdToHash(idString, channelName), typeof(T));-+T item = null;trydiff --git a/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs b/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.csindex ab6acf3c57..3e270dabc8 100644--- a/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs+++ b/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs@@ -70,8 +70,8 @@ namespace Emby.Server.Implementations.Channels/// </summary>public IEnumerable<TaskTriggerInfo> GetDefaultTriggers(){- return new[] {-+ return new[] {+// Every so oftennew TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks}};diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.csindex 0f9770e8f7..f18a0ba088 100644--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs@@ -4038,7 +4038,7 @@ namespace Emby.Server.Implementations.Dataif (query.PersonIds.Length > 0){- // TODO: Should this query with CleanName ?+ // TODO: Should this query with CleanName ?var clauses = new List<string>();var index = 0;@@ -5399,7 +5399,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Typevar itemIdBlob = itemId.ToGuidBlob();- // First delete+ // First deletedeleteAncestorsStatement.Reset();deleteAncestorsStatement.TryBind("@ItemId", itemIdBlob);deleteAncestorsStatement.MoveNext();@@ -5927,7 +5927,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Typevar guidBlob = itemId.ToGuidBlob();- // First delete+ // First deletedb.Execute("delete from ItemValues where ItemId=@Id", guidBlob);InsertItemValues(guidBlob, values, db);diff --git a/Emby.Server.Implementations/Devices/DeviceManager.cs b/Emby.Server.Implementations/Devices/DeviceManager.csindex f5314df6e1..d95222e26c 100644--- a/Emby.Server.Implementations/Devices/DeviceManager.cs+++ b/Emby.Server.Implementations/Devices/DeviceManager.cs@@ -144,7 +144,7 @@ namespace Emby.Server.Implementations.DevicesHasUser = true}).Items;-+// TODO: DeviceQuery doesn't seem to be used from client. Not even Swagger.if (query.SupportsSync.HasValue){diff --git a/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs b/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.csindex bb8ef52f18..bc72228bde 100644--- a/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs+++ b/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs@@ -471,7 +471,7 @@ namespace Emby.Server.Implementations.EntryPointsLibraryUpdateTimer.Dispose();LibraryUpdateTimer = null;}-+_libraryManager.ItemAdded -= libraryManager_ItemAdded;_libraryManager.ItemUpdated -= libraryManager_ItemUpdated;_libraryManager.ItemRemoved -= libraryManager_ItemRemoved;diff --git a/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs b/Emby.Server.Implementations/FFMpeg/FFMpegLoader.csindex 5f043e1275..83e3cb7206 100644--- a/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs+++ b/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs@@ -114,7 +114,7 @@ namespace Emby.Server.Implementations.FFMpeg{var encoderFilename = Path.GetFileName(info.EncoderPath);var probeFilename = Path.GetFileName(info.ProbePath);-+foreach (var directory in _fileSystem.GetDirectoryPaths(rootEncoderPath).ToList()){diff --git a/Emby.Server.Implementations/HttpServer/FileWriter.cs b/Emby.Server.Implementations/HttpServer/FileWriter.csindex 1a875e5334..4b864eea59 100644--- a/Emby.Server.Implementations/HttpServer/FileWriter.cs+++ b/Emby.Server.Implementations/HttpServer/FileWriter.cs@@ -148,7 +148,7 @@ namespace Emby.Server.Implementations.HttpServer}}- private string[] SkipLogExtensions = new string[]+ private string[] SkipLogExtensions = new string[]{".js",".html",diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.csindex 69ca0f85b6..27aa2e9f47 100644--- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs+++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs@@ -103,7 +103,7 @@ namespace Emby.Server.Implementations.HttpServer}/// <summary>- /// Applies the request filters. Returns whether or not the request has been handled+ /// Applies the request filters. Returns whether or not the request has been handled/// and no more processing should be done./// </summary>/// <returns></returns>diff --git a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs b/Emby.Server.Implementations/HttpServer/HttpResultFactory.csindex 73b2afe640..b3244640d0 100644--- a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs+++ b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs@@ -265,7 +265,7 @@ namespace Emby.Server.Implementations.HttpServer}/// <summary>- /// Returns the optimized result for the IRequestContext.+ /// Returns the optimized result for the IRequestContext./// Does not use or store results in any cache./// </summary>/// <param name="request"></param>diff --git a/Emby.Server.Implementations/HttpServer/IHttpListener.cs b/Emby.Server.Implementations/HttpServer/IHttpListener.csindex e21607ebd6..d50d7df6b9 100644--- a/Emby.Server.Implementations/HttpServer/IHttpListener.cs+++ b/Emby.Server.Implementations/HttpServer/IHttpListener.cs@@ -33,7 +33,7 @@ namespace Emby.Server.Implementations.HttpServer/// </summary>/// <value>The web socket connecting.</value>Action<WebSocketConnectingEventArgs> WebSocketConnecting { get; set; }-+/// <summary>/// Starts this instance./// </summary>diff --git a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.csindex c3e2d31708..56e1095f68 100644--- a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs+++ b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs@@ -115,7 +115,7 @@ namespace Emby.Server.Implementations.HttpServer.Security{info.Device = tokenInfo.DeviceName;}-+else if (!string.Equals(info.Device, tokenInfo.DeviceName, StringComparison.OrdinalIgnoreCase)){if (allowTokenInfoUpdate)diff --git a/Emby.Server.Implementations/IO/FileRefresher.cs b/Emby.Server.Implementations/IO/FileRefresher.csindex 34c711324b..3212c41e97 100644--- a/Emby.Server.Implementations/IO/FileRefresher.cs+++ b/Emby.Server.Implementations/IO/FileRefresher.cs@@ -164,7 +164,7 @@ namespace Emby.Server.Implementations.IO}catch (IOException ex){- // For now swallow and log.+ // For now swallow and log.// Research item: If an IOException occurs, the item may be in a disconnected state (media unavailable)// Should we remove it from it's parent?Logger.LogError(ex, "Error refreshing {name}", item.Name);diff --git a/Emby.Server.Implementations/IO/ManagedFileSystem.cs b/Emby.Server.Implementations/IO/ManagedFileSystem.csindex 0f85e0642b..1e89c13704 100644--- a/Emby.Server.Implementations/IO/ManagedFileSystem.cs+++ b/Emby.Server.Implementations/IO/ManagedFileSystem.cs@@ -159,7 +159,7 @@ namespace Emby.Server.Implementations.IOvar firstChar = filePath[0];if (firstChar == '/'){- // For this we don't really know.+ // For this we don't really know.return filePath;}if (firstChar == '\\') //relative pathdiff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.csindex 451f16bef8..3d3ef43b82 100644--- a/Emby.Server.Implementations/Library/LibraryManager.cs+++ b/Emby.Server.Implementations/Library/LibraryManager.cs@@ -818,7 +818,7 @@ namespace Emby.Server.Implementations.Librarypublic BaseItem FindByPath(string path, bool? isFolder){- // If this returns multiple items it could be tricky figuring out which one is correct.+ // If this returns multiple items it could be tricky figuring out which one is correct.// In most cases, the newest one will be and the others obsolete but not yet cleaned upif (string.IsNullOrEmpty(path))@@ -1699,7 +1699,7 @@ namespace Emby.Server.Implementations.Library{try{- // Try to resolve the path into a video+ // Try to resolve the path into a videovideo = ResolvePath(_fileSystem.GetFileSystemInfo(info.Path)) as Video;if (video == null)diff --git a/Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.csindex 8872bd641e..9b030c0b7e 100644--- a/Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs+++ b/Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs@@ -231,7 +231,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio}var firstMedia = resolvedItem.Files.First();-+var libraryItem = new T{Path = firstMedia.Path,diff --git a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.csindex dbfcf41e8b..47d7521291 100644--- a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs+++ b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs@@ -42,7 +42,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio{// Behind special folder resolverreturn ResolverPriority.Second;- }+ }}/// <summary>diff --git a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.csindex 71ccd7da8e..c887cbd40a 100644--- a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs+++ b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs@@ -41,7 +41,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio{// Behind special folder resolverreturn ResolverPriority.Second;- }+ }}/// <summary>diff --git a/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs b/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.csindex 143af40767..b9ac2056fc 100644--- a/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs+++ b/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs@@ -48,7 +48,7 @@ namespace Emby.Server.Implementations.Library.Resolverswhere TVideoType : Video, new(){var namingOptions = ((LibraryManager)LibraryManager).GetNamingOptions();-+// If the path is a file check for a matching extensionsvar parser = new Emby.Naming.Video.VideoResolver(namingOptions);@@ -120,7 +120,7 @@ namespace Emby.Server.Implementations.Library.Resolversif (video != null){- video.Name = parseName ?+ video.Name = parseName ?videoInfo.Name :Path.GetFileName(args.Path);@@ -150,7 +150,7 @@ namespace Emby.Server.Implementations.Library.Resolvers};SetVideoType(video, videoInfo);-+video.Name = parseName ?videoInfo.Name :Path.GetFileNameWithoutExtension(args.Path);@@ -281,7 +281,7 @@ namespace Emby.Server.Implementations.Library.Resolvers{return string.Equals(name, "video_ts.ifo", StringComparison.OrdinalIgnoreCase);}-+/// <summary>/// Determines whether [is blu ray directory] [the specified directory name]./// </summary>diff --git a/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.csindex 7aa4c299ff..d7f80b3f41 100644--- a/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs+++ b/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs@@ -8,14 +8,14 @@ using MediaBrowser.Model.Entities;namespace Emby.Server.Implementations.Library.Resolvers.Books{/// <summary>- ///+ ////// </summary>public class BookResolver : MediaBrowser.Controller.Resolvers.ItemResolver<Book>{private readonly string[] _validExtensions = { ".pdf", ".epub", ".mobi", ".cbr", ".cbz", ".azw3" };/// <summary>- ///+ ////// </summary>/// <param name="args"></param>/// <returns></returns>@@ -48,7 +48,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Books}/// <summary>- ///+ ////// </summary>/// <param name="args"></param>/// <returns></returns>diff --git a/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.csindex 68b6c57ae6..dd383f195d 100644--- a/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs+++ b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs@@ -32,7 +32,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Moviesget{// Give plugins a chance to catch iso's first- // Also since we have to loop through child files looking for videos,+ // Also since we have to loop through child files looking for videos,// see if we can avoid some of that by letting other resolvers claim folders first// Also run after series resolverreturn ResolverPriority.Third;diff --git a/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs b/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.csindex 7d1c4d65a5..4e5ac959ca 100644--- a/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs+++ b/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs@@ -27,7 +27,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV}var season = parent as Season;- // Just in case the user decided to nest episodes.+ // Just in case the user decided to nest episodes.// Not officially supported but in some cases we can handle it.if (season == null){@@ -36,8 +36,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV// If the parent is a Season or Series, then this is an Episode if the VideoResolver returns something// Also handle flat tv folders- if (season != null ||- string.Equals(args.GetCollectionType(), CollectionType.TvShows, StringComparison.OrdinalIgnoreCase) ||+ if (season != null ||+ string.Equals(args.GetCollectionType(), CollectionType.TvShows, StringComparison.OrdinalIgnoreCase) ||args.HasParent<Series>()){var episode = ResolveVideo<Episode>(args, false);diff --git a/Emby.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.csindex aae5751de1..d616e12095 100644--- a/Emby.Server.Implementations/Library/UserViewManager.cs+++ b/Emby.Server.Implementations/Library/UserViewManager.cs@@ -282,7 +282,7 @@ namespace Emby.Server.Implementations.Libraryif (includeItemTypes.Length == 0){- // Handle situations with the grouping setting, e.g. movies showing up in tv, etc.+ // Handle situations with the grouping setting, e.g. movies showing up in tv, etc.// Thanks to mixed content libraries included in the UserViewvar hasCollectionType = parents.OfType<UserView>().ToArray();if (hasCollectionType.Length > 0)diff --git a/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs b/Emby.Server.Implementations/Library/Validators/ArtistsValidator.csindex 1686dc23c1..278c0cc7ad 100644--- a/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs+++ b/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs@@ -94,7 +94,7 @@ namespace Emby.Server.Implementations.Library.Validators{continue;}-+_logger.LogInformation("Deleting dead {2} {0} {1}.", item.Id.ToString("N"), item.Name, item.GetType().Name);_libraryManager.DeleteItem(item, new DeleteOptionsdiff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.csindex 81a47bfea1..ccd6cebca7 100644--- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs@@ -1055,7 +1055,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV{_logger.LogInformation("Streaming Channel " + channelId);- var result = string.IsNullOrEmpty(streamId) ?+ var result = string.IsNullOrEmpty(streamId) ?null :currentLiveStreams.FirstOrDefault(i => string.Equals(i.OriginalStreamId, streamId, StringComparison.OrdinalIgnoreCase));diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.csindex 4ea83b7acd..a6222a4692 100644--- a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs@@ -214,13 +214,13 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTVvar outputParam = string.Empty;- var commandLineArgs = string.Format("-i \"{0}\"{5} {2} -map_metadata -1 -threads 0 {3}{4}{6} -y \"{1}\"",- inputTempFile,- targetFile,- videoArgs,- GetAudioArgs(mediaSource),- subtitleArgs,- durationParam,+ var commandLineArgs = string.Format("-i \"{0}\"{5} {2} -map_metadata -1 -threads 0 {3}{4}{6} -y \"{1}\"",+ inputTempFile,+ targetFile,+ videoArgs,+ GetAudioArgs(mediaSource),+ subtitleArgs,+ durationParam,outputParam);return inputModifier + " " + commandLineArgs;diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.csindex b597a935a2..63e940ac2b 100644--- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs+++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs@@ -1993,7 +1993,7 @@ namespace Emby.Server.Implementations.LiveTvName = program.Name,OfficialRating = program.OfficialRating};- }+ }if (service == null){diff --git a/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs b/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.csindex 225360159b..8e4fcc0991 100644--- a/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs+++ b/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs@@ -48,8 +48,8 @@ namespace Emby.Server.Implementations.LiveTv/// <returns>IEnumerable{BaseTaskTrigger}.</returns>public IEnumerable<TaskTriggerInfo> GetDefaultTriggers(){- return new[] {-+ return new[] {+// Every so oftennew TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks}};diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.csindex be090df0c9..edeafdd932 100644--- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs@@ -275,7 +275,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerunfor (int i = 0; i < model.TunerCount; ++i){var name = String.Format("Tuner {0}", i + 1);- var currentChannel = "none"; /// @todo Get current channel and map back to Station Id+ var currentChannel = "none"; /// @todo Get current channel and map back to Station Idvar isAvailable = await manager.CheckTunerAvailability(ipInfo, i, cancellationToken).ConfigureAwait(false);LiveTvTunerStatus status = isAvailable ? LiveTvTunerStatus.Available : LiveTvTunerStatus.LiveTv;tuners.Add(new LiveTvTunerInfodiff --git a/Emby.Server.Implementations/Localization/TextLocalizer.cs b/Emby.Server.Implementations/Localization/TextLocalizer.csindex 5188a959e3..3ea04265dd 100644--- a/Emby.Server.Implementations/Localization/TextLocalizer.cs+++ b/Emby.Server.Implementations/Localization/TextLocalizer.cs@@ -32,7 +32,7 @@ namespace Emby.Server.Implementations.Localizationcatch (ArgumentException){// will throw if input contains invalid unicode chars- // https://mnaoumov.wordpress.com/2014/06/14/stripping-invalid-characters-from-utf-16-strings/+ // https://mnaoumov.wordpress.com/2014/06/14/stripping-invalid-characters-from-utf-16-strings/text = StripInvalidUnicodeCharacters(text);return Normalize(text, form, false);}diff --git a/Emby.Server.Implementations/Networking/IPNetwork/BigIntegerExt.cs b/Emby.Server.Implementations/Networking/IPNetwork/BigIntegerExt.csindex afb202fa39..4da9c08d0a 100644--- a/Emby.Server.Implementations/Networking/IPNetwork/BigIntegerExt.cs+++ b/Emby.Server.Implementations/Networking/IPNetwork/BigIntegerExt.cs@@ -122,28 +122,28 @@ namespace System.Net}/// <summary>- ///+ ////// Reverse a Positive BigInteger ONLY/// Bitwise ~ operator- ///+ ////// Input : FF FF FF FF/// Width : 4- /// Result : 00 00 00 00- ///- ///+ /// Result : 00 00 00 00+ ///+ ////// Input : 00 00 00 00/// Width : 4- /// Result : FF FF FF FF- ///+ /// Result : FF FF FF FF+ ////// Input : FF FF FF FF/// Width : 8/// Result : FF FF FF FF 00 00 00 00- ///- ///+ ///+ ////// Input : 00 00 00 00/// Width : 8/// Result : FF FF FF FF FF FF FF FF- ///+ ////// </summary>/// <param name="input"></param>/// <param name="width"></param>diff --git a/Emby.Server.Implementations/Properties/AssemblyInfo.cs b/Emby.Server.Implementations/Properties/AssemblyInfo.csindex 28ffcbac64..5987db0eb4 100644--- a/Emby.Server.Implementations/Properties/AssemblyInfo.cs+++ b/Emby.Server.Implementations/Properties/AssemblyInfo.cs@@ -3,7 +3,7 @@ using System.Reflection;using System.Runtime.CompilerServices;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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("Emby.Server.Implementations")]@@ -19,10 +19,10 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//-// You can specify all the values or you can default the Build and Revision Numbers+// You can specify all the values or you can default the Build and Revision Numbers// by using the '*' as shown below:// [assembly: AssemblyVersion("1.0.*")]\ No newline at end of filediff --git a/Emby.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs b/Emby.Server.Implementations/ScheduledTasks/PeopleValidationTask.csindex 02568fe3ac..db81243e0a 100644--- a/Emby.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs+++ b/Emby.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs@@ -35,8 +35,8 @@ namespace Emby.Server.Implementations.ScheduledTasks/// </summary>public IEnumerable<TaskTriggerInfo> GetDefaultTriggers(){- return new[]- {+ return new[]+ {// Every so oftennew TaskTriggerInfo{diff --git a/Emby.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs b/Emby.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.csindex fb07b8e99a..c58af68c83 100644--- a/Emby.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs+++ b/Emby.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs@@ -36,8 +36,8 @@ namespace Emby.Server.Implementations.ScheduledTasks/// <returns>IEnumerable{BaseTaskTrigger}.</returns>public IEnumerable<TaskTriggerInfo> GetDefaultTriggers(){- return new[] {-+ return new[] {+// Every so oftennew TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(12).Ticks}};diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.csindex c60f59ce47..c6a807521d 100644--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs@@ -42,8 +42,8 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks/// <returns>IEnumerable{BaseTaskTrigger}.</returns>public IEnumerable<TaskTriggerInfo> GetDefaultTriggers(){- return new[] {-+ return new[] {+// Every so oftennew TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks}};diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.csindex b754d7cb52..c3ef81f148 100644--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs@@ -38,8 +38,8 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks/// <returns>IEnumerable{BaseTaskTrigger}.</returns>public IEnumerable<TaskTriggerInfo> GetDefaultTriggers(){- return new[] {-+ return new[] {+// Every so oftennew TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks}};diff --git a/Emby.Server.Implementations/Security/MBLicenseFile.cs b/Emby.Server.Implementations/Security/MBLicenseFile.csindex 1810cbcd25..485aaba46c 100644--- a/Emby.Server.Implementations/Security/MBLicenseFile.cs+++ b/Emby.Server.Implementations/Security/MBLicenseFile.cs@@ -171,7 +171,7 @@ namespace Emby.Server.Implementations.Security//build our arrayvar lines = new List<string>{- RegKey,+ RegKey,// Legacy keystring.Emptydiff --git a/Emby.Server.Implementations/Services/ServiceHandler.cs b/Emby.Server.Implementations/Services/ServiceHandler.csindex f5fcb5fe6b..5590c51b62 100644--- a/Emby.Server.Implementations/Services/ServiceHandler.cs+++ b/Emby.Server.Implementations/Services/ServiceHandler.cs@@ -21,7 +21,7 @@ namespace Emby.Server.Implementations.Servicesreturn deserializer(requestType, httpReq.InputStream);}}- return Task.FromResult(host.CreateInstance(requestType));+ return Task.FromResult(host.CreateInstance(requestType));}public static RestPath FindMatchingRestPath(string httpMethod, string pathInfo, out string contentType)diff --git a/Emby.Server.Implementations/Services/ServicePath.cs b/Emby.Server.Implementations/Services/ServicePath.csindex ac2af3eaf9..ce779a2087 100644--- a/Emby.Server.Implementations/Services/ServicePath.cs+++ b/Emby.Server.Implementations/Services/ServicePath.cs@@ -39,7 +39,7 @@ namespace Emby.Server.Implementations.Servicespublic int PathComponentsCount { get; set; }/// <summary>- /// The total number of segments after subparts have been exploded ('.')+ /// The total number of segments after subparts have been exploded ('.')/// e.g. /path/to/here.ext == 4/// </summary>public int TotalComponentsCount { get; set; }diff --git a/Emby.Server.Implementations/Services/UrlExtensions.cs b/Emby.Server.Implementations/Services/UrlExtensions.csindex ba9889c413..898dcac3e9 100644--- a/Emby.Server.Implementations/Services/UrlExtensions.cs+++ b/Emby.Server.Implementations/Services/UrlExtensions.cs@@ -5,7 +5,7 @@ namespace Emby.Server.Implementations.Services/// <summary>/// Donated by Ivan Korneliuk from his post:/// http://korneliuk.blogspot.com/2012/08/servicestack-reusing-dtos.html- ///+ ////// Modified to only allow using routes matching the supplied HTTP Verb/// </summary>public static class UrlExtensionsdiff --git a/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs b/Emby.Server.Implementations/Sorting/DatePlayedComparer.csindex 388d2772e8..5939a94422 100644--- a/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs+++ b/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs@@ -28,7 +28,7 @@ namespace Emby.Server.Implementations.Sorting/// </summary>/// <value>The user data repository.</value>public IUserDataManager UserDataRepository { get; set; }-+/// <summary>/// Compares the specified x./// </summary>diff --git a/Emby.Server.Implementations/Sorting/PlayCountComparer.cs b/Emby.Server.Implementations/Sorting/PlayCountComparer.csindex aecad7c580..6acec80124 100644--- a/Emby.Server.Implementations/Sorting/PlayCountComparer.cs+++ b/Emby.Server.Implementations/Sorting/PlayCountComparer.cs@@ -53,7 +53,7 @@ namespace Emby.Server.Implementations.Sorting/// </summary>/// <value>The user data repository.</value>public IUserDataManager UserDataRepository { get; set; }-+/// <summary>/// Gets or sets the user manager./// </summary>diff --git a/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs b/Emby.Server.Implementations/Sorting/PremiereDateComparer.csindex d7219c86f4..b42aabe255 100644--- a/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs+++ b/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs@@ -32,7 +32,7 @@ namespace Emby.Server.Implementations.Sorting{return x.PremiereDate.Value;}-+if (x.ProductionYear.HasValue){trydiff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/StringExtensions.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/StringExtensions.csindex fc6c58a95b..1ea92232bf 100644--- a/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/StringExtensions.cs+++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/StringExtensions.cs@@ -18,7 +18,7 @@ namespace NLangDetect.Core.Extensionsif (end < 0) throw new ArgumentOutOfRangeException("end", "Argument must not be negative.");if (end > s.Length) throw new ArgumentOutOfRangeException("end", "Argument must not be greater than the input string's length.");if (start > end) throw new ArgumentOutOfRangeException("start", "Argument must not be greater than the 'end' argument.");-+return s.Substring(start, end - start);}}diff --git a/Emby.Server.Implementations/TextEncoding/TextEncodingDetect.cs b/Emby.Server.Implementations/TextEncoding/TextEncodingDetect.csindex a0395a21b9..441606e2ca 100644--- a/Emby.Server.Implementations/TextEncoding/TextEncodingDetect.cs+++ b/Emby.Server.Implementations/TextEncoding/TextEncodingDetect.cs@@ -1,15 +1,15 @@namespace Emby.Server.Implementations.TextEncoding{// Copyright 2015-2016 Jonathan Bennett <[email protected]>- //- // https://www.autoitscript.com+ //+ // https://www.autoitscript.com//// 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.@@ -166,7 +166,7 @@return encoding;}- // Now try UTF16+ // Now try UTF16encoding = CheckUtf16NewlineChars(buffer, size);if (encoding != CharacterEncoding.None){diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/CharsetDetector.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/CharsetDetector.csindex 942fda8d1e..18b3b306e0 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/CharsetDetector.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/CharsetDetector.cs@@ -41,7 +41,7 @@ using System.IO;namespace UniversalDetector{/// <summary>- /// Default implementation of charset detection interface.+ /// Default implementation of charset detection interface./// The detector can be fed by a System.IO.Stream:/// <example>/// <code>@@ -52,9 +52,9 @@ namespace UniversalDetector/// Console.WriteLine("{0}, {1}", cdet.Charset, cdet.Confidence);/// </code>/// </example>- ///+ ////// or by a byte a array:- ///+ ////// <example>/// <code>/// byte[] buff = new byte[1024];@@ -64,23 +64,23 @@ namespace UniversalDetector/// cdet.DataEnd();/// Console.WriteLine("{0}, {1}", cdet.Charset, cdet.Confidence);/// </code>- /// </example>- /// </summary>+ /// </example>+ /// </summary>public class CharsetDetector : Core.UniversalDetector, ICharsetDetector{private string charset;-+private float confidence;-+//public event DetectorFinished Finished;-+public CharsetDetector() : base(FILTER_ALL){-+}public void Feed(Stream stream)- {+ {byte[] buff = new byte[1024];int read;while ((read = stream.Read(buff, 0, buff.Length)) > 0 && !done)@@ -88,19 +88,19 @@ namespace UniversalDetectorFeed(buff, 0, read);}}-- public bool IsDone()++ public bool IsDone(){return done;}-+public override void Reset(){this.charset = null;this.confidence = 0.0f;base.Reset();}-+public string Charset {get { return charset; }}@@ -108,7 +108,7 @@ namespace UniversalDetectorpublic float Confidence {get { return confidence; }}-+protected override void Report(string charset, float confidence){this.charset = charset;@@ -118,7 +118,7 @@ namespace UniversalDetector// }}}-+//public delegate void DetectorFinished(string charset, float confidence);}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Big5Prober.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Big5Prober.csindex 760fca9bd5..19152a7acc 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Big5Prober.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Big5Prober.cs@@ -44,12 +44,12 @@ namespace UniversalDetector.Coreprivate CodingStateMachine codingSM;private BIG5DistributionAnalyser distributionAnalyser;private byte[] lastChar = new byte[2];-+public Big5Prober(){this.codingSM = new CodingStateMachine(new BIG5SMModel());this.distributionAnalyser = new BIG5DistributionAnalyser();- this.Reset();+ this.Reset();}public override ProbingState HandleData(byte[] buf, int offset, int len)@@ -73,7 +73,7 @@ namespace UniversalDetector.CorelastChar[1] = buf[offset];distributionAnalyser.HandleOneChar(lastChar, 0, charLen);} else {- distributionAnalyser.HandleOneChar(buf, i-1, charLen);+ distributionAnalyser.HandleOneChar(buf, i-1, charLen);}}}@@ -84,23 +84,23 @@ namespace UniversalDetector.Corestate = ProbingState.FoundIt;return state;}-+public override void Reset(){- codingSM.Reset();+ codingSM.Reset();state = ProbingState.Detecting;distributionAnalyser.Reset();}-+public override string GetCharsetName(){- return "Big-5";+ return "Big-5";}-+public override float GetConfidence(){return distributionAnalyser.GetConfidence();}-+}}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/BitPackage.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/BitPackage.csindex 16483e661a..19bcdc7792 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/BitPackage.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/BitPackage.cs@@ -43,15 +43,15 @@ namespace UniversalDetector.Corepublic static int INDEX_SHIFT_4BITS = 3;public static int INDEX_SHIFT_8BITS = 2;public static int INDEX_SHIFT_16BITS = 1;-+public static int SHIFT_MASK_4BITS = 7;public static int SHIFT_MASK_8BITS = 3;public static int SHIFT_MASK_16BITS = 1;-+public static int BIT_SHIFT_4BITS = 2;public static int BIT_SHIFT_8BITS = 3;public static int BIT_SHIFT_16BITS = 4;-+public static int UNIT_MASK_4BITS = 0x0000000F;public static int UNIT_MASK_8BITS = 0x000000FF;public static int UNIT_MASK_16BITS = 0x0000FFFF;@@ -61,7 +61,7 @@ namespace UniversalDetector.Coreprivate int bitShift;private int unitMask;private int[] data;-+public BitPackage(int indexShift, int shiftMask,int bitShift, int unitMask, int[] data){@@ -71,27 +71,27 @@ namespace UniversalDetector.Corethis.unitMask = unitMask;this.data = data;}-+public static int Pack16bits(int a, int b){return ((b << 16) | a);}-+public static int Pack8bits(int a, int b, int c, int d){return Pack16bits((b << 8) | a, (d << 8) | c);}-- public static int Pack4bits(int a, int b, int c, int d,++ public static int Pack4bits(int a, int b, int c, int d,int e, int f, int g, int h){return Pack8bits((b << 4) | a, (d << 4) | c,(f << 4) | e, (h << 4) | g);}-+public int Unpack(int i){- return (data[i >> indexShift] >>+ return (data[i >> indexShift] >>((i & shiftMask) << bitShift)) & unitMask;}}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CharsetProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CharsetProber.csindex 3369dd4304..cc4539058d 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CharsetProber.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CharsetProber.cs@@ -21,7 +21,7 @@* Contributor(s):* Shy Shalom <[email protected]>* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -40,10 +40,10 @@ using System.IO;namespace UniversalDetector.Core{- public enum ProbingState {+ public enum ProbingState {Detecting = 0, // no sure answer yet, but caller can ask for confidenceFoundIt = 1, // positive answer- NotMe = 2 // negative answer+ NotMe = 2 // negative answer};public abstract class CharsetProber@@ -51,16 +51,16 @@ namespace UniversalDetector.Coreprotected const float SHORTCUT_THRESHOLD = 0.95F;protected ProbingState state;-+// ASCII codesprivate const byte SPACE = 0x20;private const byte CAPITAL_A = 0x41;private const byte CAPITAL_Z = 0x5A;private const byte SMALL_A = 0x61;private const byte SMALL_Z = 0x7A;- private const byte LESS_THAN = 0x3C;+ private const byte LESS_THAN = 0x3C;private const byte GREATER_THAN = 0x3E;-+/// <summary>/// Feed data to the prober/// </summary>@@ -71,44 +71,44 @@ namespace UniversalDetector.Core/// A <see cref="ProbingState"/>/// </returns>public abstract ProbingState HandleData(byte[] buf, int offset, int len);-+/// <summary>/// Reset prober state/// </summary>public abstract void Reset();public abstract string GetCharsetName();-+public abstract float GetConfidence();-+public virtual ProbingState GetState(){return state;}public virtual void SetOption()- {-+ {+}public virtual void DumpStatus()- {-+ {+}//// Helper functions used in the Latin1 and Group probers///// <summary>- ///+ ////// </summary>/// <returns>filtered buffer</returns>- protected static byte[] FilterWithoutEnglishLetters(byte[] buf, int offset, int len)+ protected static byte[] FilterWithoutEnglishLetters(byte[] buf, int offset, int len){byte[] result = null;using (MemoryStream ms = new MemoryStream(buf.Length)) {-+bool meetMSB = false;int max = offset + len;int prev = offset;@@ -140,8 +140,8 @@ namespace UniversalDetector.Core}/// <summary>- /// Do filtering to reduce load to probers (Remove ASCII symbols,- /// collapse spaces). This filter applies to all scripts which contain+ /// Do filtering to reduce load to probers (Remove ASCII symbols,+ /// collapse spaces). This filter applies to all scripts which contain/// both English characters and upper ASCII characters./// </summary>/// <returns>a filtered copy of the input buffer</returns>@@ -150,16 +150,16 @@ namespace UniversalDetector.Corebyte[] result = null;using (MemoryStream ms = new MemoryStream(buf.Length)) {-+bool inTag = false;int max = offset + len;int prev = offset;int cur = offset;while (cur < max) {-+byte b = buf[cur];-+if (b == GREATER_THAN)inTag = false;else if (b == LESS_THAN)@@ -177,7 +177,7 @@ namespace UniversalDetector.Corecur++;}- // If the current segment contains more than just a symbol+ // If the current segment contains more than just a symbol// and it is not inside a tag then keep it.if (!inTag && cur > prev)ms.Write(buf, prev, cur - prev);diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Charsets.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Charsets.csindex a7c1be92ab..00cd8826f6 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Charsets.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Charsets.cs@@ -20,7 +20,7 @@** Contributor(s):* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -40,47 +40,47 @@ namespace UniversalDetector.Corepublic static class Charsets{public const string ASCII = "ASCII";-+public const string UTF8 = "UTF-8";-+public const string UTF16_LE = "UTF-16LE";-+public const string UTF16_BE = "UTF-16BE";-+public const string UTF32_BE = "UTF-32BE";-+public const string UTF32_LE = "UTF-32LE";/// <summary>/// Unusual BOM (3412 order)/// </summary>public const string UCS4_3412 = "X-ISO-10646-UCS-4-3412";-+/// <summary>/// Unusual BOM (2413 order)/// </summary>public const string UCS4_2413 = "X-ISO-10646-UCS-4-2413";-+/// <summary>/// Cyrillic (based on bulgarian and russian data)/// </summary>public const string WIN1251 = "windows-1251";-+/// <summary>/// Latin-1, almost identical to ISO-8859-1/// </summary>public const string WIN1252 = "windows-1252";-+/// <summary>/// Greek/// </summary>public const string WIN1253 = "windows-1253";-+/// <summary>/// Logical hebrew (includes ISO-8859-8-I and most of x-mac-hebrew)/// </summary>public const string WIN1255 = "windows-1255";-+/// <summary>/// Traditional chinese/// </summary>@@ -89,7 +89,7 @@ namespace UniversalDetector.Corepublic const string EUCKR = "EUC-KR";public const string EUCJP = "EUC-JP";-+public const string EUCTW = "EUC-TW";/// <summary>@@ -98,11 +98,11 @@ namespace UniversalDetector.Corepublic const string GB18030 = "gb18030";public const string ISO2022_JP = "ISO-2022-JP";-+public const string ISO2022_CN = "ISO-2022-CN";-+public const string ISO2022_KR = "ISO-2022-KR";-+/// <summary>/// Simplified chinese/// </summary>@@ -111,15 +111,15 @@ namespace UniversalDetector.Corepublic const string SHIFT_JIS = "Shift-JIS";public const string MAC_CYRILLIC = "x-mac-cyrillic";-+public const string KOI8R = "KOI8-R";-+public const string IBM855 = "IBM855";-+public const string IBM866 = "IBM866";/// <summary>- /// East-Europe. Disabled because too similar to windows-1252+ /// East-Europe. Disabled because too similar to windows-1252/// (latin-1). Should use tri-grams models to discriminate between/// these two charsets./// </summary>@@ -141,9 +141,9 @@ namespace UniversalDetector.Corepublic const string ISO8859_8 = "ISO-8859-8";/// <summary>- /// Thai. This recognizer is not enabled yet.+ /// Thai. This recognizer is not enabled yet./// </summary>public const string TIS620 = "TIS620";-+}}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CodingStateMachine.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CodingStateMachine.csindex f837dd9668..484bbca368 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CodingStateMachine.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CodingStateMachine.cs@@ -22,7 +22,7 @@* Shy Shalom <[email protected]>* Kohei TAKETA <[email protected]> (Java port)* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -48,8 +48,8 @@ namespace UniversalDetector.Coreprivate SMModel model;private int currentCharLen;private int currentBytePos;-- public CodingStateMachine(SMModel model)++ public CodingStateMachine(SMModel model){this.currentState = SMModel.START;this.model = model;@@ -57,34 +57,34 @@ namespace UniversalDetector.Corepublic int NextState(byte b){- // for each byte we get its class, if it is first byte,+ // for each byte we get its class, if it is first byte,// we also get byte lengthint byteCls = model.GetClass(b);- if (currentState == SMModel.START) {+ if (currentState == SMModel.START) {currentBytePos = 0;currentCharLen = model.charLenTable[byteCls];}-- // from byte's class and stateTable, we get its next state++ // from byte's class and stateTable, we get its next statecurrentState = model.stateTable.Unpack(currentState * model.ClassFactor + byteCls);currentBytePos++;return currentState;}-- public void Reset()- {- currentState = SMModel.START;++ public void Reset()+ {+ currentState = SMModel.START;}- public int CurrentCharLen- {- get { return currentCharLen; }+ public int CurrentCharLen+ {+ get { return currentCharLen; }}- public string ModelName- {- get { return model.Name; }+ public string ModelName+ {+ get { return model.Name; }}}}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCJPProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCJPProber.csindex 050a9d9ce4..eac67fe956 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCJPProber.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCJPProber.cs@@ -43,25 +43,25 @@ namespace UniversalDetector.Coreprivate EUCJPContextAnalyser contextAnalyser;private EUCJPDistributionAnalyser distributionAnalyser;private byte[] lastChar = new byte[2];-+public EUCJPProber(){codingSM = new CodingStateMachine(new EUCJPSMModel());distributionAnalyser = new EUCJPDistributionAnalyser();- contextAnalyser = new EUCJPContextAnalyser();+ contextAnalyser = new EUCJPContextAnalyser();Reset();}- public override string GetCharsetName()+ public override string GetCharsetName(){return "EUC-JP";}-+public override ProbingState HandleData(byte[] buf, int offset, int len){int codingState;int max = offset + len;-+for (int i = offset; i < max; i++) {codingState = codingSM.NextState(buf[i]);if (codingState == SMModel.ERROR) {@@ -83,7 +83,7 @@ namespace UniversalDetector.CoredistributionAnalyser.HandleOneChar(buf, i-1, charLen);}}- }+ }lastChar[0] = buf[max-1];if (state == ProbingState.Detecting)if (contextAnalyser.GotEnoughData() && GetConfidence() > SHORTCUT_THRESHOLD)@@ -93,18 +93,18 @@ namespace UniversalDetector.Corepublic override void Reset(){- codingSM.Reset();+ codingSM.Reset();state = ProbingState.Detecting;contextAnalyser.Reset();distributionAnalyser.Reset();}-+public override float GetConfidence(){float contxtCf = contextAnalyser.GetConfidence();float distribCf = distributionAnalyser.GetConfidence();return (contxtCf > distribCf ? contxtCf : distribCf);}-+}}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCKRProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCKRProber.csindex 67d4b0a721..b1543dae16 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCKRProber.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCKRProber.cs@@ -46,15 +46,15 @@ namespace UniversalDetector.Corepublic EUCKRProber(){codingSM = new CodingStateMachine(new EUCKRSMModel());- distributionAnalyser = new EUCKRDistributionAnalyser();+ distributionAnalyser = new EUCKRDistributionAnalyser();Reset();}-+public override string GetCharsetName(){- return "EUC-KR";+ return "EUC-KR";}-+public override ProbingState HandleData(byte[] buf, int offset, int len){int codingState;@@ -81,12 +81,12 @@ namespace UniversalDetector.Core}}lastChar[0] = buf[max-1];-+if (state == ProbingState.Detecting)if (distributionAnalyser.GotEnoughData() && GetConfidence() > SHORTCUT_THRESHOLD)state = ProbingState.FoundIt;return state;-+}public override float GetConfidence()@@ -96,7 +96,7 @@ namespace UniversalDetector.Corepublic override void Reset(){- codingSM.Reset();+ codingSM.Reset();state = ProbingState.Detecting;distributionAnalyser.Reset();//mContextAnalyser.Reset();diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCTWProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCTWProber.csindex a4e0b486ec..65a521760a 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCTWProber.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCTWProber.cs@@ -21,7 +21,7 @@* Contributor(s):* Shy Shalom <[email protected]>* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -50,7 +50,7 @@ namespace UniversalDetector.Corethis.distributionAnalyser = new EUCTWDistributionAnalyser();this.Reset();}-+public override ProbingState HandleData(byte[] buf, int offset, int len){int codingState;@@ -77,21 +77,21 @@ namespace UniversalDetector.Core}}lastChar[0] = buf[max-1];-+if (state == ProbingState.Detecting)if (distributionAnalyser.GotEnoughData() && GetConfidence() > SHORTCUT_THRESHOLD)state = ProbingState.FoundIt;return state;}-+public override string GetCharsetName(){- return "x-euc-tw";+ return "x-euc-tw";}-+public override void Reset(){- codingSM.Reset();+ codingSM.Reset();state = ProbingState.Detecting;distributionAnalyser.Reset();}@@ -100,7 +100,7 @@ namespace UniversalDetector.Core{return distributionAnalyser.GetConfidence();}--++}}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.csindex e9cefa9bcc..f457bf4902 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs@@ -41,19 +41,19 @@ namespace UniversalDetector.Core{private const int CHARSETS_NUM = 4;private string detectedCharset;- private CodingStateMachine[] codingSM;+ private CodingStateMachine[] codingSM;int activeSM;public EscCharsetProber(){- codingSM = new CodingStateMachine[CHARSETS_NUM];+ codingSM = new CodingStateMachine[CHARSETS_NUM];codingSM[0] = new CodingStateMachine(new HZSMModel());codingSM[1] = new CodingStateMachine(new ISO2022CNSMModel());codingSM[2] = new CodingStateMachine(new ISO2022JPSMModel());codingSM[3] = new CodingStateMachine(new ISO2022KRSMModel());Reset();}-+public override void Reset(){state = ProbingState.Detecting;@@ -66,7 +66,7 @@ namespace UniversalDetector.Corepublic override ProbingState HandleData(byte[] buf, int offset, int len){int max = offset + len;-+for (int i = offset; i < max && state == ProbingState.Detecting; i++) {for (int j = activeSM - 1; j >= 0; j--) {// byte is feed to all active state machine@@ -94,12 +94,12 @@ namespace UniversalDetector.Corepublic override string GetCharsetName(){- return detectedCharset;+ return detectedCharset;}-+public override float GetConfidence(){return 0.99f;- }+ }}}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscSM.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscSM.csindex 61ac5545fb..6ebfa8a4ca 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscSM.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscSM.cs@@ -44,59 +44,59 @@ namespace UniversalDetector.Corepublic class HZSMModel : SMModel{private readonly static int[] HZ_cls = {- BitPackage.Pack4bits(1,0,0,0,0,0,0,0), // 00 - 07- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 08 - 0f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17- BitPackage.Pack4bits(0,0,0,1,0,0,0,0), // 18 - 1f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 20 - 27- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 28 - 2f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 40 - 47- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77- BitPackage.Pack4bits(0,0,0,4,0,5,2,0), // 78 - 7f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 80 - 87- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 88 - 8f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 90 - 97- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 98 - 9f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // a0 - a7- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // a8 - af- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // b0 - b7- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // b8 - bf- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // c0 - c7- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // c8 - cf- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // d0 - d7- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // d8 - df- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // e0 - e7- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // e8 - ef- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // f0 - f7- BitPackage.Pack4bits(1,1,1,1,1,1,1,1) // f8 - ff+ BitPackage.Pack4bits(1,0,0,0,0,0,0,0), // 00 - 07+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 08 - 0f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17+ BitPackage.Pack4bits(0,0,0,1,0,0,0,0), // 18 - 1f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 20 - 27+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 28 - 2f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 40 - 47+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77+ BitPackage.Pack4bits(0,0,0,4,0,5,2,0), // 78 - 7f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 80 - 87+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 88 - 8f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 90 - 97+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 98 - 9f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // a0 - a7+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // a8 - af+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // b0 - b7+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // b8 - bf+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // c0 - c7+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // c8 - cf+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // d0 - d7+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // d8 - df+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // e0 - e7+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // e8 - ef+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // f0 - f7+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1) // f8 - ff};private readonly static int[] HZ_st = {- BitPackage.Pack4bits(START, ERROR, 3, START, START, START, ERROR, ERROR),//00-07- BitPackage.Pack4bits(ERROR, ERROR, ERROR, ERROR, ITSME, ITSME, ITSME, ITSME),//08-0f- BitPackage.Pack4bits(ITSME, ITSME, ERROR, ERROR, START, START, 4, ERROR),//10-17- BitPackage.Pack4bits( 5, ERROR, 6, ERROR, 5, 5, 4, ERROR),//18-1f- BitPackage.Pack4bits( 4, ERROR, 4, 4, 4, ERROR, 4, ERROR),//20-27- BitPackage.Pack4bits( 4, ITSME, START, START, START, START, START, START) //28-2f+ BitPackage.Pack4bits(START, ERROR, 3, START, START, START, ERROR, ERROR),//00-07+ BitPackage.Pack4bits(ERROR, ERROR, ERROR, ERROR, ITSME, ITSME, ITSME, ITSME),//08-0f+ BitPackage.Pack4bits(ITSME, ITSME, ERROR, ERROR, START, START, 4, ERROR),//10-17+ BitPackage.Pack4bits( 5, ERROR, 6, ERROR, 5, 5, 4, ERROR),//18-1f+ BitPackage.Pack4bits( 4, ERROR, 4, 4, 4, ERROR, 4, ERROR),//20-27+ BitPackage.Pack4bits( 4, ITSME, START, START, START, START, START, START) //28-2f};private readonly static int[] HZCharLenTable = {0, 0, 0, 0, 0, 0};-+public HZSMModel() : base(- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, HZ_cls),6,- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, HZ_st),HZCharLenTable, "HZ-GB-2312")@@ -104,65 +104,65 @@ namespace UniversalDetector.Core}}-+public class ISO2022CNSMModel : SMModel{private readonly static int[] ISO2022CN_cls = {- BitPackage.Pack4bits(2,0,0,0,0,0,0,0), // 00 - 07- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 08 - 0f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17- BitPackage.Pack4bits(0,0,0,1,0,0,0,0), // 18 - 1f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 20 - 27- BitPackage.Pack4bits(0,3,0,0,0,0,0,0), // 28 - 2f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f- BitPackage.Pack4bits(0,0,0,4,0,0,0,0), // 40 - 47- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 80 - 87- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 88 - 8f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 90 - 97- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 98 - 9f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a0 - a7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e0 - e7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e8 - ef- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // f0 - f7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2) // f8 - ff+ BitPackage.Pack4bits(2,0,0,0,0,0,0,0), // 00 - 07+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 08 - 0f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17+ BitPackage.Pack4bits(0,0,0,1,0,0,0,0), // 18 - 1f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 20 - 27+ BitPackage.Pack4bits(0,3,0,0,0,0,0,0), // 28 - 2f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f+ BitPackage.Pack4bits(0,0,0,4,0,0,0,0), // 40 - 47+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 80 - 87+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 88 - 8f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 90 - 97+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 98 - 9f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a0 - a7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e0 - e7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e8 - ef+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // f0 - f7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2) // f8 - ff};private readonly static int[] ISO2022CN_st = {- BitPackage.Pack4bits(START, 3,ERROR,START,START,START,START,START),//00-07- BitPackage.Pack4bits(START,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//08-0f- BitPackage.Pack4bits(ERROR,ERROR,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME),//10-17- BitPackage.Pack4bits(ITSME,ITSME,ITSME,ERROR,ERROR,ERROR, 4,ERROR),//18-1f- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ITSME,ERROR,ERROR,ERROR,ERROR),//20-27- BitPackage.Pack4bits( 5, 6,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//28-2f- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ITSME,ERROR,ERROR,ERROR,ERROR),//30-37- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ITSME,ERROR,START) //38-3f+ BitPackage.Pack4bits(START, 3,ERROR,START,START,START,START,START),//00-07+ BitPackage.Pack4bits(START,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//08-0f+ BitPackage.Pack4bits(ERROR,ERROR,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME),//10-17+ BitPackage.Pack4bits(ITSME,ITSME,ITSME,ERROR,ERROR,ERROR, 4,ERROR),//18-1f+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ITSME,ERROR,ERROR,ERROR,ERROR),//20-27+ BitPackage.Pack4bits( 5, 6,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//28-2f+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ITSME,ERROR,ERROR,ERROR,ERROR),//30-37+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ITSME,ERROR,START) //38-3f};private readonly static int[] ISO2022CNCharLenTable = {0, 0, 0, 0, 0, 0, 0, 0, 0};public ISO2022CNSMModel() : base(- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, ISO2022CN_cls),9,- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, ISO2022CN_st),ISO2022CNCharLenTable, "ISO-2022-CN")@@ -170,130 +170,130 @@ namespace UniversalDetector.Core}}-+public class ISO2022JPSMModel : SMModel{private readonly static int[] ISO2022JP_cls = {- BitPackage.Pack4bits(2,0,0,0,0,0,0,0), // 00 - 07- BitPackage.Pack4bits(0,0,0,0,0,0,2,2), // 08 - 0f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17- BitPackage.Pack4bits(0,0,0,1,0,0,0,0), // 18 - 1f- BitPackage.Pack4bits(0,0,0,0,7,0,0,0), // 20 - 27- BitPackage.Pack4bits(3,0,0,0,0,0,0,0), // 28 - 2f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f- BitPackage.Pack4bits(6,0,4,0,8,0,0,0), // 40 - 47- BitPackage.Pack4bits(0,9,5,0,0,0,0,0), // 48 - 4f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 80 - 87- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 88 - 8f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 90 - 97- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 98 - 9f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a0 - a7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e0 - e7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e8 - ef- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // f0 - f7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2) // f8 - ff+ BitPackage.Pack4bits(2,0,0,0,0,0,0,0), // 00 - 07+ BitPackage.Pack4bits(0,0,0,0,0,0,2,2), // 08 - 0f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17+ BitPackage.Pack4bits(0,0,0,1,0,0,0,0), // 18 - 1f+ BitPackage.Pack4bits(0,0,0,0,7,0,0,0), // 20 - 27+ BitPackage.Pack4bits(3,0,0,0,0,0,0,0), // 28 - 2f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f+ BitPackage.Pack4bits(6,0,4,0,8,0,0,0), // 40 - 47+ BitPackage.Pack4bits(0,9,5,0,0,0,0,0), // 48 - 4f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 80 - 87+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 88 - 8f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 90 - 97+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 98 - 9f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a0 - a7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e0 - e7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e8 - ef+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // f0 - f7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2) // f8 - ff};private readonly static int[] ISO2022JP_st = {- BitPackage.Pack4bits(START, 3, ERROR,START,START,START,START,START),//00-07- BitPackage.Pack4bits(START, START, ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//08-0f- BitPackage.Pack4bits(ERROR, ERROR, ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//10-17- BitPackage.Pack4bits(ITSME, ITSME, ITSME,ITSME,ITSME,ITSME,ERROR,ERROR),//18-1f- BitPackage.Pack4bits(ERROR, 5, ERROR,ERROR,ERROR, 4,ERROR,ERROR),//20-27- BitPackage.Pack4bits(ERROR, ERROR, ERROR, 6,ITSME,ERROR,ITSME,ERROR),//28-2f- BitPackage.Pack4bits(ERROR, ERROR, ERROR,ERROR,ERROR,ERROR,ITSME,ITSME),//30-37- BitPackage.Pack4bits(ERROR, ERROR, ERROR,ITSME,ERROR,ERROR,ERROR,ERROR),//38-3f- BitPackage.Pack4bits(ERROR, ERROR, ERROR,ERROR,ITSME,ERROR,START,START) //40-47+ BitPackage.Pack4bits(START, 3, ERROR,START,START,START,START,START),//00-07+ BitPackage.Pack4bits(START, START, ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//08-0f+ BitPackage.Pack4bits(ERROR, ERROR, ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//10-17+ BitPackage.Pack4bits(ITSME, ITSME, ITSME,ITSME,ITSME,ITSME,ERROR,ERROR),//18-1f+ BitPackage.Pack4bits(ERROR, 5, ERROR,ERROR,ERROR, 4,ERROR,ERROR),//20-27+ BitPackage.Pack4bits(ERROR, ERROR, ERROR, 6,ITSME,ERROR,ITSME,ERROR),//28-2f+ BitPackage.Pack4bits(ERROR, ERROR, ERROR,ERROR,ERROR,ERROR,ITSME,ITSME),//30-37+ BitPackage.Pack4bits(ERROR, ERROR, ERROR,ITSME,ERROR,ERROR,ERROR,ERROR),//38-3f+ BitPackage.Pack4bits(ERROR, ERROR, ERROR,ERROR,ITSME,ERROR,START,START) //40-47};private readonly static int[] ISO2022JPCharLenTable = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};public ISO2022JPSMModel() : base(- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, ISO2022JP_cls),10,- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, ISO2022JP_st),ISO2022JPCharLenTable, "ISO-2022-JP"){}-+}-+public class ISO2022KRSMModel : SMModel- {+ {private readonly static int[] ISO2022KR_cls = {- BitPackage.Pack4bits(2,0,0,0,0,0,0,0), // 00 - 07- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 08 - 0f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17- BitPackage.Pack4bits(0,0,0,1,0,0,0,0), // 18 - 1f- BitPackage.Pack4bits(0,0,0,0,3,0,0,0), // 20 - 27- BitPackage.Pack4bits(0,4,0,0,0,0,0,0), // 28 - 2f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f- BitPackage.Pack4bits(0,0,0,5,0,0,0,0), // 40 - 47- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 80 - 87- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 88 - 8f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 90 - 97- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 98 - 9f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a0 - a7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e0 - e7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e8 - ef- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // f0 - f7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2) // f8 - ff+ BitPackage.Pack4bits(2,0,0,0,0,0,0,0), // 00 - 07+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 08 - 0f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17+ BitPackage.Pack4bits(0,0,0,1,0,0,0,0), // 18 - 1f+ BitPackage.Pack4bits(0,0,0,0,3,0,0,0), // 20 - 27+ BitPackage.Pack4bits(0,4,0,0,0,0,0,0), // 28 - 2f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f+ BitPackage.Pack4bits(0,0,0,5,0,0,0,0), // 40 - 47+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 80 - 87+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 88 - 8f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 90 - 97+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 98 - 9f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a0 - a7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e0 - e7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e8 - ef+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // f0 - f7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2) // f8 - ff};private readonly static int[] ISO2022KR_st = {- BitPackage.Pack4bits(START, 3,ERROR,START,START,START,ERROR,ERROR),//00-07- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f- BitPackage.Pack4bits(ITSME,ITSME,ERROR,ERROR,ERROR, 4,ERROR,ERROR),//10-17- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR, 5,ERROR,ERROR,ERROR),//18-1f- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ITSME,START,START,START,START) //20-27+ BitPackage.Pack4bits(START, 3,ERROR,START,START,START,ERROR,ERROR),//00-07+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f+ BitPackage.Pack4bits(ITSME,ITSME,ERROR,ERROR,ERROR, 4,ERROR,ERROR),//10-17+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR, 5,ERROR,ERROR,ERROR),//18-1f+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ITSME,START,START,START,START) //20-27};private readonly static int[] ISO2022KRCharLenTable = {0, 0, 0, 0, 0, 0};public ISO2022KRSMModel() : base(- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, ISO2022KR_cls),6,- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, ISO2022KR_st),ISO2022KRCharLenTable, "ISO-2022-KR")diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/GB18030Prober.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/GB18030Prober.csindex ac237c5cd8..0d2ebd8c73 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/GB18030Prober.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/GB18030Prober.cs@@ -21,7 +21,7 @@* Contributor(s):* Shy Shalom <[email protected]>* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -38,7 +38,7 @@namespace UniversalDetector.Core{- // We use gb18030 to replace gb2312, because 18030 is a superset.+ // We use gb18030 to replace gb2312, because 18030 is a superset.public class GB18030Prober : CharsetProber{private CodingStateMachine codingSM;@@ -52,18 +52,18 @@ namespace UniversalDetector.Coreanalyser = new GB18030DistributionAnalyser();Reset();}-+public override string GetCharsetName(){- return "gb18030";+ return "gb18030";}-+public override ProbingState HandleData(byte[] buf, int offset, int len){int codingState = SMModel.START;int max = offset + len;-+for (int i = offset; i < max; i++) {codingState = codingSM.NextState(buf[i]);if (codingState == SMModel.ERROR) {@@ -91,18 +91,18 @@ namespace UniversalDetector.Coreif (analyser.GotEnoughData() && GetConfidence() > SHORTCUT_THRESHOLD)state = ProbingState.FoundIt;}-+return state;}-+public override float GetConfidence(){return analyser.GetConfidence();}-+public override void Reset(){- codingSM.Reset();+ codingSM.Reset();state = ProbingState.Detecting;analyser.Reset();}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/HebrewProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/HebrewProber.csindex 92974d3a81..2cbf33075c 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/HebrewProber.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/HebrewProber.cs@@ -21,7 +21,7 @@* Contributor(s):* Shy Shalom <[email protected]>* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -43,40 +43,40 @@ using System;** Four main charsets exist in Hebrew:* "ISO-8859-8" - Visual Hebrew- * "windows-1255" - Logical Hebrew+ * "windows-1255" - Logical Hebrew* "ISO-8859-8-I" - Logical Hebrew* "x-mac-hebrew" - ?? Logical Hebrew ??** Both "ISO" charsets use a completely identical set of code points, whereas- * "windows-1255" and "x-mac-hebrew" are two different proper supersets of+ * "windows-1255" and "x-mac-hebrew" are two different proper supersets of* these code points. windows-1255 defines additional characters in the range- * 0x80-0x9F as some misc punctuation marks as well as some Hebrew-specific+ * 0x80-0x9F as some misc punctuation marks as well as some Hebrew-specific* diacritics and additional 'Yiddish' ligature letters in the range 0xc0-0xd6.- * x-mac-hebrew defines similar additional code points but with a different+ * x-mac-hebrew defines similar additional code points but with a different* mapping.*- * As far as an average Hebrew text with no diacritics is concerned, all four- * charsets are identical with respect to code points. Meaning that for the- * main Hebrew alphabet, all four map the same values to all 27 Hebrew letters+ * As far as an average Hebrew text with no diacritics is concerned, all four+ * charsets are identical with respect to code points. Meaning that for the+ * main Hebrew alphabet, all four map the same values to all 27 Hebrew letters* (including final letters).** The dominant difference between these charsets is their directionality.* "Visual" directionality means that the text is ordered as if the renderer is- * not aware of a BIDI rendering algorithm. The renderer sees the text and- * draws it from left to right. The text itself when ordered naturally is read+ * not aware of a BIDI rendering algorithm. The renderer sees the text and+ * draws it from left to right. The text itself when ordered naturally is read* backwards. A buffer of Visual Hebrew generally looks like so:* "[last word of first line spelled backwards] [whole line ordered backwards- * and spelled backwards] [first word of first line spelled backwards]+ * and spelled backwards] [first word of first line spelled backwards]* [end of line] [last word of second line] ... etc' "* adding punctuation marks, numbers and English text to visual text is* naturally also "visual" and from left to right.- *+ ** "Logical" directionality means the text is ordered "naturally" according to- * the order it is read. It is the responsibility of the renderer to display- * the text from right to left. A BIDI algorithm is used to place general+ * the order it is read. It is the responsibility of the renderer to display+ * the text from right to left. A BIDI algorithm is used to place general* punctuation marks, numbers and English text in the text.*- * Texts in x-mac-hebrew are almost impossible to find on the Internet. From+ * Texts in x-mac-hebrew are almost impossible to find on the Internet. From* what little evidence I could find, it seems that its general directionality* is Logical.*@@ -84,17 +84,17 @@ using System;* charsets:* Visual Hebrew - "ISO-8859-8" - backwards text - Words and sentences are* backwards while line order is natural. For charset recognition purposes- * the line order is unimportant (In fact, for this implementation, even+ * the line order is unimportant (In fact, for this implementation, even* word order is unimportant).* Logical Hebrew - "windows-1255" - normal, naturally ordered text.*- * "ISO-8859-8-I" is a subset of windows-1255 and doesn't need to be+ * "ISO-8859-8-I" is a subset of windows-1255 and doesn't need to be* specifically identified.* "x-mac-hebrew" is also identified as windows-1255. A text in x-mac-hebrew* that contain special punctuation marks or diacritics is displayed with* some unconverted characters showing as question marks. This problem might* be corrected using another model prober for x-mac-hebrew. Due to the fact- * that x-mac-hebrew texts are so rare, writing another model prober isn't+ * that x-mac-hebrew texts are so rare, writing another model prober isn't* worth the effort and performance hit.** *** The Prober ***@@ -136,7 +136,7 @@ using System;*/namespace UniversalDetector.Core{-+/// <summary>/// This prober doesn't actually recognize a language or a charset./// It is a helper prober for the use of the Hebrew model probers@@ -165,49 +165,49 @@ namespace UniversalDetector.Coreprotected const string VISUAL_HEBREW_NAME = "ISO-8859-8";protected const string LOGICAL_HEBREW_NAME = "windows-1255";-+// owned by the group prober.protected CharsetProber logicalProber, visualProber;- protected int finalCharLogicalScore, finalCharVisualScore;-+ protected int finalCharLogicalScore, finalCharVisualScore;+// The two last bytes seen in the previous buffer.protected byte prev, beforePrev;-+public HebrewProber(){Reset();}-- public void SetModelProbers(CharsetProber logical, CharsetProber visual)- {- logicalProber = logical;- visualProber = visual;++ public void SetModelProbers(CharsetProber logical, CharsetProber visual)+ {+ logicalProber = logical;+ visualProber = visual;}-- /**++ /*** Final letter analysis for logical-visual decision.- * Look for evidence that the received buffer is either logical Hebrew or+ * Look for evidence that the received buffer is either logical Hebrew or* visual Hebrew.* The following cases are checked:- * 1) A word longer than 1 letter, ending with a final letter. This is an- * indication that the text is laid out "naturally" since the final letter+ * 1) A word longer than 1 letter, ending with a final letter. This is an+ * indication that the text is laid out "naturally" since the final letter* really appears at the end. +1 for logical score.* 2) A word longer than 1 letter, ending with a Non-Final letter. In normal* Hebrew, words ending with Kaf, Mem, Nun, Pe or Tsadi, should not end with* the Non-Final form of that letter. Exceptions to this rule are mentioned* above in isNonFinal(). This is an indication that the text is laid out* backwards. +1 for visual score- * 3) A word longer than 1 letter, starting with a final letter. Final letters- * should not appear at the beginning of a word. This is an indication that+ * 3) A word longer than 1 letter, starting with a final letter. Final letters+ * should not appear at the beginning of a word. This is an indication that* the text is laid out backwards. +1 for visual score.*- * The visual score and logical score are accumulated throughout the text and+ * The visual score and logical score are accumulated throughout the text and* are finally checked against each other in GetCharSetName().* No checking for final letters in the middle of words is done since that case* is not an indication for either Logical or Visual text.** The input buffer should not contain any white spaces that are not (' ')- * or any low-ascii punctuation marks.+ * or any low-ascii punctuation marks.*/public override ProbingState HandleData(byte[] buf, int offset, int len){@@ -218,31 +218,31 @@ namespace UniversalDetector.Coreint max = offset + len;for (int i = offset; i < max; i++) {-+byte b = buf[i];-+// a word just endedif (b == 0x20) {// *(curPtr-2) was not a space so prev is not a 1 letter wordif (beforePrev != 0x20) {// case (1) [-2:not space][-1:final letter][cur:space]- if (IsFinal(prev))+ if (IsFinal(prev))finalCharLogicalScore++;- // case (2) [-2:not space][-1:Non-Final letter][cur:space]+ // case (2) [-2:not space][-1:Non-Final letter][cur:space]else if (IsNonFinal(prev))finalCharVisualScore++;}-+} else {// case (3) [-2:space][-1:final letter][cur:not space]- if ((beforePrev == 0x20) && (IsFinal(prev)) && (b != ' '))+ if ((beforePrev == 0x20) && (IsFinal(prev)) && (b != ' '))++finalCharVisualScore;}beforePrev = prev;prev = b;}- // Forever detecting, till the end or until both model probers+ // Forever detecting, till the end or until both model probers// return NotMe (handled above).return ProbingState.Detecting;}@@ -252,7 +252,7 @@ namespace UniversalDetector.Core{// If the final letter score distance is dominant enough, rely on it.int finalsub = finalCharLogicalScore - finalCharVisualScore;- if (finalsub >= MIN_FINAL_CHAR_DISTANCE)+ if (finalsub >= MIN_FINAL_CHAR_DISTANCE)return LOGICAL_HEBREW_NAME;if (finalsub <= -(MIN_FINAL_CHAR_DISTANCE))return VISUAL_HEBREW_NAME;@@ -263,9 +263,9 @@ namespace UniversalDetector.Corereturn LOGICAL_HEBREW_NAME;if (modelsub < -(MIN_MODEL_DISTANCE))return VISUAL_HEBREW_NAME;-+// Still no good, back to final letter distance, maybe it'll save the day.- if (finalsub < 0)+ if (finalsub < 0)return VISUAL_HEBREW_NAME;// (finalsub > 0 - Logical) or (don't know what to do) default to Logical.@@ -280,10 +280,10 @@ namespace UniversalDetector.CorebeforePrev = 0x20;}- public override ProbingState GetState()+ public override ProbingState GetState(){// Remain active as long as any of the model probers are active.- if (logicalProber.GetState() == ProbingState.NotMe &&+ if (logicalProber.GetState() == ProbingState.NotMe &&visualProber.GetState() == ProbingState.NotMe)return ProbingState.NotMe;return ProbingState.Detecting;@@ -293,31 +293,31 @@ namespace UniversalDetector.Core{//Console.WriteLine(" HEB: {0} - {1} [Logical-Visual score]", finalCharLogicalScore, finalCharVisualScore);}-+public override float GetConfidence()- {+ {return 0.0f;}-+protected static bool IsFinal(byte b){- return (b == FINAL_KAF || b == FINAL_MEM || b == FINAL_NUN- || b == FINAL_PE || b == FINAL_TSADI);+ return (b == FINAL_KAF || b == FINAL_MEM || b == FINAL_NUN+ || b == FINAL_PE || b == FINAL_TSADI);}-+protected static bool IsNonFinal(byte b){- // The normal Tsadi is not a good Non-Final letter due to words like- // 'lechotet' (to chat) containing an apostrophe after the tsadi. This- // apostrophe is converted to a space in FilterWithoutEnglishLetters causing- // the Non-Final tsadi to appear at an end of a word even though this is not+ // The normal Tsadi is not a good Non-Final letter due to words like+ // 'lechotet' (to chat) containing an apostrophe after the tsadi. This+ // apostrophe is converted to a space in FilterWithoutEnglishLetters causing+ // the Non-Final tsadi to appear at an end of a word even though this is not// the case in the original text.- // The letters Pe and Kaf rarely display a related behavior of not being a- // good Non-Final letter. Words like 'Pop', 'Winamp' and 'Mubarak' for- // example legally end with a Non-Final Pe or Kaf. However, the benefit of- // these letters as Non-Final letters outweighs the damage since these words- // are quite rare.- return (b == NORMAL_KAF || b == NORMAL_MEM || b == NORMAL_NUN+ // The letters Pe and Kaf rarely display a related behavior of not being a+ // good Non-Final letter. Words like 'Pop', 'Winamp' and 'Mubarak' for+ // example legally end with a Non-Final Pe or Kaf. However, the benefit of+ // these letters as Non-Final letters outweighs the damage since these words+ // are quite rare.+ return (b == NORMAL_KAF || b == NORMAL_MEM || b == NORMAL_NUN|| b == NORMAL_PE);}}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/JapaneseContextAnalyser.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/JapaneseContextAnalyser.csindex 93b9d7580c..7d28224c55 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/JapaneseContextAnalyser.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/JapaneseContextAnalyser.cs@@ -21,7 +21,7 @@* Contributor(s):* Shy Shalom <[email protected]>* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -48,7 +48,7 @@ namespace UniversalDetector.Core// hiragana frequency category table// This is hiragana 2-char sequence table, the number in each cell represents its frequency category- protected static byte[,] jp2CharContext = {+ protected static byte[,] jp2CharContext = {{ 0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,},{ 2,4,0,4,0,3,0,4,0,3,4,4,4,2,4,3,3,4,3,2,3,3,4,2,3,3,3,2,4,1,4,3,3,1,5,4,3,4,3,4,3,5,3,0,3,5,4,2,0,3,1,0,3,3,0,3,3,0,1,1,0,4,3,0,3,3,0,4,0,2,0,3,5,5,5,5,4,0,4,1,0,3,4,},{ 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,},@@ -133,35 +133,35 @@ namespace UniversalDetector.Core{ 0,4,0,4,0,4,0,3,0,4,4,3,4,2,4,3,2,0,4,4,4,3,5,3,5,3,3,2,4,2,4,3,4,3,1,4,0,2,3,4,4,4,3,3,3,4,4,4,3,4,1,3,4,3,2,1,2,1,3,3,3,4,4,3,3,5,0,4,0,3,0,4,3,3,3,2,1,0,3,0,0,3,3,},{ 0,4,0,3,0,3,0,3,0,3,5,5,3,3,3,3,4,3,4,3,3,3,4,4,4,3,3,3,3,4,3,5,3,3,1,3,2,4,5,5,5,5,4,3,4,5,5,3,2,2,3,3,3,3,2,3,3,1,2,3,2,4,3,3,3,4,0,4,0,2,0,4,3,2,2,1,2,0,3,0,0,4,1,},};-+// category counters, each integer counts sequence in its categoryint[] relSample = new int[CATEGORIES_NUM];// total sequence receivedint totalRel;-+// The order of previous charint lastCharOrder;- // if last byte in current buffer is not the last byte of a character,+ // if last byte in current buffer is not the last byte of a character,// we need to know how many byte to skip in next buffer.int needToSkipCharNum;- // If this flag is set to true, detection is done and conclusion has+ // If this flag is set to true, detection is done and conclusion has// been madebool done;-+public JapaneseContextAnalyser(){- Reset();+ Reset();}-+public float GetConfidence(){// This is just one way to calculate confidence. It works well for me.if (totalRel > MINIMUM_DATA_THRESHOLD)return ((float)(totalRel - relSample[0]))/totalRel;- else+ elsereturn DONT_KNOW;}@@ -170,15 +170,15 @@ namespace UniversalDetector.Coreint charLen = 0;int max = offset + len;-+if (done)return;- // The buffer we got is byte oriented, and a character may span+ // The buffer we got is byte oriented, and a character may span// more than one buffer. In case the last one or two byte in last- // buffer is not complete, we record how many byte needed to+ // buffer is not complete, we record how many byte needed to// complete that character and skip these bytes here. We can choose- // to record those bytes as well and analyse the character once it+ // to record those bytes as well and analyse the character once it// is complete, but since a character will not make much difference,// skipping it will simplify our logic and improve performance.for (int i = needToSkipCharNum+offset; i < max; ) {@@ -200,14 +200,14 @@ namespace UniversalDetector.Core}}}-+public void HandleOneChar(byte[] buf, int offset, int charLen){- if (totalRel > MAX_REL_THRESHOLD)+ if (totalRel > MAX_REL_THRESHOLD)done = true;- if (done)+ if (done)return;-+// Only 2-bytes characters are of our interestint order = (charLen == 2) ? GetOrder(buf, offset) : -1;if (order != -1 && lastCharOrder != -1) {@@ -217,7 +217,7 @@ namespace UniversalDetector.Core}lastCharOrder = order;}-+public void Reset(){totalRel = 0;@@ -228,18 +228,18 @@ namespace UniversalDetector.Coredone = false;}}-+protected abstract int GetOrder(byte[] buf, int offset, out int charLen);-+protected abstract int GetOrder(byte[] buf, int offset);-- public bool GotEnoughData()++ public bool GotEnoughData(){return totalRel > ENOUGH_REL_THRESHOLD;}-+}-+public class SJISContextAnalyser : JapaneseContextAnalyser{private const byte HIRAGANA_FIRST_BYTE = 0x82;@@ -247,10 +247,10 @@ namespace UniversalDetector.Coreprotected override int GetOrder(byte[] buf, int offset, out int charLen){//find out current char's byte length- if (buf[offset] >= 0x81 && buf[offset] <= 0x9F+ if (buf[offset] >= 0x81 && buf[offset] <= 0x9F|| buf[offset] >= 0xe0 && buf[offset] <= 0xFC)charLen = 2;- else+ elsecharLen = 1;// return its order if it is hiragana@@ -259,7 +259,7 @@ namespace UniversalDetector.Coreif (low >= 0x9F && low <= 0xF1)return low - 0x9F;}- return -1;+ return -1;}protected override int GetOrder(byte[] buf, int offset)@@ -274,15 +274,15 @@ namespace UniversalDetector.Core}}-+public class EUCJPContextAnalyser : JapaneseContextAnalyser{private const byte HIRAGANA_FIRST_BYTE = 0xA4;-+protected override int GetOrder(byte[] buf, int offset, out int charLen){byte high = buf[offset];-+//find out current char's byte lengthif (high == 0x8E || high >= 0xA1 && high <= 0xFE)charLen = 2;@@ -297,9 +297,9 @@ namespace UniversalDetector.Coreif (low >= 0xA1 && low <= 0xF3)return low - 0xA1;}- return -1;+ return -1;}-+protected override int GetOrder(byte[] buf, int offset){// We are only interested in Hiragana@@ -309,7 +309,7 @@ namespace UniversalDetector.Corereturn low - 0xA1;}return -1;- }+ }}}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangBulgarianModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangBulgarianModel.csindex 4b6729ed30..5b18480d24 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangBulgarianModel.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangBulgarianModel.cs@@ -21,7 +21,7 @@* Contributor(s):* Shy Shalom <[email protected]>* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -37,15 +37,15 @@* ***** END LICENSE BLOCK ***** */namespace UniversalDetector.Core-{+{public abstract class BulgarianModel : SequenceModel{- //Model Table:+ //Model Table://total sequences: 100%//first 512 sequences: 96.9392%//first 1024 sequences:3.0618%//rest sequences: 0.2992%- //negative sequences: 0.0020%+ //negative sequences: 0.0020%private static byte[] BULGARIAN_LANG_MODEL = {0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,2,2,3,2,2,1,2,2,@@ -175,15 +175,15 @@ namespace UniversalDetector.Core0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-+};- public BulgarianModel(byte[] charToOrderMap, string name)+ public BulgarianModel(byte[] charToOrderMap, string name): base(charToOrderMap, BULGARIAN_LANG_MODEL, 0.969392f, false, name){- }+ }}-+public class Latin5BulgarianModel : BulgarianModel{//255: Control characters that usually does not exist in any text@@ -191,7 +191,7 @@ namespace UniversalDetector.Core//253: symbol (punctuation) that does not belong to word//252: 0 - 9// Character Mapping Table:- // this table is modified base on win1251BulgarianCharToOrderMap, so+ // this table is modified base on win1251BulgarianCharToOrderMap, so// only number <64 is sure validprivate static byte[] LATIN5_CHAR_TO_ORDER_MAP = {255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, //00@@ -209,14 +209,14 @@ namespace UniversalDetector.Core39, 28, 34, 51, 48, 49, 53, 50, 54, 57, 61,239, 67,240, 60, 56, //c01, 18, 9, 20, 11, 3, 23, 15, 2, 26, 12, 10, 14, 6, 4, 13, //d07, 8, 5, 19, 29, 25, 22, 21, 27, 24, 17, 75, 52,241, 42, 16, //e0- 62,242,243,244, 58,245, 98,246,247,248,249,250,251, 91,252,253, //f0+ 62,242,243,244, 58,245, 98,246,247,248,249,250,251, 91,252,253, //f0};-+public Latin5BulgarianModel() : base(LATIN5_CHAR_TO_ORDER_MAP, "ISO-8859-5"){}}-+public class Win1251BulgarianModel : BulgarianModel{private static byte[] WIN1251__CHAR_TO_ORDER_MAP = {@@ -236,8 +236,8 @@ namespace UniversalDetector.Core39, 28, 34, 51, 48, 49, 53, 50, 54, 57, 61,251, 67,252, 60, 56, //d01, 18, 9, 20, 11, 3, 23, 15, 2, 26, 12, 10, 14, 6, 4, 13, //e07, 8, 5, 19, 29, 25, 22, 21, 27, 24, 17, 75, 52,253, 42, 16, //f0- };-+ };+public Win1251BulgarianModel() : base(WIN1251__CHAR_TO_ORDER_MAP, "windows-1251"){}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangCyrillicModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangCyrillicModel.csindex 5e55a48390..1210b6d5d1 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangCyrillicModel.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangCyrillicModel.cs@@ -21,7 +21,7 @@* Contributor(s):* Shy Shalom <[email protected]>* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -40,12 +40,12 @@ namespace UniversalDetector.Core{public abstract class CyrillicModel : SequenceModel{- // Model Table:+ // Model Table:// total sequences: 100%// first 512 sequences: 97.6601%// first 1024 sequences: 2.3389%// rest sequences: 0.1237%- // negative sequences: 0.0009%+ // negative sequences: 0.0009%protected readonly static byte[] RUSSIAN_LANG_MODEL = {0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,1,3,3,3,2,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,2,2,2,2,2,0,0,2,@@ -176,13 +176,13 @@ namespace UniversalDetector.Core0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,};-- public CyrillicModel(byte[] charToOrderMap, string name)++ public CyrillicModel(byte[] charToOrderMap, string name): base(charToOrderMap, RUSSIAN_LANG_MODEL, 0.976601f, false, name){}}-+public class Koi8rModel : CyrillicModel{private readonly static byte[] KOI8R_CHAR_TO_ORDER_MAP = {@@ -203,12 +203,12 @@ namespace UniversalDetector.Core59, 37, 44, 58, 41, 48, 53, 46, 55, 42, 60, 36, 49, 38, 31, 34, //e035, 43, 45, 32, 40, 52, 56, 33, 61, 62, 51, 57, 47, 63, 50, 70, //f0};-+public Koi8rModel() : base(KOI8R_CHAR_TO_ORDER_MAP, "KOI8-R"){}}-+public class Win1251Model : CyrillicModel{private readonly static byte[] WIN1251_CHAR_TO_ORDER_MAP = {@@ -229,12 +229,12 @@ namespace UniversalDetector.Core3, 21, 10, 19, 13, 2, 24, 20, 4, 23, 11, 8, 12, 5, 1, 15,9, 7, 6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,};-+public Win1251Model() : base(WIN1251_CHAR_TO_ORDER_MAP, "windows-1251"){}}-+public class Latin5Model : CyrillicModel{private readonly static byte[] LATIN5_CHAR_TO_ORDER_MAP = {@@ -254,13 +254,13 @@ namespace UniversalDetector.Core3, 21, 10, 19, 13, 2, 24, 20, 4, 23, 11, 8, 12, 5, 1, 15,9, 7, 6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,239, 68,240,241,242,243,244,245,246,247,248,249,250,251,252,255,- };-+ };+public Latin5Model() : base(LATIN5_CHAR_TO_ORDER_MAP, "ISO-8859-5"){}}-+public class MacCyrillicModel : CyrillicModel{private readonly static byte[] MACCYRILLIC_CHAR_TO_ORDER_MAP = {@@ -281,7 +281,7 @@ namespace UniversalDetector.Core3, 21, 10, 19, 13, 2, 24, 20, 4, 23, 11, 8, 12, 5, 1, 15,9, 7, 6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27,255,};-+public MacCyrillicModel() : base(MACCYRILLIC_CHAR_TO_ORDER_MAP,"x-mac-cyrillic"){@@ -308,7 +308,7 @@ namespace UniversalDetector.Core43, 9, 45, 7, 32, 6, 40, 14, 52, 24, 56, 10, 33, 17, 61,249,250, 18, 62, 20, 51, 25, 57, 30, 47, 29, 63, 22, 50,251,252,255,};-+public Ibm855Model() : base(IBM855_BYTE_TO_ORDER_MAP, "IBM855"){}@@ -334,12 +334,12 @@ namespace UniversalDetector.Core9, 7, 6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,239, 68,240,241,242,243,244,245,246,247,248,249,250,251,252,255,};-+public Ibm866Model() : base(IBM866_CHAR_TO_ORDER_MAP, "IBM866"){}}--++}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangGreekModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangGreekModel.csindex 563ba52c20..2fe1e97c08 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangGreekModel.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangGreekModel.cs@@ -21,7 +21,7 @@* Contributor(s):* Shy Shalom <[email protected]>* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -37,15 +37,15 @@* ***** END LICENSE BLOCK ***** */namespace UniversalDetector.Core-{+{public abstract class GreekModel : SequenceModel{- // Model Table:+ // Model Table:// total sequences: 100%// first 512 sequences: 98.2851%// first 1024 sequences:1.7001%// rest sequences: 0.0359%- // negative sequences: 0.0148%+ // negative sequences: 0.0148%private readonly static byte[] GREEK_LANG_MODEL = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,@@ -177,12 +177,12 @@ namespace UniversalDetector.Core0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,};- public GreekModel(byte[] charToOrderMap, string name)+ public GreekModel(byte[] charToOrderMap, string name): base(charToOrderMap, GREEK_LANG_MODEL, 0.982851f, false, name){- }+ }}-+public class Latin7Model : GreekModel{/****************************************************************@@ -210,12 +210,12 @@ namespace UniversalDetector.Core124, 1, 29, 20, 21, 3, 32, 13, 25, 5, 11, 16, 10, 6, 30, 4, //e09, 8, 14, 7, 2, 12, 28, 23, 42, 24, 64, 75, 19, 26, 27,253, //f0};-+public Latin7Model() : base(LATIN7_CHAR_TO_ORDER_MAP, "ISO-8859-7"){}}-+public class Win1253Model : GreekModel{private readonly static byte[] WIN1253__CHAR_TO_ORDER_MAP = {@@ -235,8 +235,8 @@ namespace UniversalDetector.Core35, 48,250, 37, 33, 45, 56, 50, 84, 57,120,121, 17, 18, 22, 15, //d0124, 1, 29, 20, 21, 3, 32, 13, 25, 5, 11, 16, 10, 6, 30, 4, //e09, 8, 14, 7, 2, 12, 28, 23, 42, 24, 64, 75, 19, 26, 27,253, //f0- };-+ };+public Win1253Model() : base(WIN1253__CHAR_TO_ORDER_MAP, "windows-1253"){}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangHebrewModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangHebrewModel.csindex 030fcc5988..180ab8a637 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangHebrewModel.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangHebrewModel.cs@@ -37,15 +37,15 @@* ***** END LICENSE BLOCK ***** */namespace UniversalDetector.Core-{+{public abstract class HebrewModel : SequenceModel{- //Model Table:+ //Model Table://total sequences: 100%//first 512 sequences: 98.4004%//first 1024 sequences: 1.5981%//rest sequences: 0.087%- //negative sequences: 0.0015%+ //negative sequences: 0.0015%private readonly static byte[] HEBREW_LANG_MODEL = {0,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,2,3,2,1,2,0,1,0,0,3,0,3,1,0,0,1,3,2,0,1,1,2,0,2,2,2,1,1,1,1,2,1,1,1,2,0,0,2,2,0,1,@@ -177,12 +177,12 @@ namespace UniversalDetector.Core0,0,0,0,0,0,0,0,0,0,1,2,1,0,0,0,0,0,1,1,1,1,1,0,1,0,0,0,1,1,0,0,};- public HebrewModel(byte[] charToOrderMap, string name)+ public HebrewModel(byte[] charToOrderMap, string name): base(charToOrderMap, HEBREW_LANG_MODEL, 0.984004f, false, name){- }+ }}-+public class Win1255Model : HebrewModel{/*@@ -192,7 +192,7 @@ namespace UniversalDetector.Core252: 0 - 9*///Windows-1255 language model- //Character Mapping Table:+ //Character Mapping Table:private readonly static byte[] WIN1255_CHAR_TO_ORDER_MAP = {255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, //00255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, //10@@ -211,7 +211,7 @@ namespace UniversalDetector.Core9, 8, 20, 16, 3, 2, 24, 14, 22, 1, 25, 15, 4, 11, 6, 23,12, 19, 13, 26, 18, 27, 21, 17, 7, 10, 5,251,252,128, 96,253,};-+public Win1255Model() : base(WIN1255_CHAR_TO_ORDER_MAP, "windows-1255"){}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangHungarianModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangHungarianModel.csindex d7eee2251b..d95ec4c8e5 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangHungarianModel.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangHungarianModel.cs@@ -36,15 +36,15 @@* ***** END LICENSE BLOCK ***** */namespace UniversalDetector.Core-{+{public abstract class HungarianModel : SequenceModel{- //Model Table:+ //Model Table://total sequences: 100%//first 512 sequences: 94.7368%//first 1024 sequences:5.2623%//rest sequences: 0.8894%- //negative sequences: 0.0009%+ //negative sequences: 0.0009%private readonly static byte[] HUNGARIAN_LANG_MODEL = {0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,2,3,3,1,1,2,2,2,2,2,1,2,@@ -176,13 +176,13 @@ namespace UniversalDetector.Core0,1,1,1,1,1,1,0,1,1,0,1,0,1,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,};- public HungarianModel(byte[] charToOrderMap, string name)- : base(charToOrderMap, HUNGARIAN_LANG_MODEL, 0.947368f,+ public HungarianModel(byte[] charToOrderMap, string name)+ : base(charToOrderMap, HUNGARIAN_LANG_MODEL, 0.947368f,false, name){- }+ }}-+public class Latin2HungarianModel : HungarianModel{private readonly static byte[] LATIN2_CHAR_TO_ORDER_MAP = {@@ -203,12 +203,12 @@ namespace UniversalDetector.Core82, 14, 74,242, 70, 80,243, 72,244, 15, 83, 77, 84, 30, 76, 85,245,246,247, 25, 73, 42, 24,248,249,250, 31, 56, 29,251,252,253,};-+public Latin2HungarianModel() : base(LATIN2_CHAR_TO_ORDER_MAP, "ISO-8859-2"){}}-+public class Win1250HungarianModel : HungarianModel{private readonly static byte[] WIN1250_CHAR_TO_ORDER_MAP = {@@ -229,7 +229,7 @@ namespace UniversalDetector.Core84, 14, 75,242, 71, 82,243, 73,244, 15, 85, 79, 86, 30, 77, 87,245,246,247, 25, 74, 42, 24,248,249,250, 31, 56, 29,251,252,253,};-+public Win1250HungarianModel() : base(WIN1250_CHAR_TO_ORDER_MAP, "windows-1250"){}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangThaiModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangThaiModel.csindex bdda20f142..b5dae7a341 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangThaiModel.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangThaiModel.cs@@ -21,7 +21,7 @@* Contributor(s):* Shy Shalom <[email protected]>* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -37,7 +37,7 @@* ***** END LICENSE BLOCK ***** */namespace UniversalDetector.Core-{+{public class ThaiModel : SequenceModel{/****************************************************************@@ -46,7 +46,7 @@ namespace UniversalDetector.Core253: symbol (punctuation) that does not belong to word252: 0 - 9*****************************************************************/- // The following result for thai was collected from a limited sample (1M)+ // The following result for thai was collected from a limited sample (1M)private readonly static byte[] TIS620_CHAR_TO_ORDER_MAP = {255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, //00255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, //10@@ -66,12 +66,12 @@ namespace UniversalDetector.Core68, 56, 59, 65, 69, 60, 70, 80, 71, 87,248,249,250,251,252,253,};- //Model Table:+ //Model Table://total sequences: 100%//first 512 sequences: 92.6386%//first 1024 sequences:7.3177%//rest sequences: 1.0230%- //negative sequences: 0.0436%+ //negative sequences: 0.0436%private readonly static byte[] THAI_LANG_MODEL = {0,1,3,3,3,3,0,0,3,3,0,3,3,0,3,3,3,3,3,3,3,3,0,0,3,3,3,0,3,3,3,3,0,3,3,0,0,0,1,3,0,3,3,2,3,3,0,1,2,3,3,3,3,0,2,0,2,0,0,3,2,1,2,2,@@ -203,11 +203,11 @@ namespace UniversalDetector.Core0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,};- public ThaiModel(byte[] charToOrderMap, string name)- : base(TIS620_CHAR_TO_ORDER_MAP, THAI_LANG_MODEL,+ public ThaiModel(byte[] charToOrderMap, string name)+ : base(TIS620_CHAR_TO_ORDER_MAP, THAI_LANG_MODEL,0.926386f, false, "TIS-620"){- }+ }}}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Latin1Prober.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Latin1Prober.csindex c79a10aa77..5d57e30e1f 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Latin1Prober.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Latin1Prober.cs@@ -21,7 +21,7 @@* Contributor(s):* Shy Shalom <[email protected]>* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -40,7 +40,7 @@ using System;namespace UniversalDetector.Core{- // TODO: Using trigrams the detector should be able to discriminate between+ // TODO: Using trigrams the detector should be able to discriminate between// latin-1 and iso8859-2public class Latin1Prober : CharsetProber{@@ -54,9 +54,9 @@ namespace UniversalDetector.Coreprivate const int ACO = 5; // accent capital otherprivate const int ASV = 6; // accent small vowelprivate const int ASO = 7; // accent small other-+private const int CLASS_NUM = 8; // total classes-+private readonly static byte[] Latin1_CharToClass = {OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, // 00 - 07OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, // 08 - 0F@@ -92,36 +92,36 @@ namespace UniversalDetector.CoreASV, ASV, ASV, ASV, ASV, ASO, ASO, ASO, // F8 - FF};- /* 0 : illegal- 1 : very unlikely- 2 : normal+ /* 0 : illegal+ 1 : very unlikely+ 2 : normal3 : very likely*/private readonly static byte[] Latin1ClassModel = {/* UDF OTH ASC ASS ACV ACO ASV ASO *//*UDF*/ 0, 0, 0, 0, 0, 0, 0, 0,/*OTH*/ 0, 3, 3, 3, 3, 3, 3, 3,- /*ASC*/ 0, 3, 3, 3, 3, 3, 3, 3,+ /*ASC*/ 0, 3, 3, 3, 3, 3, 3, 3,/*ASS*/ 0, 3, 3, 3, 1, 1, 3, 3,/*ACV*/ 0, 3, 3, 3, 1, 2, 1, 2,- /*ACO*/ 0, 3, 3, 3, 3, 3, 3, 3,- /*ASV*/ 0, 3, 1, 3, 1, 1, 1, 3,+ /*ACO*/ 0, 3, 3, 3, 3, 3, 3, 3,+ /*ASV*/ 0, 3, 1, 3, 1, 1, 1, 3,/*ASO*/ 0, 3, 1, 3, 1, 1, 3, 3,};private byte lastCharClass;private int[] freqCounter = new int[FREQ_CAT_NUM];-+public Latin1Prober(){Reset();}- public override string GetCharsetName()+ public override string GetCharsetName(){return "windows-1252";}-+public override void Reset(){state = ProbingState.Detecting;@@ -129,12 +129,12 @@ namespace UniversalDetector.Corefor (int i = 0; i < FREQ_CAT_NUM; i++)freqCounter[i] = 0;}-+public override ProbingState HandleData(byte[] buf, int offset, int len){byte[] newbuf = FilterWithEnglishLetters(buf, offset, len);byte charClass, freq;-+for (int i = 0; i < newbuf.Length; i++) {charClass = Latin1_CharToClass[newbuf[i]];freq = Latin1ClassModel[lastCharClass * CLASS_NUM + charClass];@@ -152,21 +152,21 @@ namespace UniversalDetector.Core{if (state == ProbingState.NotMe)return 0.01f;-+float confidence = 0.0f;int total = 0;for (int i = 0; i < FREQ_CAT_NUM; i++) {total += freqCounter[i];}-+if (total <= 0) {confidence = 0.0f;} else {confidence = freqCounter[3] * 1.0f / total;confidence -= freqCounter[1] * 20.0f / total;}-- // lower the confidence of latin1 so that other more accurate detector++ // lower the confidence of latin1 so that other more accurate detector// can take priority.return confidence < 0.0f ? 0.0f : confidence * 0.5f;}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSGroupProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSGroupProber.csindex abf49aacd0..b4f6928a46 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSGroupProber.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSGroupProber.cs@@ -21,7 +21,7 @@* Contributor(s):* Shy Shalom <[email protected]>* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -46,13 +46,13 @@ namespace UniversalDetector.Corepublic class MBCSGroupProber : CharsetProber{private const int PROBERS_NUM = 7;- private readonly static string[] ProberName =+ private readonly static string[] ProberName ={ "UTF8", "SJIS", "EUCJP", "GB18030", "EUCKR", "Big5", "EUCTW" };private CharsetProber[] probers = new CharsetProber[PROBERS_NUM];private bool[] isActive = new bool[PROBERS_NUM];private int bestGuess;private int activeNum;-+public MBCSGroupProber(){probers[0] = new UTF8Prober();@@ -62,7 +62,7 @@ namespace UniversalDetector.Coreprobers[4] = new EUCKRProber();probers[5] = new Big5Prober();probers[6] = new EUCTWProber();- Reset();+ Reset();}public override string GetCharsetName()@@ -99,7 +99,7 @@ namespace UniversalDetector.Core//assume previous is not ascii, it will do no harm except add some noisebool keepNext = true;int max = offset + len;-+for (int i = offset; i < max; i++) {if ((buf[i] & 0x80) != 0) {highbyteBuf[hptr++] = buf[i];@@ -112,9 +112,9 @@ namespace UniversalDetector.Core}}}-+ProbingState st = ProbingState.NotMe;-+for (int i = 0; i < probers.Length; i++) {if (!isActive[i])continue;@@ -139,7 +139,7 @@ namespace UniversalDetector.Core{float bestConf = 0.0f;float cf = 0.0f;-+if (state == ProbingState.FoundIt) {return 0.99f;} else if (state == ProbingState.NotMe) {diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSSM.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSSM.csindex 7aa8581bca..65e04292ab 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSSM.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSSM.cs@@ -42,79 +42,79 @@ namespace UniversalDetector.Core{private readonly static int[] UTF8_cls = {BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 00 - 07- BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17- BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 30 - 37- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 38 - 3f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 40 - 47- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 48 - 4f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 50 - 57- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 58 - 5f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 60 - 67- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 68 - 6f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 70 - 77- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 78 - 7f- BitPackage.Pack4bits(2,2,2,2,3,3,3,3), // 80 - 87- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 88 - 8f- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 90 - 97- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 98 - 9f- BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // a0 - a7- BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // a8 - af- BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // b0 - b7- BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // b8 - bf- BitPackage.Pack4bits(0,0,6,6,6,6,6,6), // c0 - c7- BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // c8 - cf- BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // d0 - d7- BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // d8 - df- BitPackage.Pack4bits(7,8,8,8,8,8,8,8), // e0 - e7- BitPackage.Pack4bits(8,8,8,8,8,9,8,8), // e8 - ef- BitPackage.Pack4bits(10,11,11,11,11,11,11,11), // f0 - f7- BitPackage.Pack4bits(12,13,13,13,14,15,0,0) // f8 - ff+ BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17+ BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 30 - 37+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 38 - 3f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 40 - 47+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 48 - 4f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 50 - 57+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 58 - 5f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 60 - 67+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 68 - 6f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 70 - 77+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 78 - 7f+ BitPackage.Pack4bits(2,2,2,2,3,3,3,3), // 80 - 87+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 88 - 8f+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 90 - 97+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 98 - 9f+ BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // a0 - a7+ BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // a8 - af+ BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // b0 - b7+ BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // b8 - bf+ BitPackage.Pack4bits(0,0,6,6,6,6,6,6), // c0 - c7+ BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // c8 - cf+ BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // d0 - d7+ BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // d8 - df+ BitPackage.Pack4bits(7,8,8,8,8,8,8,8), // e0 - e7+ BitPackage.Pack4bits(8,8,8,8,8,9,8,8), // e8 - ef+ BitPackage.Pack4bits(10,11,11,11,11,11,11,11), // f0 - f7+ BitPackage.Pack4bits(12,13,13,13,14,15,0,0) // f8 - ff};private readonly static int[] UTF8_st = {- BitPackage.Pack4bits(ERROR,START,ERROR,ERROR,ERROR,ERROR, 12, 10),//00-07- BitPackage.Pack4bits( 9, 11, 8, 7, 6, 5, 4, 3),//08-0f- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//10-17- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//18-1f- BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME),//20-27- BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME),//28-2f- BitPackage.Pack4bits(ERROR,ERROR, 5, 5, 5, 5,ERROR,ERROR),//30-37- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//38-3f- BitPackage.Pack4bits(ERROR,ERROR,ERROR, 5, 5, 5,ERROR,ERROR),//40-47- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//48-4f- BitPackage.Pack4bits(ERROR,ERROR, 7, 7, 7, 7,ERROR,ERROR),//50-57- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//58-5f- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR, 7, 7,ERROR,ERROR),//60-67- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//68-6f- BitPackage.Pack4bits(ERROR,ERROR, 9, 9, 9, 9,ERROR,ERROR),//70-77- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//78-7f- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR, 9,ERROR,ERROR),//80-87- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//88-8f- BitPackage.Pack4bits(ERROR,ERROR, 12, 12, 12, 12,ERROR,ERROR),//90-97- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//98-9f- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR, 12,ERROR,ERROR),//a0-a7- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//a8-af- BitPackage.Pack4bits(ERROR,ERROR, 12, 12, 12,ERROR,ERROR,ERROR),//b0-b7- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//b8-bf- BitPackage.Pack4bits(ERROR,ERROR,START,START,START,START,ERROR,ERROR),//c0-c7- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR) //c8-cf+ BitPackage.Pack4bits(ERROR,START,ERROR,ERROR,ERROR,ERROR, 12, 10),//00-07+ BitPackage.Pack4bits( 9, 11, 8, 7, 6, 5, 4, 3),//08-0f+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//10-17+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//18-1f+ BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME),//20-27+ BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME),//28-2f+ BitPackage.Pack4bits(ERROR,ERROR, 5, 5, 5, 5,ERROR,ERROR),//30-37+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//38-3f+ BitPackage.Pack4bits(ERROR,ERROR,ERROR, 5, 5, 5,ERROR,ERROR),//40-47+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//48-4f+ BitPackage.Pack4bits(ERROR,ERROR, 7, 7, 7, 7,ERROR,ERROR),//50-57+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//58-5f+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR, 7, 7,ERROR,ERROR),//60-67+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//68-6f+ BitPackage.Pack4bits(ERROR,ERROR, 9, 9, 9, 9,ERROR,ERROR),//70-77+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//78-7f+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR, 9,ERROR,ERROR),//80-87+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//88-8f+ BitPackage.Pack4bits(ERROR,ERROR, 12, 12, 12, 12,ERROR,ERROR),//90-97+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//98-9f+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR, 12,ERROR,ERROR),//a0-a7+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//a8-af+ BitPackage.Pack4bits(ERROR,ERROR, 12, 12, 12,ERROR,ERROR,ERROR),//b0-b7+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//b8-bf+ BitPackage.Pack4bits(ERROR,ERROR,START,START,START,START,ERROR,ERROR),//c0-c7+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR) //c8-cf};- private readonly static int[] UTF8CharLenTable =+ private readonly static int[] UTF8CharLenTable ={0, 1, 0, 0, 0, 0, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6 };-+public UTF8SMModel() : base(- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, UTF8_cls),16,- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, UTF8_st),UTF8CharLenTable, "UTF-8")@@ -122,68 +122,68 @@ namespace UniversalDetector.Core}}-+public class GB18030SMModel : SMModel{private readonly static int[] GB18030_cls = {- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 00 - 07- BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17- BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 30 - 37- BitPackage.Pack4bits(3,3,1,1,1,1,1,1), // 38 - 3f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 40 - 47- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 48 - 4f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 50 - 57- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 58 - 5f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 60 - 67- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 68 - 6f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 70 - 77- BitPackage.Pack4bits(2,2,2,2,2,2,2,4), // 78 - 7f- BitPackage.Pack4bits(5,6,6,6,6,6,6,6), // 80 - 87- BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // 88 - 8f- BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // 90 - 97- BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // 98 - 9f- BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // a0 - a7- BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // a8 - af- BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // b0 - b7- BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // b8 - bf- BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // c0 - c7- BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // c8 - cf- BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // d0 - d7- BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // d8 - df- BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // e0 - e7- BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // e8 - ef- BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // f0 - f7- BitPackage.Pack4bits(6,6,6,6,6,6,6,0) // f8 - ff+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 00 - 07+ BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17+ BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 30 - 37+ BitPackage.Pack4bits(3,3,1,1,1,1,1,1), // 38 - 3f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 40 - 47+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 48 - 4f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 50 - 57+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 58 - 5f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 60 - 67+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 68 - 6f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 70 - 77+ BitPackage.Pack4bits(2,2,2,2,2,2,2,4), // 78 - 7f+ BitPackage.Pack4bits(5,6,6,6,6,6,6,6), // 80 - 87+ BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // 88 - 8f+ BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // 90 - 97+ BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // 98 - 9f+ BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // a0 - a7+ BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // a8 - af+ BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // b0 - b7+ BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // b8 - bf+ BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // c0 - c7+ BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // c8 - cf+ BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // d0 - d7+ BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // d8 - df+ BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // e0 - e7+ BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // e8 - ef+ BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // f0 - f7+ BitPackage.Pack4bits(6,6,6,6,6,6,6,0) // f8 - ff};private readonly static int[] GB18030_st = {- BitPackage.Pack4bits(ERROR,START,START,START,START,START, 3,ERROR),//00-07- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ITSME,ITSME),//08-0f- BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ITSME,ERROR,ERROR,START),//10-17- BitPackage.Pack4bits( 4,ERROR,START,START,ERROR,ERROR,ERROR,ERROR),//18-1f- BitPackage.Pack4bits(ERROR,ERROR, 5,ERROR,ERROR,ERROR,ITSME,ERROR),//20-27- BitPackage.Pack4bits(ERROR,ERROR,START,START,START,START,START,START) //28-2f+ BitPackage.Pack4bits(ERROR,START,START,START,START,START, 3,ERROR),//00-07+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ITSME,ITSME),//08-0f+ BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ITSME,ERROR,ERROR,START),//10-17+ BitPackage.Pack4bits( 4,ERROR,START,START,ERROR,ERROR,ERROR,ERROR),//18-1f+ BitPackage.Pack4bits(ERROR,ERROR, 5,ERROR,ERROR,ERROR,ITSME,ERROR),//20-27+ BitPackage.Pack4bits(ERROR,ERROR,START,START,START,START,START,START) //28-2f};- // To be accurate, the length of class 6 can be either 2 or 4.- // But it is not necessary to discriminate between the two since- // it is used for frequency analysis only, and we are validating- // each code range there as well. So it is safe to set it to be- // 2 here.+ // To be accurate, the length of class 6 can be either 2 or 4.+ // But it is not necessary to discriminate between the two since+ // it is used for frequency analysis only, and we are validating+ // each code range there as well. So it is safe to set it to be+ // 2 here.private readonly static int[] GB18030CharLenTable = {0, 1, 1, 1, 1, 1, 2};-+public GB18030SMModel() : base(- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, GB18030_cls),7,- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, GB18030_st),GB18030CharLenTable, "GB18030")@@ -191,60 +191,60 @@ namespace UniversalDetector.Core}}-+public class BIG5SMModel : SMModel{private readonly static int[] BIG5_cls = {BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 00 - 07- BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17- BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 30 - 37- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 38 - 3f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 40 - 47- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 48 - 4f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 50 - 57- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 58 - 5f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 60 - 67- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 68 - 6f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 70 - 77- BitPackage.Pack4bits(2,2,2,2,2,2,2,1), // 78 - 7f- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 80 - 87- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 88 - 8f- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 90 - 97- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 98 - 9f- BitPackage.Pack4bits(4,3,3,3,3,3,3,3), // a0 - a7- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // a8 - af- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // b0 - b7- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // b8 - bf- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // c0 - c7- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // c8 - cf- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // d0 - d7- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // d8 - df- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e0 - e7- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e8 - ef- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // f0 - f7- BitPackage.Pack4bits(3,3,3,3,3,3,3,0) // f8 - ff+ BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17+ BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 30 - 37+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 38 - 3f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 40 - 47+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 48 - 4f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 50 - 57+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 58 - 5f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 60 - 67+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 68 - 6f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 70 - 77+ BitPackage.Pack4bits(2,2,2,2,2,2,2,1), // 78 - 7f+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 80 - 87+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 88 - 8f+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 90 - 97+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 98 - 9f+ BitPackage.Pack4bits(4,3,3,3,3,3,3,3), // a0 - a7+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // a8 - af+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // b0 - b7+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // b8 - bf+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // c0 - c7+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // c8 - cf+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // d0 - d7+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // d8 - df+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e0 - e7+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e8 - ef+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // f0 - f7+ BitPackage.Pack4bits(3,3,3,3,3,3,3,0) // f8 - ff};private readonly static int[] BIG5_st = {- BitPackage.Pack4bits(ERROR,START,START, 3,ERROR,ERROR,ERROR,ERROR),//00-07- BitPackage.Pack4bits(ERROR,ERROR,ITSME,ITSME,ITSME,ITSME,ITSME,ERROR),//08-0f- BitPackage.Pack4bits(ERROR,START,START,START,START,START,START,START) //10-17+ BitPackage.Pack4bits(ERROR,START,START, 3,ERROR,ERROR,ERROR,ERROR),//00-07+ BitPackage.Pack4bits(ERROR,ERROR,ITSME,ITSME,ITSME,ITSME,ITSME,ERROR),//08-0f+ BitPackage.Pack4bits(ERROR,START,START,START,START,START,START,START) //10-17};private readonly static int[] BIG5CharLenTable = {0, 1, 1, 2, 0};-+public BIG5SMModel() : base(- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, BIG5_cls),5,- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, BIG5_st),BIG5CharLenTable, "Big5")@@ -252,63 +252,63 @@ namespace UniversalDetector.Core}}-+public class EUCJPSMModel : SMModel{private readonly static int[] EUCJP_cls = {- //BitPacket.Pack4bits(5,4,4,4,4,4,4,4), // 00 - 07- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 00 - 07- BitPackage.Pack4bits(4,4,4,4,4,4,5,5), // 08 - 0f- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 10 - 17- BitPackage.Pack4bits(4,4,4,5,4,4,4,4), // 18 - 1f- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 20 - 27- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 28 - 2f- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 30 - 37- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 38 - 3f- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 40 - 47- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 48 - 4f- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 50 - 57- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 58 - 5f- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 60 - 67- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 68 - 6f- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 70 - 77- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 78 - 7f- BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // 80 - 87- BitPackage.Pack4bits(5,5,5,5,5,5,1,3), // 88 - 8f- BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // 90 - 97- BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // 98 - 9f- BitPackage.Pack4bits(5,2,2,2,2,2,2,2), // a0 - a7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e0 - e7- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e8 - ef- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // f0 - f7- BitPackage.Pack4bits(0,0,0,0,0,0,0,5) // f8 - ff+ //BitPacket.Pack4bits(5,4,4,4,4,4,4,4), // 00 - 07+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 00 - 07+ BitPackage.Pack4bits(4,4,4,4,4,4,5,5), // 08 - 0f+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 10 - 17+ BitPackage.Pack4bits(4,4,4,5,4,4,4,4), // 18 - 1f+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 20 - 27+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 28 - 2f+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 30 - 37+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 38 - 3f+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 40 - 47+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 48 - 4f+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 50 - 57+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 58 - 5f+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 60 - 67+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 68 - 6f+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 70 - 77+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 78 - 7f+ BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // 80 - 87+ BitPackage.Pack4bits(5,5,5,5,5,5,1,3), // 88 - 8f+ BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // 90 - 97+ BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // 98 - 9f+ BitPackage.Pack4bits(5,2,2,2,2,2,2,2), // a0 - a7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e0 - e7+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e8 - ef+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // f0 - f7+ BitPackage.Pack4bits(0,0,0,0,0,0,0,5) // f8 - ff};private readonly static int[] EUCJP_st = {- BitPackage.Pack4bits( 3, 4, 3, 5,START,ERROR,ERROR,ERROR),//00-07- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f- BitPackage.Pack4bits(ITSME,ITSME,START,ERROR,START,ERROR,ERROR,ERROR),//10-17- BitPackage.Pack4bits(ERROR,ERROR,START,ERROR,ERROR,ERROR, 3,ERROR),//18-1f- BitPackage.Pack4bits( 3,ERROR,ERROR,ERROR,START,START,START,START) //20-27+ BitPackage.Pack4bits( 3, 4, 3, 5,START,ERROR,ERROR,ERROR),//00-07+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f+ BitPackage.Pack4bits(ITSME,ITSME,START,ERROR,START,ERROR,ERROR,ERROR),//10-17+ BitPackage.Pack4bits(ERROR,ERROR,START,ERROR,ERROR,ERROR, 3,ERROR),//18-1f+ BitPackage.Pack4bits( 3,ERROR,ERROR,ERROR,START,START,START,START) //20-27};private readonly static int[] EUCJPCharLenTable = { 2, 2, 2, 3, 1, 0 };-+public EUCJPSMModel() : base(- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, EUCJP_cls),6,- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, EUCJP_st),EUCJPCharLenTable, "EUC-JP")@@ -316,60 +316,60 @@ namespace UniversalDetector.Core}}-+public class EUCKRSMModel : SMModel{private readonly static int[] EUCKR_cls = {- //BitPacket.Pack4bits(0,1,1,1,1,1,1,1), // 00 - 07- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 00 - 07- BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17- BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 30 - 37- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 38 - 3f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 40 - 47- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 48 - 4f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 50 - 57- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 58 - 5f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 60 - 67- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 68 - 6f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 70 - 77- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 78 - 7f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 80 - 87- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 88 - 8f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 90 - 97- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 98 - 9f- BitPackage.Pack4bits(0,2,2,2,2,2,2,2), // a0 - a7- BitPackage.Pack4bits(2,2,2,2,2,3,3,3), // a8 - af- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7- BitPackage.Pack4bits(2,3,2,2,2,2,2,2), // c8 - cf- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e0 - e7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e8 - ef- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // f0 - f7- BitPackage.Pack4bits(2,2,2,2,2,2,2,0) // f8 - ff+ //BitPacket.Pack4bits(0,1,1,1,1,1,1,1), // 00 - 07+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 00 - 07+ BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17+ BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 30 - 37+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 38 - 3f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 40 - 47+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 48 - 4f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 50 - 57+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 58 - 5f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 60 - 67+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 68 - 6f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 70 - 77+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 78 - 7f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 80 - 87+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 88 - 8f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 90 - 97+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 98 - 9f+ BitPackage.Pack4bits(0,2,2,2,2,2,2,2), // a0 - a7+ BitPackage.Pack4bits(2,2,2,2,2,3,3,3), // a8 - af+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7+ BitPackage.Pack4bits(2,3,2,2,2,2,2,2), // c8 - cf+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e0 - e7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e8 - ef+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // f0 - f7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,0) // f8 - ff};private readonly static int[] EUCKR_st = {- BitPackage.Pack4bits(ERROR,START, 3,ERROR,ERROR,ERROR,ERROR,ERROR),//00-07- BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ERROR,ERROR,START,START) //08-0f+ BitPackage.Pack4bits(ERROR,START, 3,ERROR,ERROR,ERROR,ERROR,ERROR),//00-07+ BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ERROR,ERROR,START,START) //08-0f};private readonly static int[] EUCKRCharLenTable = { 0, 1, 2, 0 };-+public EUCKRSMModel() : base(- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, EUCKR_cls),4,- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, EUCKR_st),EUCKRCharLenTable, "EUC-KR")@@ -377,127 +377,127 @@ namespace UniversalDetector.Core}}-+public class EUCTWSMModel : SMModel{private readonly static int[] EUCTW_cls = {- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 00 - 07- BitPackage.Pack4bits(2,2,2,2,2,2,0,0), // 08 - 0f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 10 - 17- BitPackage.Pack4bits(2,2,2,0,2,2,2,2), // 18 - 1f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 20 - 27- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 28 - 2f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 30 - 37- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 38 - 3f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 40 - 47- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 48 - 4f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 50 - 57- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 58 - 5f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 60 - 67- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 68 - 6f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 70 - 77- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 78 - 7f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 80 - 87- BitPackage.Pack4bits(0,0,0,0,0,0,6,0), // 88 - 8f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 90 - 97- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 98 - 9f- BitPackage.Pack4bits(0,3,4,4,4,4,4,4), // a0 - a7- BitPackage.Pack4bits(5,5,1,1,1,1,1,1), // a8 - af- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // b0 - b7- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // b8 - bf- BitPackage.Pack4bits(1,1,3,1,3,3,3,3), // c0 - c7- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // c8 - cf- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // d0 - d7- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // d8 - df- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e0 - e7- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e8 - ef- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // f0 - f7- BitPackage.Pack4bits(3,3,3,3,3,3,3,0) // f8 - ff+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 00 - 07+ BitPackage.Pack4bits(2,2,2,2,2,2,0,0), // 08 - 0f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 10 - 17+ BitPackage.Pack4bits(2,2,2,0,2,2,2,2), // 18 - 1f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 20 - 27+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 28 - 2f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 30 - 37+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 38 - 3f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 40 - 47+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 48 - 4f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 50 - 57+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 58 - 5f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 60 - 67+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 68 - 6f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 70 - 77+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 78 - 7f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 80 - 87+ BitPackage.Pack4bits(0,0,0,0,0,0,6,0), // 88 - 8f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 90 - 97+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 98 - 9f+ BitPackage.Pack4bits(0,3,4,4,4,4,4,4), // a0 - a7+ BitPackage.Pack4bits(5,5,1,1,1,1,1,1), // a8 - af+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // b0 - b7+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // b8 - bf+ BitPackage.Pack4bits(1,1,3,1,3,3,3,3), // c0 - c7+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // c8 - cf+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // d0 - d7+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // d8 - df+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e0 - e7+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e8 - ef+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // f0 - f7+ BitPackage.Pack4bits(3,3,3,3,3,3,3,0) // f8 - ff};private readonly static int[] EUCTW_st = {- BitPackage.Pack4bits(ERROR,ERROR,START, 3, 3, 3, 4,ERROR),//00-07- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ITSME,ITSME),//08-0f- BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ITSME,ERROR,START,ERROR),//10-17- BitPackage.Pack4bits(START,START,START,ERROR,ERROR,ERROR,ERROR,ERROR),//18-1f- BitPackage.Pack4bits( 5,ERROR,ERROR,ERROR,START,ERROR,START,START),//20-27- BitPackage.Pack4bits(START,ERROR,START,START,START,START,START,START) //28-2f+ BitPackage.Pack4bits(ERROR,ERROR,START, 3, 3, 3, 4,ERROR),//00-07+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ITSME,ITSME),//08-0f+ BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ITSME,ERROR,START,ERROR),//10-17+ BitPackage.Pack4bits(START,START,START,ERROR,ERROR,ERROR,ERROR,ERROR),//18-1f+ BitPackage.Pack4bits( 5,ERROR,ERROR,ERROR,START,ERROR,START,START),//20-27+ BitPackage.Pack4bits(START,ERROR,START,START,START,START,START,START) //28-2f};private readonly static int[] EUCTWCharLenTable = { 0, 0, 1, 2, 2, 2, 3 };-+public EUCTWSMModel() : base(- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, EUCTW_cls),7,- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, EUCTW_st),EUCTWCharLenTable, "EUC-TW"){}- }-+ }+public class SJISSMModel : SMModel{private readonly static int[] SJIS_cls = {- //BitPacket.Pack4bits(0,1,1,1,1,1,1,1), // 00 - 07- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 00 - 07- BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17- BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 30 - 37- BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 38 - 3f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 40 - 47- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 48 - 4f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 50 - 57- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 58 - 5f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 60 - 67- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 68 - 6f- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 70 - 77- BitPackage.Pack4bits(2,2,2,2,2,2,2,1), // 78 - 7f- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 80 - 87- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 88 - 8f- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 90 - 97- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 98 - 9f- //0xa0 is illegal in sjis encoding, but some pages does+ //BitPacket.Pack4bits(0,1,1,1,1,1,1,1), // 00 - 07+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 00 - 07+ BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17+ BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 30 - 37+ BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 38 - 3f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 40 - 47+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 48 - 4f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 50 - 57+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 58 - 5f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 60 - 67+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 68 - 6f+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 70 - 77+ BitPackage.Pack4bits(2,2,2,2,2,2,2,1), // 78 - 7f+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 80 - 87+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 88 - 8f+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 90 - 97+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 98 - 9f+ //0xa0 is illegal in sjis encoding, but some pages does//contain such byte. We need to be more error forgiven.- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a0 - a7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7- BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df- BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e0 - e7- BitPackage.Pack4bits(3,3,3,3,3,4,4,4), // e8 - ef- BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // f0 - f7- BitPackage.Pack4bits(4,4,4,4,4,0,0,0) // f8 - ff+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a0 - a7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7+ BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df+ BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e0 - e7+ BitPackage.Pack4bits(3,3,3,3,3,4,4,4), // e8 - ef+ BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // f0 - f7+ BitPackage.Pack4bits(4,4,4,4,4,0,0,0) // f8 - ff};private readonly static int[] SJIS_st = {- BitPackage.Pack4bits(ERROR,START,START, 3,ERROR,ERROR,ERROR,ERROR),//00-07- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f- BitPackage.Pack4bits(ITSME,ITSME,ERROR,ERROR,START,START,START,START) //10-17+ BitPackage.Pack4bits(ERROR,START,START, 3,ERROR,ERROR,ERROR,ERROR),//00-07+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f+ BitPackage.Pack4bits(ITSME,ITSME,ERROR,ERROR,START,START,START,START) //10-17};private readonly static int[] SJISCharLenTable = { 0, 1, 1, 2, 0, 0 };-+public SJISSMModel() : base(- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, SJIS_cls),6,- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, SJIS_st),SJISCharLenTable, "Shift_JIS")@@ -505,64 +505,64 @@ namespace UniversalDetector.Core}}-+public class UCS2BESMModel : SMModel{private readonly static int[] UCS2BE_cls = {- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 00 - 07- BitPackage.Pack4bits(0,0,1,0,0,2,0,0), // 08 - 0f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17- BitPackage.Pack4bits(0,0,0,3,0,0,0,0), // 18 - 1f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 20 - 27- BitPackage.Pack4bits(0,3,3,3,3,3,0,0), // 28 - 2f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 40 - 47- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 80 - 87- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 88 - 8f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 90 - 97- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 98 - 9f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // a0 - a7- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // a8 - af- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // b0 - b7- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // b8 - bf- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // c0 - c7- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // c8 - cf- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // d0 - d7- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // d8 - df- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e0 - e7- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e8 - ef- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // f0 - f7- BitPackage.Pack4bits(0,0,0,0,0,0,4,5) // f8 - ff+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 00 - 07+ BitPackage.Pack4bits(0,0,1,0,0,2,0,0), // 08 - 0f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17+ BitPackage.Pack4bits(0,0,0,3,0,0,0,0), // 18 - 1f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 20 - 27+ BitPackage.Pack4bits(0,3,3,3,3,3,0,0), // 28 - 2f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 40 - 47+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 80 - 87+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 88 - 8f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 90 - 97+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 98 - 9f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // a0 - a7+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // a8 - af+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // b0 - b7+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // b8 - bf+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // c0 - c7+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // c8 - cf+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // d0 - d7+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // d8 - df+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e0 - e7+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e8 - ef+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // f0 - f7+ BitPackage.Pack4bits(0,0,0,0,0,0,4,5) // f8 - ff};private readonly static int[] UCS2BE_st = {- BitPackage.Pack4bits( 5, 7, 7,ERROR, 4, 3,ERROR,ERROR),//00-07- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f- BitPackage.Pack4bits(ITSME,ITSME, 6, 6, 6, 6,ERROR,ERROR),//10-17- BitPackage.Pack4bits( 6, 6, 6, 6, 6,ITSME, 6, 6),//18-1f- BitPackage.Pack4bits( 6, 6, 6, 6, 5, 7, 7,ERROR),//20-27- BitPackage.Pack4bits( 5, 8, 6, 6,ERROR, 6, 6, 6),//28-2f- BitPackage.Pack4bits( 6, 6, 6, 6,ERROR,ERROR,START,START) //30-37+ BitPackage.Pack4bits( 5, 7, 7,ERROR, 4, 3,ERROR,ERROR),//00-07+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f+ BitPackage.Pack4bits(ITSME,ITSME, 6, 6, 6, 6,ERROR,ERROR),//10-17+ BitPackage.Pack4bits( 6, 6, 6, 6, 6,ITSME, 6, 6),//18-1f+ BitPackage.Pack4bits( 6, 6, 6, 6, 5, 7, 7,ERROR),//20-27+ BitPackage.Pack4bits( 5, 8, 6, 6,ERROR, 6, 6, 6),//28-2f+ BitPackage.Pack4bits( 6, 6, 6, 6,ERROR,ERROR,START,START) //30-37};private readonly static int[] UCS2BECharLenTable = { 2, 2, 2, 0, 2, 2 };-+public UCS2BESMModel() : base(- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, UCS2BE_cls),6,- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, UCS2BE_st),UCS2BECharLenTable, "UTF-16BE")@@ -570,64 +570,64 @@ namespace UniversalDetector.Core}}-+public class UCS2LESMModel : SMModel{private readonly static int[] UCS2LE_cls = {- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 00 - 07- BitPackage.Pack4bits(0,0,1,0,0,2,0,0), // 08 - 0f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17- BitPackage.Pack4bits(0,0,0,3,0,0,0,0), // 18 - 1f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 20 - 27- BitPackage.Pack4bits(0,3,3,3,3,3,0,0), // 28 - 2f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 40 - 47- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 80 - 87- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 88 - 8f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 90 - 97- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 98 - 9f- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // a0 - a7- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // a8 - af- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // b0 - b7- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // b8 - bf- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // c0 - c7- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // c8 - cf- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // d0 - d7- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // d8 - df- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e0 - e7- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e8 - ef- BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // f0 - f7- BitPackage.Pack4bits(0,0,0,0,0,0,4,5) // f8 - ff+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 00 - 07+ BitPackage.Pack4bits(0,0,1,0,0,2,0,0), // 08 - 0f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17+ BitPackage.Pack4bits(0,0,0,3,0,0,0,0), // 18 - 1f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 20 - 27+ BitPackage.Pack4bits(0,3,3,3,3,3,0,0), // 28 - 2f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 40 - 47+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 80 - 87+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 88 - 8f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 90 - 97+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 98 - 9f+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // a0 - a7+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // a8 - af+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // b0 - b7+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // b8 - bf+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // c0 - c7+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // c8 - cf+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // d0 - d7+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // d8 - df+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e0 - e7+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e8 - ef+ BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // f0 - f7+ BitPackage.Pack4bits(0,0,0,0,0,0,4,5) // f8 - ff};private readonly static int[] UCS2LE_st = {- BitPackage.Pack4bits( 6, 6, 7, 6, 4, 3,ERROR,ERROR),//00-07- BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f- BitPackage.Pack4bits(ITSME,ITSME, 5, 5, 5,ERROR,ITSME,ERROR),//10-17- BitPackage.Pack4bits( 5, 5, 5,ERROR, 5,ERROR, 6, 6),//18-1f- BitPackage.Pack4bits( 7, 6, 8, 8, 5, 5, 5,ERROR),//20-27- BitPackage.Pack4bits( 5, 5, 5,ERROR,ERROR,ERROR, 5, 5),//28-2f- BitPackage.Pack4bits( 5, 5, 5,ERROR, 5,ERROR,START,START) //30-37+ BitPackage.Pack4bits( 6, 6, 7, 6, 4, 3,ERROR,ERROR),//00-07+ BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f+ BitPackage.Pack4bits(ITSME,ITSME, 5, 5, 5,ERROR,ITSME,ERROR),//10-17+ BitPackage.Pack4bits( 5, 5, 5,ERROR, 5,ERROR, 6, 6),//18-1f+ BitPackage.Pack4bits( 7, 6, 8, 8, 5, 5, 5,ERROR),//20-27+ BitPackage.Pack4bits( 5, 5, 5,ERROR,ERROR,ERROR, 5, 5),//28-2f+ BitPackage.Pack4bits( 5, 5, 5,ERROR, 5,ERROR,START,START) //30-37};private readonly static int[] UCS2LECharLenTable = { 2, 2, 2, 2, 2, 2 };-+public UCS2LESMModel() : base(- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, UCS2LE_cls),6,- new BitPackage(BitPackage.INDEX_SHIFT_4BITS,- BitPackage.SHIFT_MASK_4BITS,+ new BitPackage(BitPackage.INDEX_SHIFT_4BITS,+ BitPackage.SHIFT_MASK_4BITS,BitPackage.BIT_SHIFT_4BITS,BitPackage.UNIT_MASK_4BITS, UCS2LE_st),UCS2LECharLenTable, "UTF-16LE")@@ -635,6 +635,6 @@ namespace UniversalDetector.Core}}--++}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCSGroupProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCSGroupProber.csindex d8f496474b..640b19c4a4 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCSGroupProber.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCSGroupProber.cs@@ -21,7 +21,7 @@* Contributor(s):* Shy Shalom <[email protected]>* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -43,11 +43,11 @@ namespace UniversalDetector.Corepublic class SBCSGroupProber : CharsetProber{private const int PROBERS_NUM = 13;- private CharsetProber[] probers = new CharsetProber[PROBERS_NUM];+ private CharsetProber[] probers = new CharsetProber[PROBERS_NUM];private bool[] isActive = new bool[PROBERS_NUM];private int bestGuess;private int activeNum;-+public SBCSGroupProber(){probers[0] = new SingleByteCharSetProber(new Win1251Model());@@ -62,24 +62,24 @@ namespace UniversalDetector.Coreprobers[9] = new SingleByteCharSetProber(new Win1251BulgarianModel());HebrewProber hebprober = new HebrewProber();probers[10] = hebprober;- // Logical- probers[11] = new SingleByteCharSetProber(new Win1255Model(), false, hebprober);+ // Logical+ probers[11] = new SingleByteCharSetProber(new Win1255Model(), false, hebprober);// Visual- probers[12] = new SingleByteCharSetProber(new Win1255Model(), true, hebprober);+ probers[12] = new SingleByteCharSetProber(new Win1255Model(), true, hebprober);hebprober.SetModelProbers(probers[11], probers[12]);- // disable latin2 before latin1 is available, otherwise all latin1+ // disable latin2 before latin1 is available, otherwise all latin1// will be detected as latin2 because of their similarity.//probers[13] = new SingleByteCharSetProber(new Latin2HungarianModel());- //probers[14] = new SingleByteCharSetProber(new Win1250HungarianModel());+ //probers[14] = new SingleByteCharSetProber(new Win1250HungarianModel());Reset();}-- public override ProbingState HandleData(byte[] buf, int offset, int len)++ public override ProbingState HandleData(byte[] buf, int offset, int len){ProbingState st = ProbingState.NotMe;-+//apply filter to original buffer, and we got new buffer back- //depend on what script it is, we will feed them the new buffer+ //depend on what script it is, we will feed them the new buffer//we got after applying proper filter//this is done without any consideration to KeepEnglishLetters//of each prober since as of now, there are no probers here which@@ -87,12 +87,12 @@ namespace UniversalDetector.Corebyte[] newBuf = FilterWithoutEnglishLetters(buf, offset, len);if (newBuf.Length == 0)return state; // Nothing to see here, move on.-+for (int i = 0; i < PROBERS_NUM; i++) {if (!isActive[i])continue;st = probers[i].HandleData(newBuf, 0, newBuf.Length);-+if (st == ProbingState.FoundIt) {bestGuess = i;state = ProbingState.FoundIt;diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCharsetProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCharsetProber.csindex 5a3496075b..65c0f8ca81 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCharsetProber.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCharsetProber.cs@@ -20,7 +20,7 @@** Contributor(s):* Shy Shalom <[email protected]>- * Rudi Pettazzi <[email protected]> (C# port)+ * Rudi Pettazzi <[email protected]> (C# port)** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or@@ -51,11 +51,11 @@ namespace UniversalDetector.Coreprivate const int NUMBER_OF_SEQ_CAT = 4;private const int POSITIVE_CAT = NUMBER_OF_SEQ_CAT-1;private const int NEGATIVE_CAT = 0;-+protected SequenceModel model;-- // true if we need to reverse every pair in the model lookup- bool reversed;++ // true if we need to reverse every pair in the model lookup+ bool reversed;// char order of last characterbyte lastOrder;@@ -63,38 +63,38 @@ namespace UniversalDetector.Coreint totalSeqs;int totalChar;int[] seqCounters = new int[NUMBER_OF_SEQ_CAT];-+// characters that fall in our sampling rangeint freqChar;-+// Optional auxiliary prober for name decision. created and destroyed by the GroupProber- CharsetProber nameProber;-- public SingleByteCharSetProber(SequenceModel model)+ CharsetProber nameProber;++ public SingleByteCharSetProber(SequenceModel model): this(model, false, null){-+}-- public SingleByteCharSetProber(SequenceModel model, bool reversed,++ public SingleByteCharSetProber(SequenceModel model, bool reversed,CharsetProber nameProber){this.model = model;this.reversed = reversed;this.nameProber = nameProber;- Reset();+ Reset();}public override ProbingState HandleData(byte[] buf, int offset, int len){int max = offset + len;-+for (int i = offset; i < max; i++) {byte order = model.GetOrder(buf[i]);if (order < SYMBOL_CAT_ORDER)totalChar++;-+if (order < SAMPLE_SIZE) {freqChar++;@@ -120,7 +120,7 @@ namespace UniversalDetector.Core}return state;}-+public override void DumpStatus(){//Console.WriteLine(" SBCS: {0} [{1}]", GetConfidence(), GetCharsetName());@@ -146,9 +146,9 @@ namespace UniversalDetector.Corer = 0.99f;return r;}- return 0.01f;+ return 0.01f;}-+public override void Reset(){state = ProbingState.Detecting;@@ -159,12 +159,12 @@ namespace UniversalDetector.CoretotalChar = 0;freqChar = 0;}-- public override string GetCharsetName()++ public override string GetCharsetName(){return (nameProber == null) ? model.CharsetName: nameProber.GetCharsetName();}-+}}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SJISProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SJISProber.csindex 515cd2498f..e1fbb873e4 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SJISProber.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SJISProber.cs@@ -21,7 +21,7 @@* Contributor(s):* Shy Shalom <[email protected]>* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -50,25 +50,25 @@ namespace UniversalDetector.Coreprivate SJISContextAnalyser contextAnalyser;private SJISDistributionAnalyser distributionAnalyser;private byte[] lastChar = new byte[2];-+public SJISProber(){codingSM = new CodingStateMachine(new SJISSMModel());distributionAnalyser = new SJISDistributionAnalyser();- contextAnalyser = new SJISContextAnalyser();+ contextAnalyser = new SJISContextAnalyser();Reset();}-+public override string GetCharsetName(){- return "Shift-JIS";+ return "Shift-JIS";}-+public override ProbingState HandleData(byte[] buf, int offset, int len){int codingState;int max = offset + len;-+for (int i = offset; i < max; i++) {codingState = codingSM.NextState(buf[i]);if (codingState == SMModel.ERROR) {@@ -90,7 +90,7 @@ namespace UniversalDetector.CoredistributionAnalyser.HandleOneChar(buf, i-1, charLen);}}- }+ }lastChar[0] = buf[max-1];if (state == ProbingState.Detecting)if (contextAnalyser.GotEnoughData() && GetConfidence() > SHORTCUT_THRESHOLD)@@ -100,12 +100,12 @@ namespace UniversalDetector.Corepublic override void Reset(){- codingSM.Reset();+ codingSM.Reset();state = ProbingState.Detecting;contextAnalyser.Reset();distributionAnalyser.Reset();}-+public override float GetConfidence(){float contxtCf = contextAnalyser.GetConfidence();diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SMModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SMModel.csindex 2321ecad2e..451a3e59c2 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SMModel.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SMModel.cs@@ -52,9 +52,9 @@ namespace UniversalDetector.Corepublic BitPackage classTable;public BitPackage stateTable;public int[] charLenTable;-+private string name;-+public string Name {get { return name; }}@@ -74,10 +74,10 @@ namespace UniversalDetector.Corethis.charLenTable = charLenTable;this.name = name;}-+public int GetClass(byte b)- {- return classTable.Unpack((int)b);+ {+ return classTable.Unpack((int)b);}- }+ }}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SequenceModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SequenceModel.csindex 9048796b57..fc824b5a20 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SequenceModel.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SequenceModel.cs@@ -21,7 +21,7 @@* Contributor(s):* Shy Shalom <[email protected]>* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -39,36 +39,36 @@using System;namespace UniversalDetector.Core-{+{public abstract class SequenceModel{// [256] table use to find a char's orderprotected byte[] charToOrderMap;-- // [SAMPLE_SIZE][SAMPLE_SIZE] table to find a 2-char sequence's- // frequency++ // [SAMPLE_SIZE][SAMPLE_SIZE] table to find a 2-char sequence's+ // frequencyprotected byte[] precedenceMatrix;-+// freqSeqs / totalSeqsprotected float typicalPositiveRatio;-+public float TypicalPositiveRatio {get { return typicalPositiveRatio; }}-- // not used++ // not usedprotected bool keepEnglishLetter;-+public bool KeepEnglishLetter {get { return keepEnglishLetter; }}-+protected String charsetName;public string CharsetName {get { return charsetName; }}-+public SequenceModel(byte[] charToOrderMap,byte[] precedenceMatrix,@@ -82,16 +82,16 @@ namespace UniversalDetector.Corethis.keepEnglishLetter = keepEnglishLetter;this.charsetName = charsetName;}-+public byte GetOrder(byte b){return charToOrderMap[b];}-+public byte GetPrecedence(int pos){return precedenceMatrix[pos];}-+}}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UTF8Prober.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UTF8Prober.csindex 084797c5ec..a469e2a0c6 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UTF8Prober.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UTF8Prober.cs@@ -21,7 +21,7 @@* Contributor(s):* Shy Shalom <[email protected]>* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -46,11 +46,11 @@ namespace UniversalDetector.Corepublic UTF8Prober(){- numOfMBChar = 0;+ numOfMBChar = 0;codingSM = new CodingStateMachine(new UTF8SMModel());Reset();}-+public override string GetCharsetName() {return "UTF-8";}@@ -66,7 +66,7 @@ namespace UniversalDetector.Core{int codingState = SMModel.START;int max = offset + len;-+for (int i = offset; i < max; i++) {codingState = codingSM.NextState(buf[i]);@@ -97,7 +97,7 @@ namespace UniversalDetector.Core{float unlike = 0.99f;float confidence = 0.0f;-+if (numOfMBChar < 6) {for (int i = 0; i < numOfMBChar; i++)unlike *= ONE_CHAR_PROB;diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UniversalDetector.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UniversalDetector.csindex 0c9a4ee607..4dcb282cc9 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UniversalDetector.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UniversalDetector.cs@@ -21,7 +21,7 @@* Contributor(s):* Shy Shalom <[email protected]>* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either the GNU General Public License Version 2 or later (the "GPL"), or* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -41,7 +41,7 @@ namespace UniversalDetector.Coreenum InputState { PureASCII=0, EscASCII=1, Highbyte=2 };- public abstract class UniversalDetector+ public abstract class UniversalDetector{protected const int FILTER_CHINESE_SIMPLIFIED = 1;protected const int FILTER_CHINESE_TRADITIONAL = 2;@@ -49,12 +49,12 @@ namespace UniversalDetector.Coreprotected const int FILTER_KOREAN = 8;protected const int FILTER_NON_CJK = 16;protected const int FILTER_ALL = 31;- protected static int FILTER_CHINESE =+ protected static int FILTER_CHINESE =FILTER_CHINESE_SIMPLIFIED | FILTER_CHINESE_TRADITIONAL;- protected static int FILTER_CJK =- FILTER_JAPANESE | FILTER_KOREAN | FILTER_CHINESE_SIMPLIFIED+ protected static int FILTER_CJK =+ FILTER_JAPANESE | FILTER_KOREAN | FILTER_CHINESE_SIMPLIFIED| FILTER_CHINESE_TRADITIONAL;-+protected const float SHORTCUT_THRESHOLD = 0.95f;protected const float MINIMUM_THRESHOLD = 0.20f;@@ -70,16 +70,16 @@ namespace UniversalDetector.Coreprotected CharsetProber escCharsetProber;protected string detectedCharset;- public UniversalDetector(int languageFilter) {+ public UniversalDetector(int languageFilter) {this.start = true;this.inputState = InputState.PureASCII;- this.lastChar = 0x00;+ this.lastChar = 0x00;this.bestGuess = -1;this.languageFilter = languageFilter;}public virtual void Feed(byte[] buf, int offset, int len)- {+ {if (done) {return;}@@ -125,7 +125,7 @@ namespace UniversalDetector.Core}for (int i = 0; i < len; i++) {-+// other than 0xa0, if every other character is ascii, the page is asciiif ((buf[i] & 0x80) != 0 && buf[i] != 0xA0) {// we got a non-ascii byte (high-byte)@@ -143,9 +143,9 @@ namespace UniversalDetector.Coreif (charsetProbers[1] == null)charsetProbers[1] = new SBCSGroupProber();if (charsetProbers[2] == null)- charsetProbers[2] = new Latin1Prober();+ charsetProbers[2] = new Latin1Prober();}- } else {+ } else {if (inputState == InputState.PureASCII &&(buf[i] == 0x33 || (buf[i] == 0x7B && lastChar == 0x7E))) {// found escape character or HZ "~{"@@ -154,9 +154,9 @@ namespace UniversalDetector.CorelastChar = buf[i];}}-+ProbingState st = ProbingState.NotMe;-+switch (inputState) {case InputState.EscASCII:if (escCharsetProber == null) {@@ -172,18 +172,18 @@ namespace UniversalDetector.Corefor (int i = 0; i < PROBERS_NUM; i++) {if (charsetProbers[i] != null) {st = charsetProbers[i].HandleData(buf, offset, len);- #if DEBUG+ #if DEBUGcharsetProbers[i].DumpStatus();- #endif+ #endifif (st == ProbingState.FoundIt) {done = true;detectedCharset = charsetProbers[i].GetCharsetName();return;- }+ }}}break;- default:+ default:// pure asciibreak;}@@ -191,13 +191,13 @@ namespace UniversalDetector.Core}/// <summary>- /// Notify detector that no further data is available.+ /// Notify detector that no further data is available./// </summary>public virtual void DataEnd(){if (!gotData) {- // we haven't got any data yet, return immediately- // caller program sometimes call DataEnd before anything has+ // we haven't got any data yet, return immediately+ // caller program sometimes call DataEnd before anything has// been sent to detectorreturn;}@@ -206,7 +206,7 @@ namespace UniversalDetector.Coredone = true;Report(detectedCharset, 1.0f);return;- }+ }if (inputState == InputState.Highbyte) {float proberConfidence = 0.0f;@@ -221,22 +221,22 @@ namespace UniversalDetector.Core}}}-+if (maxProberConfidence > MINIMUM_THRESHOLD) {Report(charsetProbers[maxProber].GetCharsetName(), maxProberConfidence);- }-+ }+} else if (inputState == InputState.PureASCII) {Report("ASCII", 1.0f);- }+ }}/// <summary>/// Clear internal state of charset detector.- /// In the original interface this method is protected.+ /// In the original interface this method is protected./// </summary>- public virtual void Reset()- {+ public virtual void Reset()+ {done = false;start = true;detectedCharset = null;@@ -250,7 +250,7 @@ namespace UniversalDetector.Coreif (charsetProbers[i] != null)charsetProbers[i].Reset();}-+protected abstract void Report(string charset, float confidence);}diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/DetectionConfidence.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/DetectionConfidence.csindex 6dfa55f6c2..ea96c28033 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/DetectionConfidence.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/DetectionConfidence.cs@@ -21,7 +21,7 @@** Contributor(s):* Rudi Pettazzi <[email protected]> (C# port)- *+ ** Alternatively, the contents of this file may be used under the terms of* either of the GNU General Public License Version 2 or later (the "GPL"),* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),@@ -40,26 +40,26 @@ namespace UniversalDetector{/// <summary>/// Indicate how confident the detection module about the return result.- ///- /// NoAnswerYet: the detector have not find out a answer yet based on+ ///+ /// NoAnswerYet: the detector have not find out a answer yet based on/// the data it received.- ///- /// BestAnswer: the answer the detector returned is the best one within- /// the knowledge of the detector. In other words, the test to all+ ///+ /// BestAnswer: the answer the detector returned is the best one within+ /// the knowledge of the detector. In other words, the test to all/// other candidates fail./// For example, the (Shift_JIS/EUC-JP/ISO-2022-JP) detection- /// module may return this with answer "Shift_JIS " if it receive- /// bytes > 0x80 (which make ISO-2022-JP test failed) and byte+ /// module may return this with answer "Shift_JIS " if it receive+ /// bytes > 0x80 (which make ISO-2022-JP test failed) and byte/// 0x82 (which may EUC-JP test failed)////// SureAnswer: the detector is 100% sure about the answer.- ///+ ////// Example 1: the Shift_JIS/ISO-2022-JP/EUC-JP detector return/// this w/ ISO-2022-JP when it hit one of the following ESC seq/// ESC ( J/// ESC $ @/// ESC $ B- ///+ ////// Example 2: the detector which can detect UCS2 return w/ UCS2/// when the first 2 byte are BOM mark./// Example 3: the Korean detector return ISO-2022-KR when itdiff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/ICharsetDetector.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/ICharsetDetector.csindex c0c35a59eb..fbf8376bd0 100644--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/ICharsetDetector.cs+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/ICharsetDetector.cs@@ -47,31 +47,31 @@ namespace UniversalDetector/// The detected charset. It can be null./// </summary>string Charset { get; }-+/// <summary>- /// The confidence of the detected charset, if any+ /// The confidence of the detected charset, if any/// </summary>float Confidence { get; }-+/// <summary>- /// Feed a block of bytes to the detector.+ /// Feed a block of bytes to the detector./// </summary>/// <param name="buf">input buffer</param>/// <param name="offset">offset into buffer</param>/// <param name="len">number of available bytes</param>void Feed(byte[] buf, int offset, int len);-+/// <summary>- /// Feed a bytes stream to the detector.+ /// Feed a bytes stream to the detector./// </summary>/// <param name="stream">an input stream</param>void Feed(Stream stream);/// <summary>- /// Resets the state of the detector.- /// </summary>+ /// Resets the state of the detector.+ /// </summary>void Reset();-+/// <summary>/// Returns true if the detector has found a result and it is sure about it./// </summary>@@ -83,6 +83,6 @@ namespace UniversalDetector/// decision./// </summary>void DataEnd();-+}}diff --git a/Emby.Server.Implementations/Udp/UdpServer.cs b/Emby.Server.Implementations/Udp/UdpServer.csindex 275bd83ea9..7db814c4a4 100644--- a/Emby.Server.Implementations/Udp/UdpServer.cs+++ b/Emby.Server.Implementations/Udp/UdpServer.cs@@ -182,7 +182,7 @@ namespace Emby.Server.Implementations.Udp{return;}-+try{var socketResult = _udpClient.EndReceive(result);diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.csindex 82b61c15a0..4943d0ccc3 100644--- a/Emby.Server.Implementations/Updates/InstallationManager.cs+++ b/Emby.Server.Implementations/Updates/InstallationManager.cs@@ -597,7 +597,7 @@ namespace Emby.Server.Implementations.UpdatescancellationToken.ThrowIfCancellationRequested();- // Success - move it to the real target+ // Success - move it to the real targettry{_fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(target));diff --git a/Emby.Server.Implementations/UserViews/FolderImageProvider.cs b/Emby.Server.Implementations/UserViews/FolderImageProvider.csindex abd6810b0b..057d22aece 100644--- a/Emby.Server.Implementations/UserViews/FolderImageProvider.cs+++ b/Emby.Server.Implementations/UserViews/FolderImageProvider.cs@@ -34,7 +34,7 @@ namespace Emby.Server.Implementations.PhotosParent = item,DtoOptions = new DtoOptions(true),ImageTypes = new ImageType[] { ImageType.Primary },- OrderBy = new System.ValueTuple<string, SortOrder>[]+ OrderBy = new System.ValueTuple<string, SortOrder>[]{new System.ValueTuple<string, SortOrder>(ItemSortBy.IsFolder, SortOrder.Ascending),new System.ValueTuple<string, SortOrder>(ItemSortBy.SortName, SortOrder.Ascending)diff --git a/Emby.XmlTv/Emby.XmlTv.Console/Program.cs b/Emby.XmlTv/Emby.XmlTv.Console/Program.csindex c57c45297a..e72d94bf56 100644--- a/Emby.XmlTv/Emby.XmlTv.Console/Program.cs+++ b/Emby.XmlTv/Emby.XmlTv.Console/Program.cs@@ -25,7 +25,7 @@ namespace Emby.XmlTv.Consolevar timer = Stopwatch.StartNew();System.Console.WriteLine("Running XMLTv Parsing");- var resultsFile = String.Format("C:\\Temp\\{0}_Results_{1:HHmmss}.txt",+ var resultsFile = String.Format("C:\\Temp\\{0}_Results_{1:HHmmss}.txt",Path.GetFileNameWithoutExtension(filename),DateTimeOffset.UtcNow);diff --git a/Emby.XmlTv/Emby.XmlTv.Console/Properties/AssemblyInfo.cs b/Emby.XmlTv/Emby.XmlTv.Console/Properties/AssemblyInfo.csindex cd1fcce685..4178a27a1e 100644--- a/Emby.XmlTv/Emby.XmlTv.Console/Properties/AssemblyInfo.cs+++ b/Emby.XmlTv/Emby.XmlTv.Console/Properties/AssemblyInfo.cs@@ -2,7 +2,7 @@using System.Runtime.CompilerServices;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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("Emby.XmlTv.Console")]@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;[assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]-// Setting ComVisible to false makes the types in this assembly not visible-// to COM components. If you need to access a type in this assembly from+// Setting ComVisible to false makes the types in this assembly not visible+// to COM components. If you need to access a type in this assembly from// COM, set the ComVisible attribute to true on that type.[assembly: ComVisible(false)]@@ -25,11 +25,11 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//-// You can specify all the values or you can default the Build and Revision Numbers+// You can specify all the values or you can default the Build and Revision Numbers// by using the '*' as shown below:// [assembly: AssemblyVersion("1.0.*")][assembly: AssemblyVersion("1.0.0.0")]diff --git a/Emby.XmlTv/Emby.XmlTv.Test/Properties/AssemblyInfo.cs b/Emby.XmlTv/Emby.XmlTv.Test/Properties/AssemblyInfo.csindex b6fc4c8e2b..e79fda8a89 100644--- a/Emby.XmlTv/Emby.XmlTv.Test/Properties/AssemblyInfo.cs+++ b/Emby.XmlTv/Emby.XmlTv.Test/Properties/AssemblyInfo.cs@@ -2,7 +2,7 @@using System.Runtime.CompilerServices;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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("Emby.XmlTv.Test")]@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;[assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]-// Setting ComVisible to false makes the types in this assembly not visible-// to COM components. If you need to access a type in this assembly from+// Setting ComVisible to false makes the types in this assembly not visible+// to COM components. If you need to access a type in this assembly from// COM, set the ComVisible attribute to true on that type.[assembly: ComVisible(false)]@@ -25,11 +25,11 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//-// You can specify all the values or you can default the Build and Revision Numbers+// You can specify all the values or you can default the Build and Revision Numbers// by using the '*' as shown below:// [assembly: AssemblyVersion("1.0.*")][assembly: AssemblyVersion("1.0.0.0")]diff --git a/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderDateTimeTests.cs b/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderDateTimeTests.csindex dbbd352ee7..2e4516be56 100644--- a/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderDateTimeTests.cs+++ b/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderDateTimeTests.cs@@ -16,7 +16,7 @@ namespace Emby.XmlTv.Test{var testFile = Path.GetFullPath(@"MultilanguageData.xml");var reader = new XmlTvReader(testFile, "es");-+Assert.AreEqual(Parse("01 Jan 2016 00:00:00"), reader.ParseDate("2016"));Assert.AreEqual(Parse("01 Jan 2016 00:00:00"), reader.ParseDate("201601"));Assert.AreEqual(Parse("01 Jan 2016 00:00:00"), reader.ParseDate("20160101"));diff --git a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvEpisode.cs b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvEpisode.csindex afcfb909ee..98a0354679 100644--- a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvEpisode.cs+++ b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvEpisode.cs@@ -49,5 +49,5 @@ namespace Emby.XmlTv.Entities}}-+}diff --git a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvProgram.cs b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvProgram.csindex b5aa6cf7a9..b6614afc15 100644--- a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvProgram.cs+++ b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvProgram.cs@@ -13,7 +13,7 @@ namespace Emby.XmlTv.Entitiespublic DateTimeOffset EndDate { get; set; }public string Title { get; set; }-+public string Description { get; set; }public string ProgramId { get; set; }public string Quality { get; set; }diff --git a/Emby.XmlTv/Emby.XmlTv/Properties/AssemblyInfo.cs b/Emby.XmlTv/Emby.XmlTv/Properties/AssemblyInfo.csindex f33433c93d..d852584198 100644--- a/Emby.XmlTv/Emby.XmlTv/Properties/AssemblyInfo.cs+++ b/Emby.XmlTv/Emby.XmlTv/Properties/AssemblyInfo.cs@@ -2,7 +2,7 @@using System.Runtime.CompilerServices;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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("XmlTv")]@@ -14,19 +14,19 @@ using System.Runtime.InteropServices;[assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]-// Setting ComVisible to false makes the types in this assembly not visible-// to COM components. If you need to access a type in this assembly from+// Setting ComVisible to false makes the types in this assembly not visible+// to COM components. If you need to access a type in this assembly from// COM, set the ComVisible attribute to true on that type.[assembly: ComVisible(false)]// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//-// You can specify all the values or you can default the Build and Revision Numbers+// You can specify all the values or you can default the Build and Revision Numbers// by using the '*' as shown below:// [assembly: AssemblyVersion("1.0.*")][assembly: AssemblyVersion("1.0.0")]diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.csindex ed0a0c81a9..7f7e48a3ae 100644--- a/MediaBrowser.Api/ApiEntryPoint.cs+++ b/MediaBrowser.Api/ApiEntryPoint.cs@@ -397,7 +397,7 @@ namespace MediaBrowser.Apilock (_activeTranscodingJobs){- // This is really only needed for HLS.+ // This is really only needed for HLS.// Progressive streams can stop on their own reliablyjobs = _activeTranscodingJobs.Where(j => string.Equals(playSessionId, j.PlaySessionId, StringComparison.OrdinalIgnoreCase)).ToList();}@@ -499,7 +499,7 @@ namespace MediaBrowser.Apilock (_activeTranscodingJobs){- // This is really only needed for HLS.+ // This is really only needed for HLS.// Progressive streams can stop on their own reliablyjobs.AddRange(_activeTranscodingJobs.Where(killJob));}diff --git a/MediaBrowser.Api/DisplayPreferencesService.cs b/MediaBrowser.Api/DisplayPreferencesService.csindex 6bc2f7e4af..eea83490ad 100644--- a/MediaBrowser.Api/DisplayPreferencesService.cs+++ b/MediaBrowser.Api/DisplayPreferencesService.cs@@ -41,7 +41,7 @@ namespace MediaBrowser.Api[ApiMember(Name = "Client", Description = "Client", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "GET")]public string Client { get; set; }}-+/// <summary>/// Class DisplayPreferencesService/// </summary>diff --git a/MediaBrowser.Api/EnvironmentService.cs b/MediaBrowser.Api/EnvironmentService.csindex ea3920d38d..6794a93044 100644--- a/MediaBrowser.Api/EnvironmentService.cs+++ b/MediaBrowser.Api/EnvironmentService.cs@@ -98,7 +98,7 @@ namespace MediaBrowser.Api[Route("/Environment/DefaultDirectoryBrowser", "GET", Summary = "Gets the parent path of a given path")]public class GetDefaultDirectoryBrowser : IReturn<DefaultDirectoryBrowserInfo>{-+}/// <summary>diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.csindex fa6502bda1..9cddcde491 100644--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs@@ -882,7 +882,7 @@ namespace MediaBrowser.Api.Playbackif (profile == null){- // Don't use settings from the default profile.+ // Don't use settings from the default profile.// Only use a specific profile if it was requested.return;}diff --git a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs b/MediaBrowser.Api/Playback/Hls/BaseHlsService.csindex 7ef7b81e63..954963b2f8 100644--- a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs+++ b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs@@ -296,7 +296,7 @@ namespace MediaBrowser.Api.Playback.Hls).Trim();}- // add when stream copying?+ // add when stream copying?// -avoid_negative_ts make_zero -fflags +genptsvar args = string.Format("{0} {1} {2} -map_metadata -1 -map_chapters -1 -threads {3} {4} {5} -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero {6} -hls_time {7} -individual_header_trailer 0 -start_number {8} -hls_list_size {9}{10} -y \"{11}\"",diff --git a/MediaBrowser.Api/Playback/MediaInfoService.cs b/MediaBrowser.Api/Playback/MediaInfoService.csindex 6dafe134ce..a0b0b2ceda 100644--- a/MediaBrowser.Api/Playback/MediaInfoService.cs+++ b/MediaBrowser.Api/Playback/MediaInfoService.cs@@ -118,7 +118,7 @@ namespace MediaBrowser.Api.Playbackvar authInfo = _authContext.GetAuthorizationInfo(Request);var result = await _mediaSourceManager.OpenLiveStream(request, CancellationToken.None).ConfigureAwait(false);-+var profile = request.DeviceProfile;if (profile == null){@@ -386,10 +386,10 @@ namespace MediaBrowser.Api.Playback}else{- Logger.LogInformation("User policy for {0}. EnablePlaybackRemuxing: {1} EnableVideoPlaybackTranscoding: {2} EnableAudioPlaybackTranscoding: {3}",+ Logger.LogInformation("User policy for {0}. EnablePlaybackRemuxing: {1} EnableVideoPlaybackTranscoding: {2} EnableAudioPlaybackTranscoding: {3}",user.Name,user.Policy.EnablePlaybackRemuxing,- user.Policy.EnableVideoPlaybackTranscoding,+ user.Policy.EnableVideoPlaybackTranscoding,user.Policy.EnableAudioPlaybackTranscoding);}diff --git a/MediaBrowser.Api/Playback/StreamRequest.cs b/MediaBrowser.Api/Playback/StreamRequest.csindex d95c30d657..6b0725f317 100644--- a/MediaBrowser.Api/Playback/StreamRequest.cs+++ b/MediaBrowser.Api/Playback/StreamRequest.cs@@ -19,7 +19,7 @@ namespace MediaBrowser.Api.Playback[ApiMember(Name = "MediaSourceId", Description = "The media version id, if playing an alternate version", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]public string MediaSourceId { get; set; }-+[ApiMember(Name = "DeviceId", Description = "The device id of the client requesting. Used to stop encoding processes when needed.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]public string DeviceId { get; set; }diff --git a/MediaBrowser.Api/Playback/StreamState.cs b/MediaBrowser.Api/Playback/StreamState.csindex 67fb04d0c2..73741d527b 100644--- a/MediaBrowser.Api/Playback/StreamState.cs+++ b/MediaBrowser.Api/Playback/StreamState.cs@@ -117,7 +117,7 @@ namespace MediaBrowser.Api.Playbackpublic string UserAgent { get; set; }- public StreamState(IMediaSourceManager mediaSourceManager, ILogger logger, TranscodingJobType transcodingType)+ public StreamState(IMediaSourceManager mediaSourceManager, ILogger logger, TranscodingJobType transcodingType): base(logger, mediaSourceManager, transcodingType){_mediaSourceManager = mediaSourceManager;diff --git a/MediaBrowser.Api/PluginService.cs b/MediaBrowser.Api/PluginService.csindex 1f1bb36144..12488b7127 100644--- a/MediaBrowser.Api/PluginService.cs+++ b/MediaBrowser.Api/PluginService.cs@@ -225,7 +225,7 @@ namespace MediaBrowser.Api{var pkg = packages.FirstOrDefault(i => !string.IsNullOrWhiteSpace(i.guid) && new Guid(plugin.Id).Equals(new Guid(i.guid)));return pkg != null && pkg.enableInAppStore;-+}).ToArray();}diff --git a/MediaBrowser.Api/Properties/AssemblyInfo.cs b/MediaBrowser.Api/Properties/AssemblyInfo.csindex c689522916..2755924c87 100644--- a/MediaBrowser.Api/Properties/AssemblyInfo.cs+++ b/MediaBrowser.Api/Properties/AssemblyInfo.cs@@ -1,7 +1,7 @@using System.Reflection;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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.Api")]@@ -13,8 +13,8 @@ using System.Runtime.InteropServices;[assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]-// Setting ComVisible to false makes the types in this assembly not visible-// to COM components. If you need to access a type in this assembly from+// Setting ComVisible to false makes the types in this assembly not visible+// to COM components. If you need to access a type in this assembly from// COM, set the ComVisible attribute to true on that type.[assembly: ComVisible(false)]@@ -24,7 +24,7 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//diff --git a/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs b/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.csindex 959bdcd550..ef9b3c1ae0 100644--- a/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs+++ b/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs@@ -155,7 +155,7 @@ namespace MediaBrowser.Api.ScheduledTasksreturn isEnabled == val;});}-+var infos = result.Select(ScheduledTaskHelpers.GetTaskInfo).ToArray();diff --git a/MediaBrowser.Api/System/ActivityLogWebSocketListener.cs b/MediaBrowser.Api/System/ActivityLogWebSocketListener.csindex b61ff8d932..29f01eab93 100644--- a/MediaBrowser.Api/System/ActivityLogWebSocketListener.cs+++ b/MediaBrowser.Api/System/ActivityLogWebSocketListener.cs@@ -47,7 +47,7 @@ namespace MediaBrowser.Api.System{return Task.FromResult(new List<ActivityLogEntry>());}-+protected override void Dispose(bool dispose){diff --git a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.csindex 11c12c718f..2ce9b0aec4 100644--- a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs+++ b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs@@ -214,7 +214,7 @@ namespace MediaBrowser.Api.UserLibrarypublic string Genres { get; set; }public string GenreIds { get; set; }-+[ApiMember(Name = "OfficialRatings", Description = "Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]public string OfficialRatings { get; set; }@@ -412,7 +412,7 @@ namespace MediaBrowser.Api.UserLibraryreturn val.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(v => (VideoType)Enum.Parse(typeof(VideoType), v, true)).ToArray();}-+/// <summary>/// Gets the filters./// </summary>diff --git a/MediaBrowser.Api/UserLibrary/GenresService.cs b/MediaBrowser.Api/UserLibrary/GenresService.csindex 0bb7d7865a..c897ba300f 100644--- a/MediaBrowser.Api/UserLibrary/GenresService.cs+++ b/MediaBrowser.Api/UserLibrary/GenresService.cs@@ -69,7 +69,7 @@ namespace MediaBrowser.Api.UserLibraryvar dtoOptions = GetDtoOptions(AuthorizationContext, request);var item = GetGenre(request.Name, LibraryManager, dtoOptions);-+if (!request.UserId.Equals(Guid.Empty)){var user = UserManager.GetUserById(request.UserId);diff --git a/MediaBrowser.Api/UserLibrary/MusicGenresService.cs b/MediaBrowser.Api/UserLibrary/MusicGenresService.csindex d4f1b3fa8d..9583dacb26 100644--- a/MediaBrowser.Api/UserLibrary/MusicGenresService.cs+++ b/MediaBrowser.Api/UserLibrary/MusicGenresService.cs@@ -60,7 +60,7 @@ namespace MediaBrowser.Api.UserLibraryvar dtoOptions = GetDtoOptions(AuthorizationContext, request);var item = GetMusicGenre(request.Name, LibraryManager, dtoOptions);-+if (!request.UserId.Equals(Guid.Empty)){var user = UserManager.GetUserById(request.UserId);diff --git a/MediaBrowser.Api/UserLibrary/YearsService.cs b/MediaBrowser.Api/UserLibrary/YearsService.csindex 30ac88e00f..528406aa43 100644--- a/MediaBrowser.Api/UserLibrary/YearsService.cs+++ b/MediaBrowser.Api/UserLibrary/YearsService.cs@@ -66,7 +66,7 @@ namespace MediaBrowser.Api.UserLibraryprivate BaseItemDto GetItem(GetYear request){var item = LibraryManager.GetYear(request.Year);-+var dtoOptions = GetDtoOptions(AuthorizationContext, request);if (!request.UserId.Equals(Guid.Empty))diff --git a/MediaBrowser.Common/Net/HttpResponseInfo.cs b/MediaBrowser.Common/Net/HttpResponseInfo.csindex ed941a4474..a36550a281 100644--- a/MediaBrowser.Common/Net/HttpResponseInfo.cs+++ b/MediaBrowser.Common/Net/HttpResponseInfo.cs@@ -21,7 +21,7 @@ namespace MediaBrowser.Common.Net/// </summary>/// <value>The response URL.</value>public string ResponseUrl { get; set; }-+/// <summary>/// Gets or sets the content./// </summary>diff --git a/MediaBrowser.Common/Properties/AssemblyInfo.cs b/MediaBrowser.Common/Properties/AssemblyInfo.csindex 09fd68f93a..1a7112ad9a 100644--- a/MediaBrowser.Common/Properties/AssemblyInfo.cs+++ b/MediaBrowser.Common/Properties/AssemblyInfo.cs@@ -1,7 +1,7 @@using System.Reflection;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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.Common")]@@ -13,15 +13,15 @@ using System.Runtime.InteropServices;[assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]-// Setting ComVisible to false makes the types in this assembly not visible-// to COM components. If you need to access a type in this assembly from+// Setting ComVisible to false makes the types in this assembly not visible+// to COM components. If you need to access a type in this assembly from// COM, set the ComVisible attribute to true on that type.[assembly: ComVisible(false)]// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//\ No newline at end of filediff --git a/MediaBrowser.Controller/Dlna/IDlnaManager.cs b/MediaBrowser.Controller/Dlna/IDlnaManager.csindex 2f64cd1946..70529d0624 100644--- a/MediaBrowser.Controller/Dlna/IDlnaManager.cs+++ b/MediaBrowser.Controller/Dlna/IDlnaManager.cs@@ -30,26 +30,26 @@ namespace MediaBrowser.Controller.Dlna/// </summary>/// <param name="profile">The profile.</param>void CreateProfile(DeviceProfile profile);-+/// <summary>/// Updates the profile./// </summary>/// <param name="profile">The profile.</param>void UpdateProfile(DeviceProfile profile);-+/// <summary>/// Deletes the profile./// </summary>/// <param name="id">The identifier.</param>void DeleteProfile(string id);-+/// <summary>/// Gets the profile./// </summary>/// <param name="id">The identifier.</param>/// <returns>DeviceProfile.</returns>DeviceProfile GetProfile(string id);-+/// <summary>/// Gets the profile./// </summary>diff --git a/MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs b/MediaBrowser.Controller/Drawing/ImageProcessorExtensions.csindex 948219bf55..1b1e386e5c 100644--- a/MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs+++ b/MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs@@ -9,7 +9,7 @@ namespace MediaBrowser.Controller.Drawing{return processor.GetImageCacheTag(item, imageType, 0);}-+public static string GetImageCacheTag(this IImageProcessor processor, BaseItem item, ImageType imageType, int imageIndex){var imageInfo = item.GetImageInfo(imageType, imageIndex);diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.csindex a268e6d765..4703b9d407 100644--- a/MediaBrowser.Controller/Entities/BaseItem.cs+++ b/MediaBrowser.Controller/Entities/BaseItem.cs@@ -2100,7 +2100,7 @@ namespace MediaBrowser.Controller.Entities}else{- var list =+ var list =Studios = current.Concat(new [] { name }).ToArray();}}@@ -2915,7 +2915,7 @@ namespace MediaBrowser.Controller.Entitiesreturn GetExtras();}- public virtual bool IsHD {+ public virtual bool IsHD {get{return Height >= 720;diff --git a/MediaBrowser.Controller/Entities/BaseItemExtensions.cs b/MediaBrowser.Controller/Entities/BaseItemExtensions.csindex 8ab1788b57..bfd832d34d 100644--- a/MediaBrowser.Controller/Entities/BaseItemExtensions.cs+++ b/MediaBrowser.Controller/Entities/BaseItemExtensions.cs@@ -62,13 +62,13 @@ namespace MediaBrowser.Controller.Entitiesitem.SetImagePath(imageType, BaseItem.FileSystem.GetFileInfo(file));}}-+/// <summary>/// Copies all properties on object. Skips properties that do not exist./// </summary>/// <param name="source">The source object.</param>/// <param name="dest">The destination object.</param>- public static void DeepCopy<T, TU>(this T source, TU dest)+ public static void DeepCopy<T, TU>(this T source, TU dest)where T : BaseItemwhere TU : BaseItem{@@ -82,7 +82,7 @@ namespace MediaBrowser.Controller.Entitiesif (destProps.Any(x => x.Name == sourceProp.Name)){var p = destProps.First(x => x.Name == sourceProp.Name);- p.SetValue(dest, sourceProp.GetValue(source, null), null);+ p.SetValue(dest, sourceProp.GetValue(source, null), null);}}@@ -93,7 +93,7 @@ namespace MediaBrowser.Controller.Entities/// Copies all properties on newly created object. Skips properties that do not exist./// </summary>/// <param name="source">The source object.</param>- public static TU DeepCopy<T, TU>(this T source)+ public static TU DeepCopy<T, TU>(this T source)where T : BaseItemwhere TU : BaseItem, new(){diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.csindex dbe30f9a51..a2522cf5d0 100644--- a/MediaBrowser.Controller/Entities/Folder.cs+++ b/MediaBrowser.Controller/Entities/Folder.cs@@ -1705,7 +1705,7 @@ namespace MediaBrowser.Controller.Entities{get{- // These are just far too slow.+ // These are just far too slow.if (this is ICollectionFolder){return false;diff --git a/MediaBrowser.Controller/Entities/ISupportsBoxSetGrouping.cs b/MediaBrowser.Controller/Entities/ISupportsBoxSetGrouping.csindex fbe5a06d0e..7eede67085 100644--- a/MediaBrowser.Controller/Entities/ISupportsBoxSetGrouping.cs+++ b/MediaBrowser.Controller/Entities/ISupportsBoxSetGrouping.cs@@ -3,7 +3,7 @@ namespace MediaBrowser.Controller.Entities{/// <summary>/// Marker interface to denote a class that supports being hidden underneath it's boxset.- /// Just about anything can be placed into a boxset,+ /// Just about anything can be placed into a boxset,/// but movies should also only appear underneath and not outside separately (subject to configuration)./// </summary>public interface ISupportsBoxSetGroupingdiff --git a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs b/MediaBrowser.Controller/Entities/InternalItemsQuery.csindex bb99c0a84e..b35e36e1b2 100644--- a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs+++ b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs@@ -158,7 +158,7 @@ namespace MediaBrowser.Controller.Entitiespublic bool EnableGroupByMetadataKey { get; set; }public bool? HasChapterImages { get; set; }- public ValueTuple<string, SortOrder>[] OrderBy { get; set; }+ public ValueTuple<string, SortOrder>[] OrderBy { get; set; }public DateTime? MinDateCreated { get; set; }public DateTime? MinDateLastSaved { get; set; }diff --git a/MediaBrowser.Controller/Entities/User.cs b/MediaBrowser.Controller/Entities/User.csindex f569c80219..1cecfe44ec 100644--- a/MediaBrowser.Controller/Entities/User.cs+++ b/MediaBrowser.Controller/Entities/User.cs@@ -19,7 +19,7 @@ namespace MediaBrowser.Controller.Entitiespublic static IXmlSerializer XmlSerializer { get; set; }/// <summary>- /// From now on all user paths will be Id-based.+ /// From now on all user paths will be Id-based./// This is for backwards compatibility./// </summary>public bool UsesIdForConfigurationPath { get; set; }diff --git a/MediaBrowser.Controller/Entities/UserItemData.cs b/MediaBrowser.Controller/Entities/UserItemData.csindex 0e13269499..fd118be9e9 100644--- a/MediaBrowser.Controller/Entities/UserItemData.cs+++ b/MediaBrowser.Controller/Entities/UserItemData.cs@@ -90,7 +90,7 @@ namespace MediaBrowser.Controller.Entitiespublic int? SubtitleStreamIndex { get; set; }public const double MinLikeValue = 6.5;-+/// <summary>/// This is an interpreted property to indicate likes or dislikes/// This should never be serialized.diff --git a/MediaBrowser.Controller/IServerApplicationHost.cs b/MediaBrowser.Controller/IServerApplicationHost.csindex 4dc5590312..57a3bbc0a8 100644--- a/MediaBrowser.Controller/IServerApplicationHost.cs+++ b/MediaBrowser.Controller/IServerApplicationHost.cs@@ -37,7 +37,7 @@ namespace MediaBrowser.Controller/// </summary>/// <value>The HTTPS port.</value>int HttpsPort { get; }-+/// <summary>/// Gets a value indicating whether [supports HTTPS]./// </summary>diff --git a/MediaBrowser.Controller/IServerApplicationPaths.cs b/MediaBrowser.Controller/IServerApplicationPaths.csindex 5fb7968dd9..7f2605fab0 100644--- a/MediaBrowser.Controller/IServerApplicationPaths.cs+++ b/MediaBrowser.Controller/IServerApplicationPaths.cs@@ -16,7 +16,7 @@ namespace MediaBrowser.Controller/// </summary>/// <value>The application resources path.</value>string ApplicationResourcesPath { get; }-+/// <summary>/// Gets the path to the default user view directory. Used if no specific user view is defined./// </summary>diff --git a/MediaBrowser.Controller/Library/IUserManager.cs b/MediaBrowser.Controller/Library/IUserManager.csindex d29b164ef6..154ef3b059 100644--- a/MediaBrowser.Controller/Library/IUserManager.cs+++ b/MediaBrowser.Controller/Library/IUserManager.cs@@ -123,7 +123,7 @@ namespace MediaBrowser.Controller.Library/// <param name="user">The user.</param>/// <returns>Task.</returns>void ResetEasyPassword(User user);-+/// <summary>/// Changes the password./// </summary>@@ -133,7 +133,7 @@ namespace MediaBrowser.Controller.Library/// Changes the easy password./// </summary>void ChangeEasyPassword(User user, string newPassword, string newPasswordSha1);-+/// <summary>/// Gets the user dto./// </summary>diff --git a/MediaBrowser.Controller/Library/ItemResolveArgs.cs b/MediaBrowser.Controller/Library/ItemResolveArgs.csindex 9812802e7f..238dd28800 100644--- a/MediaBrowser.Controller/Library/ItemResolveArgs.cs+++ b/MediaBrowser.Controller/Library/ItemResolveArgs.cs@@ -126,7 +126,7 @@ namespace MediaBrowser.Controller.Library{var item = parent as T;- // Just in case the user decided to nest episodes.+ // Just in case the user decided to nest episodes.// Not officially supported but in some cases we can handle it.if (item == null){diff --git a/MediaBrowser.Controller/LiveTv/ChannelInfo.cs b/MediaBrowser.Controller/LiveTv/ChannelInfo.csindex c000da8528..f45c7b71ab 100644--- a/MediaBrowser.Controller/LiveTv/ChannelInfo.cs+++ b/MediaBrowser.Controller/LiveTv/ChannelInfo.cs@@ -36,7 +36,7 @@ namespace MediaBrowser.Controller.LiveTv/// </summary>/// <value>The tuner host identifier.</value>public string TunerHostId { get; set; }-+/// <summary>/// Gets or sets the type of the channel./// </summary>diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs b/MediaBrowser.Controller/LiveTv/ILiveTvService.csindex 601fb69aa3..5986474d86 100644--- a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs+++ b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs@@ -99,7 +99,7 @@ namespace MediaBrowser.Controller.LiveTv/// <param name="program">The program.</param>/// <returns>Task{SeriesTimerInfo}.</returns>Task<SeriesTimerInfo> GetNewTimerDefaultsAsync(CancellationToken cancellationToken, ProgramInfo program = null);-+/// <summary>/// Gets the series timers asynchronous./// </summary>diff --git a/MediaBrowser.Controller/LiveTv/LiveTvServiceStatusInfo.cs b/MediaBrowser.Controller/LiveTv/LiveTvServiceStatusInfo.csindex 4da238acf5..20e5d228b8 100644--- a/MediaBrowser.Controller/LiveTv/LiveTvServiceStatusInfo.cs+++ b/MediaBrowser.Controller/LiveTv/LiveTvServiceStatusInfo.cs@@ -39,7 +39,7 @@ namespace MediaBrowser.Controller.LiveTv/// </summary>/// <value><c>true</c> if this instance is visible; otherwise, <c>false</c>.</value>public bool IsVisible { get; set; }-+public LiveTvServiceStatusInfo(){Tuners = new List<LiveTvTunerInfo>();diff --git a/MediaBrowser.Controller/LiveTv/LiveTvTunerInfo.cs b/MediaBrowser.Controller/LiveTv/LiveTvTunerInfo.csindex 5c001f2883..ade25abdc6 100644--- a/MediaBrowser.Controller/LiveTv/LiveTvTunerInfo.cs+++ b/MediaBrowser.Controller/LiveTv/LiveTvTunerInfo.cs@@ -28,7 +28,7 @@ namespace MediaBrowser.Controller.LiveTv/// </summary>/// <value>The URL.</value>public string Url { get; set; }-+/// <summary>/// Gets or sets the status./// </summary>@@ -52,7 +52,7 @@ namespace MediaBrowser.Controller.LiveTv/// </summary>/// <value>The name of the program.</value>public string ProgramName { get; set; }-+/// <summary>/// Gets or sets the clients./// </summary>@@ -64,7 +64,7 @@ namespace MediaBrowser.Controller.LiveTv/// </summary>/// <value><c>true</c> if this instance can reset; otherwise, <c>false</c>.</value>public bool CanReset { get; set; }-+public LiveTvTunerInfo(){Clients = new List<string>();diff --git a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs b/MediaBrowser.Controller/LiveTv/RecordingInfo.csindex 3006b9bbef..0ca4749d75 100644--- a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs+++ b/MediaBrowser.Controller/LiveTv/RecordingInfo.cs@@ -22,7 +22,7 @@ namespace MediaBrowser.Controller.LiveTv/// </summary>/// <value>The timer identifier.</value>public string TimerId { get; set; }-+/// <summary>/// ChannelId of the recording./// </summary>@@ -33,7 +33,7 @@ namespace MediaBrowser.Controller.LiveTv/// </summary>/// <value>The type of the channel.</value>public ChannelType ChannelType { get; set; }-+/// <summary>/// Name of the recording./// </summary>@@ -50,7 +50,7 @@ namespace MediaBrowser.Controller.LiveTv/// </summary>/// <value>The URL.</value>public string Url { get; set; }-+/// <summary>/// Gets or sets the overview./// </summary>diff --git a/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs b/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.csindex 5c73ed833f..a9bb9f4e86 100644--- a/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs+++ b/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs@@ -15,13 +15,13 @@ namespace MediaBrowser.Controller.LiveTv/// ChannelId of the recording./// </summary>public string ChannelId { get; set; }-+/// <summary>/// Gets or sets the program identifier./// </summary>/// <value>The program identifier.</value>public string ProgramId { get; set; }-+/// <summary>/// Name of the recording./// </summary>@@ -66,7 +66,7 @@ namespace MediaBrowser.Controller.LiveTv/// </summary>/// <value><c>true</c> if [record new only]; otherwise, <c>false</c>.</value>public bool RecordNewOnly { get; set; }-+/// <summary>/// Gets or sets the days./// </summary>@@ -108,7 +108,7 @@ namespace MediaBrowser.Controller.LiveTv/// </summary>/// <value>The series identifier.</value>public string SeriesId { get; set; }-+public SeriesTimerInfo(){Days = new List<DayOfWeek>();diff --git a/MediaBrowser.Controller/MediaEncoding/ImageEncodingOptions.cs b/MediaBrowser.Controller/MediaEncoding/ImageEncodingOptions.csindex a8d1e5a0f1..d69c2e47df 100644--- a/MediaBrowser.Controller/MediaEncoding/ImageEncodingOptions.cs+++ b/MediaBrowser.Controller/MediaEncoding/ImageEncodingOptions.cs@@ -4,7 +4,7 @@ namespace MediaBrowser.Controller.MediaEncodingpublic class ImageEncodingOptions{public string InputPath { get; set; }-+public int? Width { get; set; }public int? Height { get; set; }@@ -14,7 +14,7 @@ namespace MediaBrowser.Controller.MediaEncodingpublic int? MaxHeight { get; set; }public int? Quality { get; set; }-+public string Format { get; set; }}}diff --git a/MediaBrowser.Controller/Net/AuthorizationInfo.cs b/MediaBrowser.Controller/Net/AuthorizationInfo.csindex 848d8fa15c..86c7b7e0f5 100644--- a/MediaBrowser.Controller/Net/AuthorizationInfo.cs+++ b/MediaBrowser.Controller/Net/AuthorizationInfo.cs@@ -9,12 +9,12 @@ namespace MediaBrowser.Controller.Net/// Gets or sets the user identifier./// </summary>/// <value>The user identifier.</value>- public Guid UserId {+ public Guid UserId {get {return User == null ? Guid.Empty : User.Id;}}-+/// <summary>/// Gets or sets the device identifier./// </summary>diff --git a/MediaBrowser.Controller/Net/BasePeriodicWebSocketListener.cs b/MediaBrowser.Controller/Net/BasePeriodicWebSocketListener.csindex 31ec149bf9..7bcd66e56f 100644--- a/MediaBrowser.Controller/Net/BasePeriodicWebSocketListener.cs+++ b/MediaBrowser.Controller/Net/BasePeriodicWebSocketListener.cs@@ -93,7 +93,7 @@ namespace MediaBrowser.Controller.Netprotected virtual void ParseMessageParams(string[] values){-+}/// <summary>diff --git a/MediaBrowser.Controller/Net/IAuthorizationContext.cs b/MediaBrowser.Controller/Net/IAuthorizationContext.csindex 5a9d0aa30c..9b9b2226ad 100644--- a/MediaBrowser.Controller/Net/IAuthorizationContext.cs+++ b/MediaBrowser.Controller/Net/IAuthorizationContext.cs@@ -10,7 +10,7 @@ namespace MediaBrowser.Controller.Net/// <param name="requestContext">The request context.</param>/// <returns>AuthorizationInfo.</returns>AuthorizationInfo GetAuthorizationInfo(object requestContext);-+/// <summary>/// Gets the authorization information./// </summary>diff --git a/MediaBrowser.Controller/Net/ISessionContext.cs b/MediaBrowser.Controller/Net/ISessionContext.csindex 37ddbc2b39..40e76c252d 100644--- a/MediaBrowser.Controller/Net/ISessionContext.cs+++ b/MediaBrowser.Controller/Net/ISessionContext.cs@@ -5,7 +5,7 @@ using MediaBrowser.Model.Services;namespace MediaBrowser.Controller.Net{- public interface ISessionContext+ public interface ISessionContext{SessionInfo GetSession(object requestContext);User GetUser(object requestContext);diff --git a/MediaBrowser.Controller/Plugins/ILocalizablePlugin.cs b/MediaBrowser.Controller/Plugins/ILocalizablePlugin.csindex d294107d74..e914fc2000 100644--- a/MediaBrowser.Controller/Plugins/ILocalizablePlugin.cs+++ b/MediaBrowser.Controller/Plugins/ILocalizablePlugin.cs@@ -15,6 +15,6 @@ namespace MediaBrowser.Controller.Plugins// Find all dictionaries using GetManifestResourceNames, start start with the prefix// Return the one for the culture if exists, otherwise return the defaultreturn null;- }+ }}}diff --git a/MediaBrowser.Controller/Properties/AssemblyInfo.cs b/MediaBrowser.Controller/Properties/AssemblyInfo.csindex 844b93f37d..a28296c18a 100644--- a/MediaBrowser.Controller/Properties/AssemblyInfo.cs+++ b/MediaBrowser.Controller/Properties/AssemblyInfo.cs@@ -1,7 +1,7 @@using System.Reflection;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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.Controller")]@@ -13,15 +13,15 @@ using System.Runtime.InteropServices;[assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]-// Setting ComVisible to false makes the types in this assembly not visible-// to COM components. If you need to access a type in this assembly from+// Setting ComVisible to false makes the types in this assembly not visible+// to COM components. If you need to access a type in this assembly from// COM, set the ComVisible attribute to true on that type.[assembly: ComVisible(false)]// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//\ No newline at end of filediff --git a/MediaBrowser.Controller/Providers/ILocalMetadataProvider.cs b/MediaBrowser.Controller/Providers/ILocalMetadataProvider.csindex fc4cca19c8..68f1ae589b 100644--- a/MediaBrowser.Controller/Providers/ILocalMetadataProvider.cs+++ b/MediaBrowser.Controller/Providers/ILocalMetadataProvider.cs@@ -18,7 +18,7 @@ namespace MediaBrowser.Controller.Providers/// <param name="directoryService">The directory service.</param>/// <param name="cancellationToken">The cancellation token.</param>/// <returns>Task{MetadataResult{`0}}.</returns>- Task<MetadataResult<TItemType>> GetMetadata(ItemInfo info,+ Task<MetadataResult<TItemType>> GetMetadata(ItemInfo info,IDirectoryService directoryService,CancellationToken cancellationToken);}diff --git a/MediaBrowser.Controller/Providers/IPreRefreshProvider.cs b/MediaBrowser.Controller/Providers/IPreRefreshProvider.csindex 6086749052..4170bb3752 100644--- a/MediaBrowser.Controller/Providers/IPreRefreshProvider.cs+++ b/MediaBrowser.Controller/Providers/IPreRefreshProvider.cs@@ -2,6 +2,6 @@ namespace MediaBrowser.Controller.Providers{public interface IPreRefreshProvider : ICustomMetadataProvider{-+}}\ No newline at end of filediff --git a/MediaBrowser.Controller/Providers/IRemoteImageProvider.cs b/MediaBrowser.Controller/Providers/IRemoteImageProvider.csindex 5db5ddbb28..32f51c650f 100644--- a/MediaBrowser.Controller/Providers/IRemoteImageProvider.cs+++ b/MediaBrowser.Controller/Providers/IRemoteImageProvider.cs@@ -19,7 +19,7 @@ namespace MediaBrowser.Controller.Providers/// <param name="item">The item.</param>/// <returns>IEnumerable{ImageType}.</returns>IEnumerable<ImageType> GetSupportedImages(BaseItem item);-+/// <summary>/// Gets the images./// </summary>diff --git a/MediaBrowser.Controller/Resolvers/IItemResolver.cs b/MediaBrowser.Controller/Resolvers/IItemResolver.csindex 3af5d5f7f6..298ec248aa 100644--- a/MediaBrowser.Controller/Resolvers/IItemResolver.cs+++ b/MediaBrowser.Controller/Resolvers/IItemResolver.cs@@ -29,7 +29,7 @@ namespace MediaBrowser.Controller.Resolverspublic interface IMultiItemResolver{MultiItemResolverResult ResolveMultiple(Folder parent,- List<FileSystemMetadata> files,+ List<FileSystemMetadata> files,string collectionType,IDirectoryService directoryService);}diff --git a/MediaBrowser.Controller/Security/AuthenticationInfo.cs b/MediaBrowser.Controller/Security/AuthenticationInfo.csindex c75bf89e41..ecb3866d0a 100644--- a/MediaBrowser.Controller/Security/AuthenticationInfo.cs+++ b/MediaBrowser.Controller/Security/AuthenticationInfo.cs@@ -33,7 +33,7 @@ namespace MediaBrowser.Controller.Security/// </summary>/// <value>The application version.</value>public string AppVersion { get; set; }-+/// <summary>/// Gets or sets the name of the device./// </summary>diff --git a/MediaBrowser.Controller/Security/AuthenticationInfoQuery.cs b/MediaBrowser.Controller/Security/AuthenticationInfoQuery.csindex 125534c46b..2fa988ec14 100644--- a/MediaBrowser.Controller/Security/AuthenticationInfoQuery.cs+++ b/MediaBrowser.Controller/Security/AuthenticationInfoQuery.cs@@ -21,7 +21,7 @@ namespace MediaBrowser.Controller.Security/// </summary>/// <value>The access token.</value>public string AccessToken { get; set; }-+/// <summary>/// Gets or sets a value indicating whether this instance is active./// </summary>@@ -33,7 +33,7 @@ namespace MediaBrowser.Controller.Security/// </summary>/// <value><c>null</c> if [has user] contains no value, <c>true</c> if [has user]; otherwise, <c>false</c>.</value>public bool? HasUser { get; set; }-+/// <summary>/// Gets or sets the start index./// </summary>diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.csindex eca345cbcb..1b51ddc161 100644--- a/MediaBrowser.Controller/Session/ISessionManager.cs+++ b/MediaBrowser.Controller/Session/ISessionManager.cs@@ -43,7 +43,7 @@ namespace MediaBrowser.Controller.Sessionevent EventHandler<SessionEventArgs> SessionEnded;event EventHandler<SessionEventArgs> SessionActivity;-+/// <summary>/// Occurs when [capabilities changed]./// </summary>@@ -58,7 +58,7 @@ namespace MediaBrowser.Controller.Session/// Occurs when [authentication succeeded]./// </summary>event EventHandler<GenericEventArgs<AuthenticationResult>> AuthenticationSucceeded;-+/// <summary>/// Gets the sessions./// </summary>@@ -119,7 +119,7 @@ namespace MediaBrowser.Controller.Session/// <param name="cancellationToken">The cancellation token.</param>/// <returns>Task.</returns>Task SendGeneralCommand(string controllingSessionId, string sessionId, GeneralCommand command, CancellationToken cancellationToken);-+/// <summary>/// Sends the message command./// </summary>@@ -189,7 +189,7 @@ namespace MediaBrowser.Controller.Session/// <param name="cancellationToken">The cancellation token.</param>/// <returns>Task.</returns>Task SendMessageToUserDeviceSessions<T>(string deviceId, string name, T data, CancellationToken cancellationToken);-+/// <summary>/// Sends the restart required message./// </summary>diff --git a/MediaBrowser.LocalMetadata/Properties/AssemblyInfo.cs b/MediaBrowser.LocalMetadata/Properties/AssemblyInfo.csindex 0d5a8003e4..bffe0469f1 100644--- a/MediaBrowser.LocalMetadata/Properties/AssemblyInfo.cs+++ b/MediaBrowser.LocalMetadata/Properties/AssemblyInfo.cs@@ -1,7 +1,7 @@using System.Reflection;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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.LocalMetadata")]@@ -13,8 +13,8 @@ using System.Runtime.InteropServices;[assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]-// Setting ComVisible to false makes the types in this assembly not visible-// to COM components. If you need to access a type in this assembly from+// Setting ComVisible to false makes the types in this assembly not visible+// to COM components. If you need to access a type in this assembly from// COM, set the ComVisible attribute to true on that type.[assembly: ComVisible(false)]@@ -24,10 +24,10 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//-// You can specify all the values or you can default the Build and Revision Numbers+// You can specify all the values or you can default the Build and Revision Numbers// by using the '*' as shown below:// [assembly: AssemblyVersion("1.0.*")]\ No newline at end of filediff --git a/MediaBrowser.MediaEncoding/Encoder/EncodingJob.cs b/MediaBrowser.MediaEncoding/Encoder/EncodingJob.csindex 9761de98fb..1edc5c2011 100644--- a/MediaBrowser.MediaEncoding/Encoder/EncodingJob.cs+++ b/MediaBrowser.MediaEncoding/Encoder/EncodingJob.cs@@ -46,7 +46,7 @@ namespace MediaBrowser.MediaEncoding.Encoderprivate readonly ILogger _logger;private readonly IMediaSourceManager _mediaSourceManager;- public EncodingJob(ILogger logger, IMediaSourceManager mediaSourceManager) :+ public EncodingJob(ILogger logger, IMediaSourceManager mediaSourceManager) :base(logger, mediaSourceManager, TranscodingJobType.Progressive){_logger = logger;diff --git a/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs b/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.csindex 4e6ee89e1b..34bc8d1b93 100644--- a/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs+++ b/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs@@ -25,7 +25,7 @@ namespace MediaBrowser.MediaEncoding.Encoderprivate readonly IMediaEncoder _mediaEncoder;protected static readonly CultureInfo UsCulture = new CultureInfo("en-US");-+public EncodingJobFactory(ILogger logger, ILibraryManager libraryManager, IMediaSourceManager mediaSourceManager, IConfigurationManager config, IMediaEncoder mediaEncoder){_logger = logger;@@ -255,7 +255,7 @@ namespace MediaBrowser.MediaEncoding.Encoderif (profile == null){- // Don't use settings from the default profile.+ // Don't use settings from the default profile.// Only use a specific profile if it was requested.return;}diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.csindex a93dd97421..96fe416b25 100644--- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs+++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs@@ -362,7 +362,7 @@ namespace MediaBrowser.MediaEncoding.Encoderprivate Tuple<string, string> GetPathsFromDirectory(string path){- // Since we can't predict the file extension, first try directly within the folder+ // Since we can't predict the file extension, first try directly within the folder// If that doesn't pan out, then do a recursive searchvar files = FileSystem.GetFilePaths(path);@@ -525,7 +525,7 @@ namespace MediaBrowser.MediaEncoding.EncoderCreateNoWindow = true,UseShellExecute = false,- // Must consume both or ffmpeg may hang due to deadlocks. See comments below.+ // Must consume both or ffmpeg may hang due to deadlocks. See comments below.RedirectStandardOutput = true,FileName = FFProbePath,Arguments = string.Format(args, probeSizeArgument, inputPath).Trim(),@@ -648,7 +648,7 @@ namespace MediaBrowser.MediaEncoding.Encodervar tempExtractPath = Path.Combine(ConfigurationManager.ApplicationPaths.TempDirectory, Guid.NewGuid() + ".jpg");FileSystem.CreateDirectory(FileSystem.GetDirectoryName(tempExtractPath));- // apply some filters to thumbnail extracted below (below) crop any black lines that we made and get the correct ar then scale to width 600.+ // apply some filters to thumbnail extracted below (below) crop any black lines that we made and get the correct ar then scale to width 600.// This filter chain may have adverse effects on recorded tv thumbnails if ar changes during presentation ex. commercials @ diff arvar vf = "scale=600:trunc(600/dar/2)*2";@@ -676,7 +676,7 @@ namespace MediaBrowser.MediaEncoding.Encoderbreak;}}-+var mapArg = imageStreamIndex.HasValue ? (" -map 0:v:" + imageStreamIndex.Value.ToString(CultureInfo.InvariantCulture)) : string.Empty;var enableThumbnail = !new List<string> { "wtv" }.Contains(container ?? string.Empty, StringComparer.OrdinalIgnoreCase);diff --git a/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs b/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.csindex eef2732509..350a2e3e5a 100644--- a/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs+++ b/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs@@ -149,7 +149,7 @@ namespace MediaBrowser.MediaEncoding.Probing/// </summary>/// <value>The bits_per_raw_sample.</value>public int bits_per_raw_sample { get; set; }-+/// <summary>/// Gets or sets the r_frame_rate./// </summary>diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.csindex 5367a87f7b..0b168f10e8 100644--- a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs+++ b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs@@ -132,7 +132,7 @@ namespace MediaBrowser.MediaEncoding.Probingif (!string.IsNullOrWhiteSpace(iTunEXTC)){var parts = iTunEXTC.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);- // Example+ // Example// mpaa|G|100|For crude humorif (parts.Length > 1){@@ -423,7 +423,7 @@ namespace MediaBrowser.MediaEncoding.ProbingType = PersonType.Writer});}-+}else if (string.Equals(key, "producers", StringComparison.OrdinalIgnoreCase)){@@ -619,7 +619,7 @@ namespace MediaBrowser.MediaEncoding.Probingelse if (string.Equals(stream.Codec, "mjpeg", StringComparison.OrdinalIgnoreCase)){// How to differentiate between video and embedded image?- // The only difference I've seen thus far is presence of codec tag, also embedded images have high (unusual) framerates+ // The only difference I've seen thus far is presence of codec tag, also embedded images have high (unusual) frameratesif (!string.IsNullOrWhiteSpace(stream.CodecTag)){stream.Type = MediaStreamType.Video;@@ -1054,7 +1054,7 @@ namespace MediaBrowser.MediaEncoding.Probing/// <returns>System.String[][].</returns>private IEnumerable<string> Split(string val, bool allowCommaDelimiter){- // Only use the comma as a delimeter if there are no slashes or pipes.+ // Only use the comma as a delimeter if there are no slashes or pipes.// We want to be careful not to split names that have commas in themvar delimeter = !allowCommaDelimiter || _nameDelimiters.Any(i => val.IndexOf(i) != -1) ?_nameDelimiters :diff --git a/MediaBrowser.MediaEncoding/Properties/AssemblyInfo.cs b/MediaBrowser.MediaEncoding/Properties/AssemblyInfo.csindex 53f4eb4035..2f26648d0d 100644--- a/MediaBrowser.MediaEncoding/Properties/AssemblyInfo.cs+++ b/MediaBrowser.MediaEncoding/Properties/AssemblyInfo.cs@@ -1,7 +1,7 @@using System.Reflection;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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.MediaEncoding")]@@ -13,8 +13,8 @@ using System.Runtime.InteropServices;[assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]-// Setting ComVisible to false makes the types in this assembly not visible-// to COM components. If you need to access a type in this assembly from+// Setting ComVisible to false makes the types in this assembly not visible+// to COM components. If you need to access a type in this assembly from// COM, set the ComVisible attribute to true on that type.[assembly: ComVisible(false)]@@ -24,10 +24,10 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//-// You can specify all the values or you can default the Build and Revision Numbers+// You can specify all the values or you can default the Build and Revision Numbers// by using the '*' as shown below:// [assembly: AssemblyVersion("1.0.*")]\ No newline at end of filediff --git a/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs b/MediaBrowser.MediaEncoding/Subtitles/AssParser.csindex 71fefba44a..73df2b1e0b 100644--- a/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs+++ b/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs@@ -29,7 +29,7 @@ namespace MediaBrowser.MediaEncoding.Subtitleswhile ((line = reader.ReadLine()) != null){cancellationToken.ThrowIfCancellationRequested();-+if (string.IsNullOrWhiteSpace(line)){continue;@@ -49,7 +49,7 @@ namespace MediaBrowser.MediaEncoding.SubtitlesRemoteNativeFormatting(subEvent);subEvent.Text = subEvent.Text.Replace("\\n", ParserValues.NewLine, StringComparison.OrdinalIgnoreCase);-+subEvent.Text = Regex.Replace(subEvent.Text, @"\{(\\[\w]+\(?([\w\d]+,?)+\)?)+\}", string.Empty, RegexOptions.IgnoreCase);trackEvents.Add(subEvent);diff --git a/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs b/MediaBrowser.MediaEncoding/Subtitles/SrtParser.csindex 7ca8aa1fd8..e9f9c6f58a 100644--- a/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs+++ b/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs@@ -43,7 +43,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles{continue;}-+var time = Regex.Split(line, @"[\t ]*-->[\t ]*");if (time.Length < 2)@@ -85,7 +85,7 @@ namespace MediaBrowser.MediaEncoding.SubtitlesTimeSpan span;return TimeSpan.TryParseExact(time, @"hh\:mm\:ss\.fff", _usCulture, out span)? span.Ticks- : (TimeSpan.TryParseExact(time, @"hh\:mm\:ss\,fff", _usCulture, out span)+ : (TimeSpan.TryParseExact(time, @"hh\:mm\:ss\,fff", _usCulture, out span)? span.Ticks : 0);}}diff --git a/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs b/MediaBrowser.MediaEncoding/Subtitles/SsaParser.csindex a2cee77935..022fca1c8f 100644--- a/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs+++ b/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs@@ -129,8 +129,8 @@ namespace MediaBrowser.MediaEncoding.Subtitles}}}- }-+ }+//if (header.Length > 0)//subtitle.Header = header.ToString();diff --git a/MediaBrowser.MediaEncoding/Subtitles/TtmlWriter.cs b/MediaBrowser.MediaEncoding/Subtitles/TtmlWriter.csindex c32005f897..f0cf3b31ad 100644--- a/MediaBrowser.MediaEncoding/Subtitles/TtmlWriter.cs+++ b/MediaBrowser.MediaEncoding/Subtitles/TtmlWriter.cs@@ -45,7 +45,7 @@ namespace MediaBrowser.MediaEncoding.Subtitleswriter.WriteLine("</div>");writer.WriteLine("</body>");-+writer.WriteLine("</tt>");}}diff --git a/MediaBrowser.Model/Channels/ChannelFeatures.cs b/MediaBrowser.Model/Channels/ChannelFeatures.csindex d4caf499ba..259370b7ee 100644--- a/MediaBrowser.Model/Channels/ChannelFeatures.cs+++ b/MediaBrowser.Model/Channels/ChannelFeatures.cs@@ -61,7 +61,7 @@ namespace MediaBrowser.Model.Channels/// </summary>/// <value><c>true</c> if [supports latest media]; otherwise, <c>false</c>.</value>public bool SupportsLatestMedia { get; set; }-+/// <summary>/// Gets or sets a value indicating whether this instance can filter./// </summary>diff --git a/MediaBrowser.Model/Channels/ChannelQuery.cs b/MediaBrowser.Model/Channels/ChannelQuery.csindex 6b5e95d698..9651cb6c26 100644--- a/MediaBrowser.Model/Channels/ChannelQuery.cs+++ b/MediaBrowser.Model/Channels/ChannelQuery.cs@@ -14,7 +14,7 @@ namespace MediaBrowser.Model.Channelspublic bool? EnableImages { get; set; }public int? ImageTypeLimit { get; set; }public ImageType[] EnableImageTypes { get; set; }-+/// <summary>/// Gets or sets the user identifier./// </summary>diff --git a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.csindex 08bf2379f6..76b5924e96 100644--- a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs+++ b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs@@ -40,7 +40,7 @@ namespace MediaBrowser.Model.Configuration/// </summary>/// <value>The cache path.</value>public string CachePath { get; set; }-+/// <summary>/// Initializes a new instance of the <see cref="BaseApplicationConfiguration" /> class./// </summary>diff --git a/MediaBrowser.Model/Dlna/AudioOptions.cs b/MediaBrowser.Model/Dlna/AudioOptions.csindex 189f646350..9480311b53 100644--- a/MediaBrowser.Model/Dlna/AudioOptions.cs+++ b/MediaBrowser.Model/Dlna/AudioOptions.cs@@ -55,7 +55,7 @@ namespace MediaBrowser.Model.Dlna/// </summary>/// <value>The audio transcoding bitrate.</value>public int? AudioTranscodingBitrate { get; set; }-+/// <summary>/// Gets the maximum bitrate./// </summary>diff --git a/MediaBrowser.Model/Dlna/CodecProfile.cs b/MediaBrowser.Model/Dlna/CodecProfile.csindex 6d143962dd..c40408e9b5 100644--- a/MediaBrowser.Model/Dlna/CodecProfile.cs+++ b/MediaBrowser.Model/Dlna/CodecProfile.cs@@ -9,7 +9,7 @@ namespace MediaBrowser.Model.Dlna{[XmlAttribute("type")]public CodecType Type { get; set; }-+public ProfileCondition[] Conditions { get; set; }public ProfileCondition[] ApplyConditions { get; set; }diff --git a/MediaBrowser.Model/Dlna/ConditionProcessor.cs b/MediaBrowser.Model/Dlna/ConditionProcessor.csindex a550ee9826..5bcee6de29 100644--- a/MediaBrowser.Model/Dlna/ConditionProcessor.cs+++ b/MediaBrowser.Model/Dlna/ConditionProcessor.cs@@ -98,7 +98,7 @@ namespace MediaBrowser.Model.Dlnapublic bool IsVideoAudioConditionSatisfied(ProfileCondition condition,int? audioChannels,int? audioBitrate,- int? audioSampleRate,+ int? audioSampleRate,int? audioBitDepth,string audioProfile,bool? isSecondaryTrack)diff --git a/MediaBrowser.Model/Dlna/ProfileCondition.cs b/MediaBrowser.Model/Dlna/ProfileCondition.csindex 9234a27136..39f99b92ee 100644--- a/MediaBrowser.Model/Dlna/ProfileCondition.cs+++ b/MediaBrowser.Model/Dlna/ProfileCondition.cs@@ -24,7 +24,7 @@ namespace MediaBrowser.Model.Dlnapublic ProfileCondition(ProfileConditionType condition, ProfileConditionValue property, string value): this(condition, property, value, false){-+}public ProfileCondition(ProfileConditionType condition, ProfileConditionValue property, string value, bool isRequired)diff --git a/MediaBrowser.Model/Dlna/SearchCriteria.cs b/MediaBrowser.Model/Dlna/SearchCriteria.csindex 533605d892..4f931d1b1b 100644--- a/MediaBrowser.Model/Dlna/SearchCriteria.cs+++ b/MediaBrowser.Model/Dlna/SearchCriteria.cs@@ -48,7 +48,7 @@ namespace MediaBrowser.Model.Dlnaif (subFactors.Length == 3){- if (StringHelper.EqualsIgnoreCase("upnp:class", subFactors[0]) &&+ if (StringHelper.EqualsIgnoreCase("upnp:class", subFactors[0]) &&(StringHelper.EqualsIgnoreCase("=", subFactors[1]) || StringHelper.EqualsIgnoreCase("derivedfrom", subFactors[1]))){if (StringHelper.EqualsIgnoreCase("\"object.item.imageItem\"", subFactors[2]) || StringHelper.EqualsIgnoreCase("\"object.item.imageItem.photo\"", subFactors[2]))diff --git a/MediaBrowser.Model/Dlna/SortCriteria.cs b/MediaBrowser.Model/Dlna/SortCriteria.csindex 600a2f58e9..ecaf32614c 100644--- a/MediaBrowser.Model/Dlna/SortCriteria.cs+++ b/MediaBrowser.Model/Dlna/SortCriteria.cs@@ -11,7 +11,7 @@ namespace MediaBrowser.Model.Dlnapublic SortCriteria(string value){-+}}}diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.csindex 41306b4c38..b4021e9999 100644--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs@@ -951,7 +951,7 @@ namespace MediaBrowser.Model.Dlnaif (audioStream != null){- // Seeing webm encoding failures when source has 1 audio channel and 22k bitrate.+ // Seeing webm encoding failures when source has 1 audio channel and 22k bitrate.// Any attempts to transcode over 64k will failif (audioStream.Channels.HasValue &&audioStream.Channels.Value == 1)diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.csindex 746d38679a..7ff8837986 100644--- a/MediaBrowser.Model/Dto/BaseItemDto.cs+++ b/MediaBrowser.Model/Dto/BaseItemDto.cs@@ -46,7 +46,7 @@ namespace MediaBrowser.Model.Dto/// </summary>/// <value>The type of the source.</value>public string SourceType { get; set; }-+/// <summary>/// Gets or sets the playlist item identifier./// </summary>diff --git a/MediaBrowser.Model/Dto/GameSystemSummary.cs b/MediaBrowser.Model/Dto/GameSystemSummary.csindex 0f21533a0d..b42e988420 100644--- a/MediaBrowser.Model/Dto/GameSystemSummary.cs+++ b/MediaBrowser.Model/Dto/GameSystemSummary.cs@@ -18,7 +18,7 @@ namespace MediaBrowser.Model.Dto/// </summary>/// <value>The name.</value>public string DisplayName { get; set; }-+/// <summary>/// Gets or sets the game count./// </summary>diff --git a/MediaBrowser.Model/Dto/ImageOptions.cs b/MediaBrowser.Model/Dto/ImageOptions.csindex 98bd0279a7..e98d544353 100644--- a/MediaBrowser.Model/Dto/ImageOptions.cs+++ b/MediaBrowser.Model/Dto/ImageOptions.cs@@ -92,7 +92,7 @@ namespace MediaBrowser.Model.Dto/// </summary>/// <value>The un played count.</value>public int? UnPlayedCount { get; set; }-+/// <summary>/// Gets or sets the color of the background./// </summary>diff --git a/MediaBrowser.Model/Dto/NameValuePair.cs b/MediaBrowser.Model/Dto/NameValuePair.csindex a6e6879491..564e32dcdb 100644--- a/MediaBrowser.Model/Dto/NameValuePair.cs+++ b/MediaBrowser.Model/Dto/NameValuePair.cs@@ -5,7 +5,7 @@ namespace MediaBrowser.Model.Dto{public NameValuePair(){-+}public NameValuePair(string name, string value)diff --git a/MediaBrowser.Model/Dto/UserDto.cs b/MediaBrowser.Model/Dto/UserDto.csindex 8d7679fdb5..eb49796326 100644--- a/MediaBrowser.Model/Dto/UserDto.cs+++ b/MediaBrowser.Model/Dto/UserDto.cs@@ -44,13 +44,13 @@ namespace MediaBrowser.Model.Dto/// </summary>/// <value>The type of the connect link.</value>public UserLinkType? ConnectLinkType { get; set; }-+/// <summary>/// Gets or sets the id./// </summary>/// <value>The id.</value>public Guid Id { get; set; }-+/// <summary>/// Gets or sets the primary image tag./// </summary>diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.csindex 35369fbbb9..454e6ff162 100644--- a/MediaBrowser.Model/Entities/MediaStream.cs+++ b/MediaBrowser.Model/Entities/MediaStream.cs@@ -420,7 +420,7 @@ namespace MediaBrowser.Model.Entitiesvar fromCodec = Codec;- // Can't convert from this+ // Can't convert from thisif (StringHelper.EqualsIgnoreCase(fromCodec, "ass")){return false;@@ -430,7 +430,7 @@ namespace MediaBrowser.Model.Entitiesreturn false;}- // Can't convert to this+ // Can't convert to thisif (StringHelper.EqualsIgnoreCase(toCodec, "ass")){return false;diff --git a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs b/MediaBrowser.Model/Entities/ProviderIdsExtensions.csindex e10232baa9..35900b5449 100644--- a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs+++ b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs@@ -18,7 +18,7 @@ namespace MediaBrowser.Model.Entities{return !string.IsNullOrEmpty(instance.GetProviderId(provider.ToString()));}-+/// <summary>/// Gets a provider id/// </summary>@@ -65,7 +65,7 @@ namespace MediaBrowser.Model.Entities{throw new ArgumentNullException("instance");}-+// If it's null remove the key from the dictionaryif (string.IsNullOrEmpty(value)){diff --git a/MediaBrowser.Model/Extensions/LinqExtensions.cs b/MediaBrowser.Model/Extensions/LinqExtensions.csindex 1223e689e3..d50b570eaa 100644--- a/MediaBrowser.Model/Extensions/LinqExtensions.cs+++ b/MediaBrowser.Model/Extensions/LinqExtensions.cs@@ -6,13 +6,13 @@ 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.diff --git a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.csindex 5fe77d41ec..a9546bb95b 100644--- a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs+++ b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs@@ -37,7 +37,7 @@ namespace MediaBrowser.Model.LiveTv/// </summary>/// <value><c>true</c> if [enable favorite sorting]; otherwise, <c>false</c>.</value>public bool EnableFavoriteSorting { get; set; }-+/// <summary>/// Gets or sets the user identifier./// </summary>diff --git a/MediaBrowser.Model/Net/HttpException.cs b/MediaBrowser.Model/Net/HttpException.csindex 698b1bc7e1..2f45299e38 100644--- a/MediaBrowser.Model/Net/HttpException.cs+++ b/MediaBrowser.Model/Net/HttpException.cs@@ -28,7 +28,7 @@ namespace MediaBrowser.Model.Netpublic HttpException(string message, Exception innerException): base(message, innerException){-+}/// <summary>diff --git a/MediaBrowser.Model/Notifications/NotificationOption.cs b/MediaBrowser.Model/Notifications/NotificationOption.csindex ce49ae2090..51a07370f0 100644--- a/MediaBrowser.Model/Notifications/NotificationOption.cs+++ b/MediaBrowser.Model/Notifications/NotificationOption.cs@@ -21,7 +21,7 @@ namespace MediaBrowser.Model.Notifications/// </summary>/// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>public bool Enabled { get; set; }-+/// <summary>/// Gets or sets the disabled services./// </summary>diff --git a/MediaBrowser.Model/Properties/AssemblyInfo.cs b/MediaBrowser.Model/Properties/AssemblyInfo.csindex fabfd908ba..e34472f08f 100644--- a/MediaBrowser.Model/Properties/AssemblyInfo.cs+++ b/MediaBrowser.Model/Properties/AssemblyInfo.cs@@ -1,7 +1,7 @@using System.Reflection;using System.Resources;-// General Information about an assembly is controlled through the following+// 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")]@@ -17,7 +17,7 @@ using System.Resources;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//\ No newline at end of filediff --git a/MediaBrowser.Model/Providers/RemoteImageInfo.cs b/MediaBrowser.Model/Providers/RemoteImageInfo.csindex 6db7f77bdb..90c1ba0af2 100644--- a/MediaBrowser.Model/Providers/RemoteImageInfo.cs+++ b/MediaBrowser.Model/Providers/RemoteImageInfo.cs@@ -24,7 +24,7 @@ namespace MediaBrowser.Model.Providers/// Gets a url used for previewing a smaller version/// </summary>public string ThumbnailUrl { get; set; }-+/// <summary>/// Gets or sets the height./// </summary>diff --git a/MediaBrowser.Model/Querying/AllThemeMediaResult.cs b/MediaBrowser.Model/Querying/AllThemeMediaResult.csindex 89640eb65b..57114cc4af 100644--- a/MediaBrowser.Model/Querying/AllThemeMediaResult.cs+++ b/MediaBrowser.Model/Querying/AllThemeMediaResult.cs@@ -7,7 +7,7 @@public ThemeMediaResult ThemeSongsResult { get; set; }public ThemeMediaResult SoundtrackSongsResult { get; set; }-+public AllThemeMediaResult(){ThemeVideosResult = new ThemeMediaResult();diff --git a/MediaBrowser.Model/Querying/EpisodeQuery.cs b/MediaBrowser.Model/Querying/EpisodeQuery.csindex 78fe943e33..cae87b852c 100644--- a/MediaBrowser.Model/Querying/EpisodeQuery.cs+++ b/MediaBrowser.Model/Querying/EpisodeQuery.cs@@ -53,7 +53,7 @@ namespace MediaBrowser.Model.Querying/// </summary>/// <value>The start item identifier.</value>public string StartItemId { get; set; }-+public EpisodeQuery(){Fields = new ItemFields[] { };diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.csindex 92fa3822b6..ceccf5ee5d 100644--- a/MediaBrowser.Model/Querying/ItemFields.cs+++ b/MediaBrowser.Model/Querying/ItemFields.cs@@ -41,7 +41,7 @@/// The custom rating/// </summary>CustomRating,-+/// <summary>/// The date created of the item/// </summary>diff --git a/MediaBrowser.Model/Querying/NextUpQuery.cs b/MediaBrowser.Model/Querying/NextUpQuery.csindex d20ff99c2c..2af8738d7b 100644--- a/MediaBrowser.Model/Querying/NextUpQuery.cs+++ b/MediaBrowser.Model/Querying/NextUpQuery.cs@@ -16,13 +16,13 @@ namespace MediaBrowser.Model.Querying/// </summary>/// <value>The parent identifier.</value>public string ParentId { get; set; }-+/// <summary>/// Gets or sets the series id./// </summary>/// <value>The series id.</value>public string SeriesId { get; set; }-+/// <summary>/// Skips over a given number of items within the results. Use for paging./// </summary>diff --git a/MediaBrowser.Model/Search/SearchHint.cs b/MediaBrowser.Model/Search/SearchHint.csindex daa3566cfc..48da8e4bc5 100644--- a/MediaBrowser.Model/Search/SearchHint.cs+++ b/MediaBrowser.Model/Search/SearchHint.cs@@ -14,7 +14,7 @@ namespace MediaBrowser.Model.Searchpublic Guid ItemId { get; set; }public Guid Id { get; set; }-+/// <summary>/// Gets or sets the name./// </summary>@@ -26,7 +26,7 @@ namespace MediaBrowser.Model.Search/// </summary>/// <value>The matched term.</value>public string MatchedTerm { get; set; }-+/// <summary>/// Gets or sets the index number./// </summary>@@ -38,7 +38,7 @@ namespace MediaBrowser.Model.Search/// </summary>/// <value>The production year.</value>public int? ProductionYear { get; set; }-+/// <summary>/// Gets or sets the parent index number./// </summary>@@ -74,7 +74,7 @@ namespace MediaBrowser.Model.Search/// </summary>/// <value>The backdrop image item identifier.</value>public string BackdropImageItemId { get; set; }-+/// <summary>/// Gets or sets the type./// </summary>@@ -82,13 +82,13 @@ namespace MediaBrowser.Model.Searchpublic string Type { get; set; }public bool? IsFolder { get; set; }-+/// <summary>/// Gets or sets the run time ticks./// </summary>/// <value>The run time ticks.</value>public long? RunTimeTicks { get; set; }-+/// <summary>/// Gets or sets the type of the media./// </summary>diff --git a/MediaBrowser.Model/Serialization/IXmlSerializer.cs b/MediaBrowser.Model/Serialization/IXmlSerializer.csindex b26b673f3e..eb23d784fe 100644--- a/MediaBrowser.Model/Serialization/IXmlSerializer.cs+++ b/MediaBrowser.Model/Serialization/IXmlSerializer.cs@@ -34,7 +34,7 @@ namespace MediaBrowser.Model.Serialization/// <param name="file">The file.</param>/// <returns>System.Object.</returns>object DeserializeFromFile(Type type, string file);-+/// <summary>/// Deserializes from bytes./// </summary>diff --git a/MediaBrowser.Model/Services/ApiMemberAttribute.cs b/MediaBrowser.Model/Services/ApiMemberAttribute.csindex 4a28317757..9e5faad29f 100644--- a/MediaBrowser.Model/Services/ApiMemberAttribute.cs+++ b/MediaBrowser.Model/Services/ApiMemberAttribute.cs@@ -16,7 +16,7 @@ namespace MediaBrowser.Model.Servicespublic string ParameterType { get; set; }/// <summary>- /// Gets or sets unique name for the parameter. Each name must be unique, even if they are associated with different paramType values.+ /// Gets or sets unique name for the parameter. Each name must be unique, even if they are associated with different paramType values./// </summary>/// <remarks>/// <para>@@ -49,7 +49,7 @@ namespace MediaBrowser.Model.Servicespublic bool AllowMultiple { get; set; }/// <summary>- /// Gets or sets route to which applies attribute, matches using StartsWith. By default applies to all routes.+ /// Gets or sets route to which applies attribute, matches using StartsWith. By default applies to all routes./// </summary>public string Route { get; set; }diff --git a/MediaBrowser.Model/Services/IHasRequestFilter.cs b/MediaBrowser.Model/Services/IHasRequestFilter.csindex 2164179d50..90cfc2a310 100644--- a/MediaBrowser.Model/Services/IHasRequestFilter.cs+++ b/MediaBrowser.Model/Services/IHasRequestFilter.cs@@ -4,7 +4,7 @@ namespace MediaBrowser.Model.Servicespublic interface IHasRequestFilter{/// <summary>- /// Order in which Request Filters are executed.+ /// Order in which Request Filters are executed./// <0 Executed before global request filters/// >0 Executed after global request filters/// </summary>diff --git a/MediaBrowser.Model/Services/IHttpResponse.cs b/MediaBrowser.Model/Services/IHttpResponse.csindex cd9c07d46a..9d77eefc98 100644--- a/MediaBrowser.Model/Services/IHttpResponse.cs+++ b/MediaBrowser.Model/Services/IHttpResponse.cs@@ -17,7 +17,7 @@ namespace MediaBrowser.Model.Servicesvoid SetCookie(Cookie cookie);/// <summary>- /// Removes all pending Set-Cookie instructions+ /// Removes all pending Set-Cookie instructions/// </summary>void ClearCookies();}diff --git a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs b/MediaBrowser.Model/Session/PlaybackProgressInfo.csindex ce6b2875ea..dfdd42c363 100644--- a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs+++ b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs@@ -25,7 +25,7 @@ namespace MediaBrowser.Model.Session/// </summary>/// <value>The item identifier.</value>public Guid ItemId { get; set; }-+/// <summary>/// Gets or sets the session id./// </summary>diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.csindex a63ce5e66c..5d019932ad 100644--- a/MediaBrowser.Model/System/SystemInfo.cs+++ b/MediaBrowser.Model/System/SystemInfo.cs@@ -17,7 +17,7 @@ namespace MediaBrowser.Model.Systempublic string OperatingSystemDisplayName { get; set; }public string PackageName { get; set; }-+/// <summary>/// Gets or sets a value indicating whether this instance has pending restart./// </summary>diff --git a/MediaBrowser.Model/Tasks/ITaskManager.cs b/MediaBrowser.Model/Tasks/ITaskManager.csindex cbc18032c1..dd29cdb650 100644--- a/MediaBrowser.Model/Tasks/ITaskManager.cs+++ b/MediaBrowser.Model/Tasks/ITaskManager.cs@@ -52,7 +52,7 @@ namespace MediaBrowser.Model.Tasksvoid QueueIfNotRunning<T>()where T : IScheduledTask;-+/// <summary>/// Queues the scheduled task./// </summary>@@ -69,7 +69,7 @@ namespace MediaBrowser.Model.Tasksvoid Execute<T>()where T : IScheduledTask;-+event EventHandler<GenericEventArgs<IScheduledTaskWorker>> TaskExecuting;event EventHandler<TaskCompletionEventArgs> TaskCompleted;diff --git a/MediaBrowser.Model/Tasks/TaskResult.cs b/MediaBrowser.Model/Tasks/TaskResult.csindex 39eacdf664..9cc45a16b2 100644--- a/MediaBrowser.Model/Tasks/TaskResult.cs+++ b/MediaBrowser.Model/Tasks/TaskResult.cs@@ -36,7 +36,7 @@ namespace MediaBrowser.Model.Tasks/// </summary>/// <value>The key.</value>public string Key { get; set; }-+/// <summary>/// Gets or sets the id./// </summary>diff --git a/MediaBrowser.Model/Updates/PackageInfo.cs b/MediaBrowser.Model/Updates/PackageInfo.csindex e46d59fc07..464ea295d5 100644--- a/MediaBrowser.Model/Updates/PackageInfo.cs+++ b/MediaBrowser.Model/Updates/PackageInfo.cs@@ -164,7 +164,7 @@ namespace MediaBrowser.Model.Updates/// </summary>/// <value>The installs.</value>public int installs { get; set; }-+/// <summary>/// Initializes a new instance of the <see cref="PackageInfo"/> class./// </summary>diff --git a/MediaBrowser.Providers/BoxSets/MovieDbBoxSetImageProvider.cs b/MediaBrowser.Providers/BoxSets/MovieDbBoxSetImageProvider.csindex 7298972904..79b9aaf988 100644--- a/MediaBrowser.Providers/BoxSets/MovieDbBoxSetImageProvider.cs+++ b/MediaBrowser.Providers/BoxSets/MovieDbBoxSetImageProvider.cs@@ -42,7 +42,7 @@ namespace MediaBrowser.Providers.BoxSets{return new List<ImageType>{- ImageType.Primary,+ ImageType.Primary,ImageType.Backdrop};}diff --git a/MediaBrowser.Providers/BoxSets/MovieDbBoxSetProvider.cs b/MediaBrowser.Providers/BoxSets/MovieDbBoxSetProvider.csindex d58aa336b0..eacc983d58 100644--- a/MediaBrowser.Providers/BoxSets/MovieDbBoxSetProvider.cs+++ b/MediaBrowser.Providers/BoxSets/MovieDbBoxSetProvider.cs@@ -50,7 +50,7 @@ namespace MediaBrowser.Providers.BoxSets}private readonly CultureInfo _usCulture = new CultureInfo("en-US");-+public async Task<IEnumerable<RemoteSearchResult>> GetSearchResults(BoxSetInfo searchInfo, CancellationToken cancellationToken){var tmdbId = searchInfo.GetProviderId(MetadataProviders.Tmdb);@@ -73,7 +73,7 @@ namespace MediaBrowser.Providers.BoxSetsName = info.name,SearchProviderName = Name,-+ImageUrl = images.Count == 0 ? null : (tmdbImageUrl + images[0].file_path)};diff --git a/MediaBrowser.Providers/Manager/GenericPriorityQueue.cs b/MediaBrowser.Providers/Manager/GenericPriorityQueue.csindex 0e6c073577..fa080397b5 100644--- a/MediaBrowser.Providers/Manager/GenericPriorityQueue.cs+++ b/MediaBrowser.Providers/Manager/GenericPriorityQueue.cs@@ -303,7 +303,7 @@ namespace Priority_Queue}/// <summary>- /// This method must be called on a node every time its priority changes while it is in the queue.+ /// This method must be called on a node every time its priority changes while it is in the queue./// <b>Forgetting to call this method will result in a corrupted queue!</b>/// Calling this method on a node not in the queue results in undefined behavior/// O(log n)@@ -344,7 +344,7 @@ namespace Priority_Queue}/// <summary>- /// Removes a node from the queue. The node does not need to be the head of the queue.+ /// Removes a node from the queue. The node does not need to be the head of the queue./// If the node is not in the queue, the result is undefined. If unsure, check Contains() first/// O(log n)/// </summary>diff --git a/MediaBrowser.Providers/Manager/IPriorityQueue.cs b/MediaBrowser.Providers/Manager/IPriorityQueue.csindex 23f08a13e2..efc9fc2efb 100644--- a/MediaBrowser.Providers/Manager/IPriorityQueue.cs+++ b/MediaBrowser.Providers/Manager/IPriorityQueue.cs@@ -36,12 +36,12 @@ namespace Priority_Queuebool Contains(TItem node);/// <summary>- /// Removes a node from the queue. The node does not need to be the head of the queue.+ /// Removes a node from the queue. The node does not need to be the head of the queue./// </summary>void Remove(TItem node);/// <summary>- /// Call this method to change the priority of a node.+ /// Call this method to change the priority of a node./// </summary>void UpdatePriority(TItem node, TPriority priority);diff --git a/MediaBrowser.Providers/Manager/ImageSaver.cs b/MediaBrowser.Providers/Manager/ImageSaver.csindex 6790f9b331..047c590285 100644--- a/MediaBrowser.Providers/Manager/ImageSaver.cs+++ b/MediaBrowser.Providers/Manager/ImageSaver.cs@@ -174,7 +174,7 @@ namespace MediaBrowser.Providers.Manager}catch (FileNotFoundException){-+}finally{diff --git a/MediaBrowser.Providers/Manager/SimplePriorityQueue.cs b/MediaBrowser.Providers/Manager/SimplePriorityQueue.csindex 879ae1dca4..36f2605fad 100644--- a/MediaBrowser.Providers/Manager/SimplePriorityQueue.cs+++ b/MediaBrowser.Providers/Manager/SimplePriorityQueue.cs@@ -167,9 +167,9 @@ namespace Priority_Queue}/// <summary>- /// Removes an item from the queue. The item does not need to be the head of the queue.+ /// Removes an item from the queue. The item does not need to be the head of the queue./// If the item is not in the queue, an exception is thrown. If unsure, check Contains() first.- /// If multiple copies of the item are enqueued, only the first one is removed.+ /// If multiple copies of the item are enqueued, only the first one is removed./// O(n)/// </summary>public void Remove(TItem item)diff --git a/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs b/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.csindex 81abedeb95..02fb50ae98 100644--- a/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs+++ b/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs@@ -210,8 +210,8 @@ namespace MediaBrowser.Providers.MediaInfopublic IEnumerable<TaskTriggerInfo> GetDefaultTriggers(){- return new[] {-+ return new[] {+// Every so oftennew TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks}};diff --git a/MediaBrowser.Providers/Movies/GenericMovieDbInfo.cs b/MediaBrowser.Providers/Movies/GenericMovieDbInfo.csindex 1fce01903f..039f2efaf5 100644--- a/MediaBrowser.Providers/Movies/GenericMovieDbInfo.cs+++ b/MediaBrowser.Providers/Movies/GenericMovieDbInfo.cs@@ -43,7 +43,7 @@ namespace MediaBrowser.Providers.Moviesvar tmdbId = itemId.GetProviderId(MetadataProviders.Tmdb);var imdbId = itemId.GetProviderId(MetadataProviders.Imdb);- // Don't search for music video id's because it is very easy to misidentify.+ // Don't search for music video id's because it is very easy to misidentify.if (string.IsNullOrEmpty(tmdbId) && string.IsNullOrEmpty(imdbId) && typeof(T) != typeof(MusicVideo)){var searchResults = await new MovieDbSearch(_logger, _jsonSerializer, _libraryManager).GetMovieSearchResults(itemId, cancellationToken).ConfigureAwait(false);diff --git a/MediaBrowser.Providers/Movies/MovieDbImageProvider.cs b/MediaBrowser.Providers/Movies/MovieDbImageProvider.csindex ad45c8432b..ae466c47e7 100644--- a/MediaBrowser.Providers/Movies/MovieDbImageProvider.cs+++ b/MediaBrowser.Providers/Movies/MovieDbImageProvider.cs@@ -50,7 +50,7 @@ namespace MediaBrowser.Providers.Movies{return new List<ImageType>{- ImageType.Primary,+ ImageType.Primary,ImageType.Backdrop};}diff --git a/MediaBrowser.Providers/Music/AlbumMetadataService.cs b/MediaBrowser.Providers/Music/AlbumMetadataService.csindex ae81545a6b..a035dd7580 100644--- a/MediaBrowser.Providers/Music/AlbumMetadataService.cs+++ b/MediaBrowser.Providers/Music/AlbumMetadataService.cs@@ -79,7 +79,7 @@ namespace MediaBrowser.Providers.Musicprivate ItemUpdateType SetAlbumArtistFromSongs(MusicAlbum item, IEnumerable<Audio> songs){var updateType = ItemUpdateType.None;-+var artists = songs.SelectMany(i => i.AlbumArtists).Distinct(StringComparer.OrdinalIgnoreCase)diff --git a/MediaBrowser.Providers/Music/AudioDbAlbumImageProvider.cs b/MediaBrowser.Providers/Music/AudioDbAlbumImageProvider.csindex 273962c6ac..7e16b2e10f 100644--- a/MediaBrowser.Providers/Music/AudioDbAlbumImageProvider.cs+++ b/MediaBrowser.Providers/Music/AudioDbAlbumImageProvider.cs@@ -29,7 +29,7 @@ namespace MediaBrowser.Providers.Music{return new List<ImageType>{- ImageType.Primary,+ ImageType.Primary,ImageType.Disc};}@@ -81,7 +81,7 @@ namespace MediaBrowser.Providers.Musicreturn list;}-+public Task<HttpResponseInfo> GetImageResponse(string url, CancellationToken cancellationToken){return _httpClient.GetResponse(new HttpRequestOptionsdiff --git a/MediaBrowser.Providers/Music/AudioDbArtistImageProvider.cs b/MediaBrowser.Providers/Music/AudioDbArtistImageProvider.csindex 89635872f2..7fc62f75bd 100644--- a/MediaBrowser.Providers/Music/AudioDbArtistImageProvider.cs+++ b/MediaBrowser.Providers/Music/AudioDbArtistImageProvider.cs@@ -29,7 +29,7 @@ namespace MediaBrowser.Providers.Music{return new List<ImageType>{- ImageType.Primary,+ ImageType.Primary,ImageType.Logo,ImageType.Banner,ImageType.Backdropdiff --git a/MediaBrowser.Providers/Music/Extensions.cs b/MediaBrowser.Providers/Music/Extensions.csindex c83e691650..21675e03bf 100644--- a/MediaBrowser.Providers/Music/Extensions.cs+++ b/MediaBrowser.Providers/Music/Extensions.cs@@ -54,7 +54,7 @@ namespace MediaBrowser.Providers.Music{info.ArtistProviderIds.TryGetValue(MetadataProviders.MusicBrainzArtist.ToString(), out id);}-+if (string.IsNullOrEmpty(id)){return info.SongInfos.Select(i => i.GetProviderId(MetadataProviders.MusicBrainzAlbumArtist))diff --git a/MediaBrowser.Providers/Music/FanArtAlbumProvider.cs b/MediaBrowser.Providers/Music/FanArtAlbumProvider.csindex 2f7d70be0f..f19c982b65 100644--- a/MediaBrowser.Providers/Music/FanArtAlbumProvider.cs+++ b/MediaBrowser.Providers/Music/FanArtAlbumProvider.cs@@ -57,7 +57,7 @@ namespace MediaBrowser.Providers.Music{return new List<ImageType>{- ImageType.Primary,+ ImageType.Primary,ImageType.Disc};}diff --git a/MediaBrowser.Providers/Music/FanArtArtistProvider.cs b/MediaBrowser.Providers/Music/FanArtArtistProvider.csindex 99a717ca18..53f89773ae 100644--- a/MediaBrowser.Providers/Music/FanArtArtistProvider.cs+++ b/MediaBrowser.Providers/Music/FanArtArtistProvider.cs@@ -68,7 +68,7 @@ namespace MediaBrowser.Providers.Music{return new List<ImageType>{- ImageType.Primary,+ ImageType.Primary,ImageType.Logo,ImageType.Art,ImageType.Banner,diff --git a/MediaBrowser.Providers/Properties/AssemblyInfo.cs b/MediaBrowser.Providers/Properties/AssemblyInfo.csindex 7676a4c5f6..384ad1419c 100644--- a/MediaBrowser.Providers/Properties/AssemblyInfo.cs+++ b/MediaBrowser.Providers/Properties/AssemblyInfo.cs@@ -1,7 +1,7 @@using System.Reflection;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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.Providers")]@@ -13,8 +13,8 @@ using System.Runtime.InteropServices;[assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]-// Setting ComVisible to false makes the types in this assembly not visible-// to COM components. If you need to access a type in this assembly from+// Setting ComVisible to false makes the types in this assembly not visible+// to COM components. If you need to access a type in this assembly from// COM, set the ComVisible attribute to true on that type.[assembly: ComVisible(false)]@@ -24,7 +24,7 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//\ No newline at end of filediff --git a/MediaBrowser.Providers/Studios/StudiosImageProvider.cs b/MediaBrowser.Providers/Studios/StudiosImageProvider.csindex 2949c903fc..764bb89031 100644--- a/MediaBrowser.Providers/Studios/StudiosImageProvider.cs+++ b/MediaBrowser.Providers/Studios/StudiosImageProvider.cs@@ -42,7 +42,7 @@ namespace MediaBrowser.Providers.Studios{return new List<ImageType>{- ImageType.Primary,+ ImageType.Primary,ImageType.Thumb};}diff --git a/MediaBrowser.Providers/TV/FanArt/FanArtSeasonProvider.cs b/MediaBrowser.Providers/TV/FanArt/FanArtSeasonProvider.csindex a89dee1e9b..7e7cda0fb7 100644--- a/MediaBrowser.Providers/TV/FanArt/FanArtSeasonProvider.cs+++ b/MediaBrowser.Providers/TV/FanArt/FanArtSeasonProvider.cs@@ -60,7 +60,7 @@ namespace MediaBrowser.Providers.TV{return new List<ImageType>{- ImageType.Backdrop,+ ImageType.Backdrop,ImageType.Thumb,ImageType.Banner,ImageType.Primarydiff --git a/MediaBrowser.Providers/TV/FanArt/FanartSeriesProvider.cs b/MediaBrowser.Providers/TV/FanArt/FanartSeriesProvider.csindex bb9bbf7e09..3d9aae2feb 100644--- a/MediaBrowser.Providers/TV/FanArt/FanartSeriesProvider.cs+++ b/MediaBrowser.Providers/TV/FanArt/FanartSeriesProvider.cs@@ -69,7 +69,7 @@ namespace MediaBrowser.Providers.TV{return new List<ImageType>{- ImageType.Primary,+ ImageType.Primary,ImageType.Thumb,ImageType.Art,ImageType.Logo,diff --git a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeImageProvider.cs b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeImageProvider.csindex d9933ba2a2..6dc31a7870 100644--- a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeImageProvider.cs+++ b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeImageProvider.cs@@ -22,7 +22,7 @@ namespace MediaBrowser.Providers.TV{public class MovieDbEpisodeImageProvider :MovieDbProviderBase,- IRemoteImageProvider,+ IRemoteImageProvider,IHasOrder{public MovieDbEpisodeImageProvider(IHttpClient httpClient, IServerConfigurationManager configurationManager, IJsonSerializer jsonSerializer, IFileSystem fileSystem, ILocalizationManager localization, ILoggerFactory loggerFactory)diff --git a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.csindex 095ce0e175..36e3c93d94 100644--- a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs+++ b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs@@ -128,7 +128,7 @@ namespace MediaBrowser.Providers.TV{foreach (var video in response.videos.results){- if (video.type.Equals("trailer", System.StringComparison.OrdinalIgnoreCase)+ if (video.type.Equals("trailer", System.StringComparison.OrdinalIgnoreCase)|| video.type.Equals("clip", System.StringComparison.OrdinalIgnoreCase)){if (video.site.Equals("youtube", System.StringComparison.OrdinalIgnoreCase))diff --git a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesImageProvider.cs b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesImageProvider.csindex 6124e7a9cb..5a89356c25 100644--- a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesImageProvider.cs+++ b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesImageProvider.cs@@ -49,7 +49,7 @@ namespace MediaBrowser.Providers.TV{return new List<ImageType>{- ImageType.Primary,+ ImageType.Primary,ImageType.Backdrop};}diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeasonImageProvider.cs b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeasonImageProvider.csindex 319ece156a..ed9deeba07 100644--- a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeasonImageProvider.cs+++ b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeasonImageProvider.cs@@ -57,7 +57,7 @@ namespace MediaBrowser.Providers.TV{return new List<ImageType>{- ImageType.Primary,+ ImageType.Primary,ImageType.Banner,ImageType.Backdrop};diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesImageProvider.cs b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesImageProvider.csindex e76ac6cd1c..97abaab21b 100644--- a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesImageProvider.cs+++ b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesImageProvider.cs@@ -58,7 +58,7 @@ namespace MediaBrowser.Providers.TV{return new List<ImageType>{- ImageType.Primary,+ ImageType.Primary,ImageType.Banner,ImageType.Backdrop};diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.csindex 515f58c27b..28625418d0 100644--- a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs+++ b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs@@ -787,7 +787,7 @@ namespace MediaBrowser.Providers.TV{if ((int)c >= 0x2B0 && (int)c <= 0x0333){- // skip char modifier and diacritics+ // skip char modifier and diacritics}else if (remove.IndexOf(c) > -1){diff --git a/MediaBrowser.Tests/MediaEncoding/Subtitles/VttWriterTest.cs b/MediaBrowser.Tests/MediaEncoding/Subtitles/VttWriterTest.csindex 00feb286c7..d9e48ac06c 100644--- a/MediaBrowser.Tests/MediaEncoding/Subtitles/VttWriterTest.cs+++ b/MediaBrowser.Tests/MediaEncoding/Subtitles/VttWriterTest.cs@@ -98,7 +98,7 @@ namespace MediaBrowser.Tests.MediaEncoding.Subtitles {var result = File.ReadAllText("testVTT.vtt");var expectedText = File.ReadAllText(@"MediaEncoding\Subtitles\TestSubtitles\expected.vtt");-+Assert.AreEqual(expectedText, result);}}diff --git a/MediaBrowser.Tests/Properties/AssemblyInfo.cs b/MediaBrowser.Tests/Properties/AssemblyInfo.csindex 8efecf8e23..700b2f5088 100644--- a/MediaBrowser.Tests/Properties/AssemblyInfo.cs+++ b/MediaBrowser.Tests/Properties/AssemblyInfo.cs@@ -1,7 +1,7 @@using System.Reflection;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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.Tests")]@@ -13,8 +13,8 @@ using System.Runtime.InteropServices;[assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]-// Setting ComVisible to false makes the types in this assembly not visible-// to COM components. If you need to access a type in this assembly from+// Setting ComVisible to false makes the types in this assembly not visible+// to COM components. If you need to access a type in this assembly from// COM, set the ComVisible attribute to true on that type.[assembly: ComVisible(false)]@@ -24,11 +24,11 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//-// You can specify all the values or you can default the Build and Revision Numbers+// You can specify all the values or you can default the Build and Revision Numbers// by using the '*' as shown below:// [assembly: AssemblyVersion("1.0.*")][assembly: AssemblyVersion("1.0.0.0")]diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.csindex 58d02ef044..e676292695 100644--- a/MediaBrowser.WebDashboard/Api/DashboardService.cs+++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs@@ -311,7 +311,7 @@ namespace MediaBrowser.WebDashboard.Api// Bounce them to the startup wizard if it hasn't been completed yetif (!_serverConfigurationManager.Configuration.IsStartupWizardCompleted &&- Request.RawUrl.IndexOf("wizard", StringComparison.OrdinalIgnoreCase) == -1 &&+ Request.RawUrl.IndexOf("wizard", StringComparison.OrdinalIgnoreCase) == -1 &&GetPackageCreator(basePath).IsCoreHtml(path)){// But don't redirect if an html import is being requested.diff --git a/MediaBrowser.WebDashboard/Properties/AssemblyInfo.cs b/MediaBrowser.WebDashboard/Properties/AssemblyInfo.csindex 599a895be4..2b083f0259 100644--- a/MediaBrowser.WebDashboard/Properties/AssemblyInfo.cs+++ b/MediaBrowser.WebDashboard/Properties/AssemblyInfo.cs@@ -1,7 +1,7 @@using System.Reflection;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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.WebDashboard")]@@ -13,8 +13,8 @@ using System.Runtime.InteropServices;[assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]-// Setting ComVisible to false makes the types in this assembly not visible-// to COM components. If you need to access a type in this assembly from+// Setting ComVisible to false makes the types in this assembly not visible+// to COM components. If you need to access a type in this assembly from// COM, set the ComVisible attribute to true on that type.[assembly: ComVisible(false)]@@ -24,7 +24,7 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//\ No newline at end of filediff --git a/MediaBrowser.XbmcMetadata/Parsers/EpisodeNfoParser.cs b/MediaBrowser.XbmcMetadata/Parsers/EpisodeNfoParser.csindex ce56e080ab..3e7fd1c82c 100644--- a/MediaBrowser.XbmcMetadata/Parsers/EpisodeNfoParser.cs+++ b/MediaBrowser.XbmcMetadata/Parsers/EpisodeNfoParser.cs@@ -18,7 +18,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers{public void Fetch(MetadataResult<Episode> item,List<LocalImageInfo> images,- string metadataFile,+ string metadataFile,CancellationToken cancellationToken){Fetch(item, metadataFile, cancellationToken);diff --git a/MediaBrowser.XbmcMetadata/Properties/AssemblyInfo.cs b/MediaBrowser.XbmcMetadata/Properties/AssemblyInfo.csindex 0781363716..1fdf365be9 100644--- a/MediaBrowser.XbmcMetadata/Properties/AssemblyInfo.cs+++ b/MediaBrowser.XbmcMetadata/Properties/AssemblyInfo.cs@@ -1,7 +1,7 @@using System.Reflection;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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.XbmcMetadata")]@@ -13,8 +13,8 @@ using System.Runtime.InteropServices;[assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]-// Setting ComVisible to false makes the types in this assembly not visible-// to COM components. If you need to access a type in this assembly from+// Setting ComVisible to false makes the types in this assembly not visible+// to COM components. If you need to access a type in this assembly from// COM, set the ComVisible attribute to true on that type.[assembly: ComVisible(false)]@@ -24,10 +24,10 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//-// You can specify all the values or you can default the Build and Revision Numbers+// You can specify all the values or you can default the Build and Revision Numbers// by using the '*' as shown below:// [assembly: AssemblyVersion("1.0.*")]\ No newline at end of filediff --git a/MediaBrowser.XbmcMetadata/Savers/AlbumNfoSaver.cs b/MediaBrowser.XbmcMetadata/Savers/AlbumNfoSaver.csindex 54d0b8baeb..7a293801bb 100644--- a/MediaBrowser.XbmcMetadata/Savers/AlbumNfoSaver.cs+++ b/MediaBrowser.XbmcMetadata/Savers/AlbumNfoSaver.cs@@ -41,7 +41,7 @@ namespace MediaBrowser.XbmcMetadata.Saversprotected override void WriteCustomElements(BaseItem item, XmlWriter writer){var album = (MusicAlbum)item;-+foreach (var artist in album.Artists){writer.WriteElementString("artist", artist);@@ -53,8 +53,8 @@ namespace MediaBrowser.XbmcMetadata.Savers}AddTracks(album.Tracks, writer);- }-+ }+private readonly CultureInfo UsCulture = new CultureInfo("en-US");private void AddTracks(IEnumerable<BaseItem> tracks, XmlWriter writer)diff --git a/MediaBrowser.XbmcMetadata/Savers/ArtistNfoSaver.cs b/MediaBrowser.XbmcMetadata/Savers/ArtistNfoSaver.csindex cc0da1b368..110b1446a6 100644--- a/MediaBrowser.XbmcMetadata/Savers/ArtistNfoSaver.cs+++ b/MediaBrowser.XbmcMetadata/Savers/ArtistNfoSaver.cs@@ -47,7 +47,7 @@ namespace MediaBrowser.XbmcMetadata.Saverswriter.WriteElementString("disbanded", artist.EndDate.Value.ToLocalTime().ToString(formatString));}-+var albums = artist.GetRecursiveChildren(i => i is MusicAlbum);@@ -55,7 +55,7 @@ namespace MediaBrowser.XbmcMetadata.Savers}private readonly CultureInfo UsCulture = new CultureInfo("en-US");-+private void AddAlbums(IList<BaseItem> albums, XmlWriter writer){foreach (var album in albums)diff --git a/MediaBrowser.XbmcMetadata/Savers/SeriesNfoSaver.cs b/MediaBrowser.XbmcMetadata/Savers/SeriesNfoSaver.csindex e0f08dbdbb..270d779bfe 100644--- a/MediaBrowser.XbmcMetadata/Savers/SeriesNfoSaver.cs+++ b/MediaBrowser.XbmcMetadata/Savers/SeriesNfoSaver.cs@@ -58,7 +58,7 @@ namespace MediaBrowser.XbmcMetadata.Saverswriter.WriteAttributeString("cache", string.Format("{0}.xml", tvdb));writer.WriteString(string.Format("http://www.thetvdb.com/api/1D62F2F90030C444/series/{0}/all/{1}.zip", tvdb, language));writer.WriteEndElement();-+writer.WriteEndElement();}diff --git a/Mono.Nat/ISearcher.cs b/Mono.Nat/ISearcher.csindex fff7e8d75c..95c2f2aa90 100644--- a/Mono.Nat/ISearcher.cs+++ b/Mono.Nat/ISearcher.cs@@ -15,10 +15,10 @@// distribute, sublicense, and/or sell copies of the Software, and to// permit persons to whom the Software is furnished to do so, subject to// the following conditions:-//+//// The above copyright notice and this permission notice shall be// included in all copies or substantial portions of the Software.-//+//// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ANDdiff --git a/Mono.Nat/Pmp/PmpNatDevice.cs b/Mono.Nat/Pmp/PmpNatDevice.csindex fbf3032d47..a3b278304c 100644--- a/Mono.Nat/Pmp/PmpNatDevice.cs+++ b/Mono.Nat/Pmp/PmpNatDevice.cs@@ -11,10 +11,10 @@// distribute, sublicense, and/or sell copies of the Software, and to// permit persons to whom the Software is furnished to do so, subject to// the following conditions:-//+//// The above copyright notice and this permission notice shall be// included in all copies or substantial portions of the Software.-//+//// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ANDdiff --git a/Mono.Nat/Properties/AssemblyInfo.cs b/Mono.Nat/Properties/AssemblyInfo.csindex 18b1838175..f209ff7058 100644--- a/Mono.Nat/Properties/AssemblyInfo.cs+++ b/Mono.Nat/Properties/AssemblyInfo.cs@@ -2,7 +2,7 @@using System.Runtime.CompilerServices;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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("Mono.Nat")]@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;[assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]-// Setting ComVisible to false makes the types in this assembly not visible-// to COM components. If you need to access a type in this assembly from+// Setting ComVisible to false makes the types in this assembly not visible+// to COM components. If you need to access a type in this assembly from// COM, set the ComVisible attribute to true on that type.[assembly: ComVisible(false)]@@ -25,10 +25,10 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//-// You can specify all the values or you can default the Build and Revision Numbers+// You can specify all the values or you can default the Build and Revision Numbers// by using the '*' as shown below:// [assembly: AssemblyVersion("1.0.*")]\ No newline at end of filediff --git a/Mono.Nat/Upnp/Messages/GetServicesMessage.cs b/Mono.Nat/Upnp/Messages/GetServicesMessage.csindex 4b765fd421..72b4c2b255 100644--- a/Mono.Nat/Upnp/Messages/GetServicesMessage.cs+++ b/Mono.Nat/Upnp/Messages/GetServicesMessage.cs@@ -11,10 +11,10 @@// distribute, sublicense, and/or sell copies of the Software, and to// permit persons to whom the Software is furnished to do so, subject to// the following conditions:-//+//// The above copyright notice and this permission notice shall be// included in all copies or substantial portions of the Software.-//+//// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ANDdiff --git a/Mono.Nat/Upnp/Messages/Requests/CreatePortMappingMessage.cs b/Mono.Nat/Upnp/Messages/Requests/CreatePortMappingMessage.csindex e9caa916d1..5a2ab009aa 100644--- a/Mono.Nat/Upnp/Messages/Requests/CreatePortMappingMessage.cs+++ b/Mono.Nat/Upnp/Messages/Requests/CreatePortMappingMessage.cs@@ -11,10 +11,10 @@// distribute, sublicense, and/or sell copies of the Software, and to// permit persons to whom the Software is furnished to do so, subject to// the following conditions:-//+//// The above copyright notice and this permission notice shall be// included in all copies or substantial portions of the Software.-//+//// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ANDdiff --git a/Mono.Nat/Upnp/Messages/UpnpMessage.cs b/Mono.Nat/Upnp/Messages/UpnpMessage.csindex 37a46e47da..e734db8f4d 100644--- a/Mono.Nat/Upnp/Messages/UpnpMessage.cs+++ b/Mono.Nat/Upnp/Messages/UpnpMessage.cs@@ -11,10 +11,10 @@// distribute, sublicense, and/or sell copies of the Software, and to// permit persons to whom the Software is furnished to do so, subject to// the following conditions:-//+//// The above copyright notice and this permission notice shall be// included in all copies or substantial portions of the Software.-//+//// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ANDdiff --git a/Mono.Nat/Upnp/UpnpNatDevice.cs b/Mono.Nat/Upnp/UpnpNatDevice.csindex 62539103ac..a3b90677ee 100644--- a/Mono.Nat/Upnp/UpnpNatDevice.cs+++ b/Mono.Nat/Upnp/UpnpNatDevice.cs@@ -13,10 +13,10 @@// distribute, sublicense, and/or sell copies of the Software, and to// permit persons to whom the Software is furnished to do so, subject to// the following conditions:-//+//// The above copyright notice and this permission notice shall be// included in all copies or substantial portions of the Software.-//+//// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ANDdiff --git a/OpenSubtitlesHandler/Console/OSHConsole.cs b/OpenSubtitlesHandler/Console/OSHConsole.csindex 04c00bf253..348c1ce896 100644--- a/OpenSubtitlesHandler/Console/OSHConsole.cs+++ b/OpenSubtitlesHandler/Console/OSHConsole.cs@@ -26,7 +26,7 @@ namespace OpenSubtitlesHandler.Console/// <summary>/// Write line to the console and raise the "LineWritten" event/// </summary>- ///+ ////// <param name="text">The debug line</param>/// <param name="code">The status</param>public static void WriteLine(string text, DebugCode code = DebugCode.None)diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseAutoUpdate.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseAutoUpdate.csindex 5007cc6bbf..42d85ef09e 100644--- a/OpenSubtitlesHandler/MethodResponses/MethodResponseAutoUpdate.cs+++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseAutoUpdate.cs@@ -37,22 +37,22 @@ namespace OpenSubtitlesHandlerprivate string _comments;private string _url_linux;/// <summary>- /// Latest application version+ /// Latest application version/// </summary>[Description("Latest application version"), Category("AutoUpdate")]public string version { get { return _version; } set { _version = value; } }/// <summary>- /// Download URL for Windows version+ /// Download URL for Windows version/// </summary>[Description("Download URL for Windows version"), Category("AutoUpdate")]public string url_windows { get { return _url_windows; } set { _url_windows = value; } }/// <summary>- /// Application changelog and other comments+ /// Application changelog and other comments/// </summary>[Description("Application changelog and other comments"), Category("AutoUpdate")]public string comments { get { return _comments; } set { _comments = value; } }/// <summary>- /// Download URL for Linux version+ /// Download URL for Linux version/// </summary>[Description("Download URL for Linux version"), Category("AutoUpdate")]public string url_linux { get { return _url_linux; } set { _url_linux = value; } }diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseMovieDetails.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseMovieDetails.csindex 02e6a1e75b..511581d716 100644--- a/OpenSubtitlesHandler/MethodResponses/MethodResponseMovieDetails.cs+++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseMovieDetails.cs@@ -36,7 +36,7 @@ namespace OpenSubtitlesHandlerprivate string title;private string year;private string coverLink;-+private string duration;private string tagline;private string plot;diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseServerInfo.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseServerInfo.csindex d41ac8e82a..b37862466c 100644--- a/OpenSubtitlesHandler/MethodResponses/MethodResponseServerInfo.cs+++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseServerInfo.cs@@ -49,12 +49,12 @@ namespace OpenSubtitlesHandlerprivate List<string> _last_update_strings = new List<string>();/// <summary>- /// Version of server's XML-RPC API implementation+ /// Version of server's XML-RPC API implementation/// </summary>[Description("Version of server's XML-RPC API implementation"), Category("OS")]public string xmlrpc_version { get { return _xmlrpc_version; } set { _xmlrpc_version = value; } }/// <summary>- /// XML-RPC interface URL+ /// XML-RPC interface URL/// </summary>[Description("XML-RPC interface URL"), Category("OS")]public string xmlrpc_url { get { return _xmlrpc_url; } set { _xmlrpc_url = value; } }@@ -64,27 +64,27 @@ namespace OpenSubtitlesHandler[Description("Server's application name and version"), Category("OS")]public string application { get { return _application; } set { _application = value; } }/// <summary>- /// Contact e-mail address for server related quuestions and problems+ /// Contact e-mail address for server related quuestions and problems/// </summary>[Description("Contact e-mail address for server related quuestions and problems"), Category("OS")]public string contact { get { return _contact; } set { _contact = value; } }/// <summary>- /// Main server URL+ /// Main server URL/// </summary>[Description("Main server URL"), Category("OS")]public string website_url { get { return _website_url; } set { _website_url = value; } }/// <summary>- /// Number of users currently online+ /// Number of users currently online/// </summary>[Description("Number of users currently online"), Category("OS")]public int users_online_total { get { return _users_online_total; } set { _users_online_total = value; } }/// <summary>- /// Number of users currently online using a client application (XML-RPC API)+ /// Number of users currently online using a client application (XML-RPC API)/// </summary>[Description("Number of users currently online using a client application (XML-RPC API)"), Category("OS")]public int users_online_program { get { return _users_online_program; } set { _users_online_program = value; } }/// <summary>- /// Number of currently logged-in users+ /// Number of currently logged-in users/// </summary>[Description("Number of currently logged-in users"), Category("OS")]public int users_loggedin { get { return _users_loggedin; } set { _users_loggedin = value; } }@@ -104,7 +104,7 @@ namespace OpenSubtitlesHandler[Description("Total number of subtitle downloads"), Category("OS")]public string subs_downloads { get { return _subs_downloads; } set { _subs_downloads = value; } }/// <summary>- /// Total number of subtitle files stored on the server+ /// Total number of subtitle files stored on the server/// </summary>[Description("Total number of subtitle files stored on the server"), Category("OS")]public string subs_subtitle_files { get { return _subs_subtitle_files; } set { _subs_subtitle_files = value; } }@@ -119,7 +119,7 @@ namespace OpenSubtitlesHandler[Description("Total number of movie A.K.A. titles in the database"), Category("OS")]public string movies_aka { get { return _movies_aka; } set { _movies_aka = value; } }/// <summary>- /// Total number of subtitle languages supported+ /// Total number of subtitle languages supported/// </summary>[Description("Total number of subtitle languages supported"), Category("OS")]public string total_subtitles_languages { get { return _total_subtitles_languages; } set { _total_subtitles_languages = value; } }diff --git a/OpenSubtitlesHandler/OpenSubtitles.cs b/OpenSubtitlesHandler/OpenSubtitles.csindex 2dc71560bc..10d11ae206 100644--- a/OpenSubtitlesHandler/OpenSubtitles.cs+++ b/OpenSubtitlesHandler/OpenSubtitles.cs@@ -132,17 +132,17 @@ namespace OpenSubtitlesHandler{switch (MEMBER.Name){- case "token":- re.Token = TOKEN = MEMBER.Data.Data.ToString();- OSHConsole.WriteLine(MEMBER.Name + "= " + MEMBER.Data.Data.ToString());+ case "token":+ re.Token = TOKEN = MEMBER.Data.Data.ToString();+ OSHConsole.WriteLine(MEMBER.Name + "= " + MEMBER.Data.Data.ToString());break;case "seconds":re.Seconds = double.Parse(MEMBER.Data.Data.ToString(), CultureInfo.InvariantCulture);- OSHConsole.WriteLine(MEMBER.Name + "= " + MEMBER.Data.Data.ToString());+ OSHConsole.WriteLine(MEMBER.Name + "= " + MEMBER.Data.Data.ToString());break;- case "status":- re.Status = MEMBER.Data.Data.ToString();- OSHConsole.WriteLine(MEMBER.Name + "= " + MEMBER.Data.Data.ToString());+ case "status":+ re.Status = MEMBER.Data.Data.ToString();+ OSHConsole.WriteLine(MEMBER.Name + "= " + MEMBER.Data.Data.ToString());break;}}@@ -157,7 +157,7 @@ namespace OpenSubtitlesHandler}return new MethodResponseError("Fail", "Log in failed !");}-+/// <summary>/// Log out from the server. Call this to terminate the session./// </summary>@@ -203,7 +203,7 @@ namespace OpenSubtitlesHandlerreturn new MethodResponseError("Fail", "Log out failed !");}/// <summary>- /// keep-alive user's session, verify token/session validity+ /// keep-alive user's session, verify token/session validity/// </summary>/// <returns>Status of the call operation</returns>public static IMethodResponse NoOperation()@@ -270,7 +270,7 @@ namespace OpenSubtitlesHandler}/*Search and download*//// <summary>- /// Search for subtitle files matching your videos using either video file hashes or IMDb IDs.+ /// Search for subtitle files matching your videos using either video file hashes or IMDb IDs./// </summary>/// <param name="parameters">List of search subtitle parameters which each one represents 'struct parameter' as descriped at http://trac.opensubtitles.org/projects/opensubtitles/wiki/XmlRpcSearchSubtitles </param>/// <returns>Status of the call operation. If the call success the response will be 'MethodResponseSubtitleSearch'</returns>@@ -349,7 +349,7 @@ namespace OpenSubtitlesHandlerif (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -529,7 +529,7 @@ namespace OpenSubtitlesHandlerif (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -630,7 +630,7 @@ namespace OpenSubtitlesHandler}return new MethodResponseError("Fail", "Search Subtitles call failed !");}-+/// <summary>/// Download subtitle file(s)/// </summary>@@ -672,7 +672,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -782,7 +782,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(httpResponse);if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -852,7 +852,7 @@ namespace OpenSubtitlesHandler}return new MethodResponseError("Fail", "DownloadSubtitles call failed !");}-+/// <summary>/// Returns comments for subtitles/// </summary>@@ -890,7 +890,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -996,7 +996,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -1029,7 +1029,7 @@ namespace OpenSubtitlesHandler}/*Movies*//// <summary>- /// Search for a movie (using movie title)+ /// Search for a movie (using movie title)/// </summary>/// <param name="query">Movie title user is searching for, this is cleaned-up a bit (remove dvdrip, etc.) before searching </param>/// <returns>Status of the call operation. If the call success the response will be 'MethodResponseSubtitleSearch'</returns>@@ -1053,7 +1053,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -1120,7 +1120,7 @@ namespace OpenSubtitlesHandlerreturn new MethodResponseError("Fail", "SearchMoviesOnIMDB call failed !");}/// <summary>- /// Get movie details for given IMDb ID+ /// Get movie details for given IMDb ID/// </summary>/// <param name="imdbid">http://www.imdb.com/</param>/// <returns>Status of the call operation. If the call success the response will be 'MethodResponseMovieDetails'</returns>@@ -1144,7 +1144,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -1288,7 +1288,7 @@ namespace OpenSubtitlesHandlerreturn new MethodResponseError("Fail", "GetIMDBMovieDetails call failed !");}/// <summary>- /// Allows registered users to insert new movies (not stored in IMDb) to the database.+ /// Allows registered users to insert new movies (not stored in IMDb) to the database./// </summary>/// <param name="movieName">Movie title </param>/// <param name="movieyear">Release year </param>@@ -1316,7 +1316,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -1390,7 +1390,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -1458,7 +1458,7 @@ namespace OpenSubtitlesHandler}/*Reporting and rating*//// <summary>- /// Get basic server information and statistics+ /// Get basic server information and statistics/// </summary>/// <returns>Status of the call operation. If the call success the response will be 'MethodResponseServerInfo'</returns>public static IMethodResponse ServerInfo()@@ -1479,7 +1479,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -1609,7 +1609,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -1647,9 +1647,9 @@ namespace OpenSubtitlesHandlerreturn new MethodResponseError("Fail", "ReportWrongMovieHash call failed !");}/// <summary>- /// This method is needed to report bad movie hash for imdbid. This method should be used for correcting wrong entries,- /// when using CheckMovieHash2. Pass moviehash and moviebytesize for file, and imdbid as new, corrected one IMDBID- /// (id number without trailing zeroes). After some reports, moviehash will be linked to new imdbid.+ /// This method is needed to report bad movie hash for imdbid. This method should be used for correcting wrong entries,+ /// when using CheckMovieHash2. Pass moviehash and moviebytesize for file, and imdbid as new, corrected one IMDBID+ /// (id number without trailing zeroes). After some reports, moviehash will be linked to new imdbid./// </summary>/// <param name="moviehash">The movie hash</param>/// <param name="moviebytesize">The movie size in bytes</param>@@ -1677,7 +1677,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -1709,7 +1709,7 @@ namespace OpenSubtitlesHandlerreturn new MethodResponseError("Fail", "ReportWrongImdbMovie call failed !");}/// <summary>- /// Rate subtitles+ /// Rate subtitles/// </summary>/// <param name="idsubtitle">Id of subtitle (NOT subtitle file) user wants to rate </param>/// <param name="score">Subtitle rating, must be in interval 1 (worst) to 10 (best). </param>@@ -1735,7 +1735,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -1780,7 +1780,7 @@ namespace OpenSubtitlesHandlerreturn new MethodResponseError("Fail", "SubtitlesVote call failed !");}/// <summary>- /// Add comment to a subtitle+ /// Add comment to a subtitle/// </summary>/// <param name="idsubtitle">Subtitle identifier (BEWARE! this is not the ID of subtitle file but of the whole subtitle (a subtitle can contain multiple subtitle files))</param>/// <param name="comment">User's comment</param>@@ -1808,7 +1808,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -1868,7 +1868,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -1933,7 +1933,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -1993,7 +1993,7 @@ namespace OpenSubtitlesHandlerreturn new MethodResponseError("Fail", "GetSubLanguages call failed !");}/// <summary>- /// Detect language for given strings+ /// Detect language for given strings/// </summary>/// <param name="texts">Array of strings you want language detected for</param>/// <param name="encodingUsed">The encoding that will be used to get buffer of given strings. (this is not OS official parameter)</param>@@ -2029,7 +2029,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -2102,7 +2102,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -2161,7 +2161,7 @@ namespace OpenSubtitlesHandlerreturn new MethodResponseError("Fail", "GetAvailableTranslations call failed !");}/// <summary>- /// Get a translation for given program and language+ /// Get a translation for given program and language/// </summary>/// <param name="iso639">language ISO639-1 2-letter code </param>/// <param name="format">available formats: [gnugettext compatible: mo, po] and [additional: txt, xml]</param>@@ -2188,7 +2188,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -2221,7 +2221,7 @@ namespace OpenSubtitlesHandlerreturn new MethodResponseError("Fail", "GetTranslation call failed !");}/// <summary>- /// Check for the latest version of given application+ /// Check for the latest version of given application/// </summary>/// <param name="program">name of the program/client application you want to check. (Currently supported values: subdownloader, oscar)</param>/// <returns>Status of the call operation. If the call success the response will be 'MethodResponseAutoUpdate'</returns>@@ -2244,7 +2244,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -2303,7 +2303,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -2357,7 +2357,7 @@ namespace OpenSubtitlesHandlerreturn new MethodResponseError("Fail", "CheckMovieHash call failed !");}/// <summary>- /// Check if video file hashes are already stored in the database. This method returns matching !MovieImdbID, MovieName, MovieYear, SeriesSeason, SeriesEpisode,+ /// Check if video file hashes are already stored in the database. This method returns matching !MovieImdbID, MovieName, MovieYear, SeriesSeason, SeriesEpisode,/// MovieKind if available for each $moviehash, always sorted by SeenCount DESC./// </summary>/// <param name="hashes">Array of video file hashes</param>@@ -2380,7 +2380,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -2444,7 +2444,7 @@ namespace OpenSubtitlesHandlerreturn new MethodResponseError("Fail", "CheckMovieHash2 call failed !");}/// <summary>- /// Check if given subtitle files are already stored in the database+ /// Check if given subtitle files are already stored in the database/// </summary>/// <param name="hashes">Array of subtitle file hashes (MD5 hashes of subtitle file contents) </param>/// <returns>Status of the call operation. If the call success the response will be 'MethodResponseCheckSubHash'</returns>@@ -2466,7 +2466,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -2511,7 +2511,7 @@ namespace OpenSubtitlesHandler}/*Upload*//// <summary>- /// Try to upload subtitles, perform pre-upload checking (i.e. check if subtitles already exist on server)+ /// Try to upload subtitles, perform pre-upload checking (i.e. check if subtitles already exist on server)/// </summary>/// <param name="subs">The subtitle parameters collection to try to upload</param>/// <returns>Status of the call operation. If the call success the response will be 'MethodResponseTryUploadSubtitles'</returns>@@ -2551,7 +2551,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){@@ -2643,7 +2643,7 @@ namespace OpenSubtitlesHandlerreturn new MethodResponseError("Fail", "TryUploadSubtitles call failed !");}/// <summary>- /// Upload given subtitles to OSDb server+ /// Upload given subtitles to OSDb server/// </summary>/// <param name="info">The pamaters of upload method</param>/// <returns>Status of the call operation. If the call success the response will be 'MethodResponseUploadSubtitles'</returns>@@ -2664,7 +2664,7 @@ namespace OpenSubtitlesHandlerXmlRpcStructMember member = new XmlRpcStructMember("baseinfo", null);XmlRpcValueStruct memberStruct = new XmlRpcValueStruct(new List<XmlRpcStructMember>());memberStruct.Members.Add(new XmlRpcStructMember("idmovieimdb", new XmlRpcValueBasic(info.idmovieimdb)));- memberStruct.Members.Add(new XmlRpcStructMember("sublanguageid", new XmlRpcValueBasic(info.sublanguageid)));+ memberStruct.Members.Add(new XmlRpcStructMember("sublanguageid", new XmlRpcValueBasic(info.sublanguageid)));memberStruct.Members.Add(new XmlRpcStructMember("moviereleasename", new XmlRpcValueBasic(info.moviereleasename)));memberStruct.Members.Add(new XmlRpcStructMember("movieaka", new XmlRpcValueBasic(info.movieaka)));memberStruct.Members.Add(new XmlRpcStructMember("subauthorcomment", new XmlRpcValueBasic(info.subauthorcomment)));@@ -2704,7 +2704,7 @@ namespace OpenSubtitlesHandlerstring response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT));if (!response.Contains("ERROR:")){- // No error occur, get and decode the response.+ // No error occur, get and decode the response.XmlRpcMethodCall[] calls = XmlRpcGenerator.DecodeMethodResponse(response);if (calls.Length > 0){diff --git a/OpenSubtitlesHandler/Properties/AssemblyInfo.cs b/OpenSubtitlesHandler/Properties/AssemblyInfo.csindex 349e289b39..f82e8c458e 100644--- a/OpenSubtitlesHandler/Properties/AssemblyInfo.cs+++ b/OpenSubtitlesHandler/Properties/AssemblyInfo.cs@@ -1,7 +1,7 @@using System.Reflection;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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("OpenSubtitlesHandler")]@@ -13,8 +13,8 @@ using System.Runtime.InteropServices;[assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]-// Setting ComVisible to false makes the types in this assembly not visible-// to COM components. If you need to access a type in this assembly from+// Setting ComVisible to false makes the types in this assembly not visible+// to COM components. If you need to access a type in this assembly from// COM, set the ComVisible attribute to true on that type.[assembly: ComVisible(false)]@@ -24,11 +24,11 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//-// You can specify all the values or you can default the Build and Revision Numbers+// You can specify all the values or you can default the Build and Revision Numbers// by using the '*' as shown below:// [assembly: AssemblyVersion("1.0.*")][assembly: AssemblyVersion("1.0.0.0")]diff --git a/OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchParameters.cs b/OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchParameters.csindex 101d7f7df7..33eeea5cd1 100644--- a/OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchParameters.cs+++ b/OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchParameters.cs@@ -68,7 +68,7 @@ namespace OpenSubtitlesHandler/// </summary>public string MovieHash { get { return movieHash; } set { movieHash = value; } }/// <summary>- /// Size of video file in bytes+ /// Size of video file in bytes/// </summary>public long MovieByteSize { get { return movieByteSize; } set { movieByteSize = value; } }/// <summary>diff --git a/OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs b/OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.csindex 06fc945a8e..1efa3dd5ba 100644--- a/OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs+++ b/OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs@@ -250,7 +250,7 @@ namespace XmlRpcHandler}return reader.ReadContentAsString();}-+private static IXmlRpcValue ReadValue(XmlReader xmlReader, bool skipRead = false){while (skipRead || xmlReader.Read())diff --git a/RSSDP/Properties/AssemblyInfo.cs b/RSSDP/Properties/AssemblyInfo.csindex 1ce64b159d..f0584fa1a5 100644--- a/RSSDP/Properties/AssemblyInfo.cs+++ b/RSSDP/Properties/AssemblyInfo.cs@@ -3,7 +3,7 @@ using System.Reflection;using System.Runtime.CompilerServices;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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("RSSDP2")]@@ -19,11 +19,11 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//-// You can specify all the values or you can default the Build and Revision Numbers+// You can specify all the values or you can default the Build and Revision Numbers// by using the '*' as shown below:// [assembly: AssemblyVersion("1.0.*")][assembly: AssemblyVersion("1.0.0.0")]diff --git a/RSSDP/SsdpDeviceLocator.cs b/RSSDP/SsdpDeviceLocator.csindex 32289822f9..c7daf359d4 100644--- a/RSSDP/SsdpDeviceLocator.cs+++ b/RSSDP/SsdpDeviceLocator.cs@@ -53,7 +53,7 @@ namespace Rssdp.Infrastructure#region Events/// <summary>- /// Raised for when+ /// Raised for when/// <list type="bullet">/// <item>An 'alive' notification is received that a device, regardless of whether or not that device is not already in the cache or has previously raised this event.</item>/// <item>For each item found during a device <see cref="SearchAsync()"/> (cached or not), allowing clients to respond to found devices before the entire search is complete.</item>diff --git a/SocketHttpListener/Net/ChunkedInputStream.cs b/SocketHttpListener/Net/ChunkedInputStream.csindex c3bbff82d0..4d6d96a6cb 100644--- a/SocketHttpListener/Net/ChunkedInputStream.cs+++ b/SocketHttpListener/Net/ChunkedInputStream.cs@@ -23,10 +23,10 @@ namespace SocketHttpListener.Net// distribute, sublicense, and/or sell copies of the Software, and to// permit persons to whom the Software is furnished to do so, subject to// the following conditions:- //+ //// The above copyright notice and this permission notice shall be// included in all copies or substantial portions of the Software.- //+ //// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ANDdiff --git a/SocketHttpListener/Net/HttpEndPointListener.cs b/SocketHttpListener/Net/HttpEndPointListener.csindex fb093314c8..35f60a9fb8 100644--- a/SocketHttpListener/Net/HttpEndPointListener.cs+++ b/SocketHttpListener/Net/HttpEndPointListener.cs@@ -177,9 +177,9 @@ namespace SocketHttpListener.Net}}- // This method is the callback method associated with Socket.AcceptAsync- // operations and is invoked when an accept operation is complete- //+ // This method is the callback method associated with Socket.AcceptAsync+ // operations and is invoked when an accept operation is complete+ //private static void OnAccept(object sender, SocketAsyncEventArgs e){ProcessAccept(e);diff --git a/SocketHttpListener/Net/HttpListener.cs b/SocketHttpListener/Net/HttpListener.csindex 941b99f35e..4c4832336d 100644--- a/SocketHttpListener/Net/HttpListener.cs+++ b/SocketHttpListener/Net/HttpListener.cs@@ -35,7 +35,7 @@ namespace SocketHttpListener.Netbool listening;bool disposed;- Dictionary<HttpListenerContext, HttpListenerContext> registry; // Dictionary<HttpListenerContext,HttpListenerContext>+ Dictionary<HttpListenerContext, HttpListenerContext> registry; // Dictionary<HttpListenerContext,HttpListenerContext>Dictionary<HttpConnection, HttpConnection> connections;private ILogger _logger;private X509Certificate _certificate;diff --git a/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs b/SocketHttpListener/Net/HttpListenerRequestUriBuilder.csindex 34b5eaf74b..63790d7962 100644--- a/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs+++ b/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs@@ -28,11 +28,11 @@ namespace SocketHttpListener.Net// The raw path is parsed by looping through all characters from left to right. 'rawOctets'// is used to store consecutive percent encoded octets as actual byte values: e.g. for path /pa%C3%84th%2F/// rawOctets will be set to { 0xC3, 0x84 } when we reach character 't' and it will be { 0x2F } when- // we reach the final '/'. I.e. after a sequence of percent encoded octets ends, we use rawOctets as+ // we reach the final '/'. I.e. after a sequence of percent encoded octets ends, we use rawOctets as// input to the encoding and percent encode the resulting string into UTF-8 octets.//// When parsing ANSI (Latin 1) encoded path '/pa%C4th/', %C4 will be added to rawOctets and when- // we reach 't', the content of rawOctets { 0xC4 } will be fed into the ANSI encoding. The resulting+ // we reach 't', the content of rawOctets { 0xC4 } will be fed into the ANSI encoding. The resulting// string 'Ä' will be percent encoded into UTF-8 octets and appended to requestUriString. The final// path will be '/pa%C3%84th/', where '%C3%84' is the UTF-8 percent encoded character 'Ä'.private List<byte> _rawOctets;@@ -146,7 +146,7 @@ namespace SocketHttpListener.Netif (!Uri.TryCreate(_requestUriString.ToString(), UriKind.Absolute, out _requestUri)){- // If we can't create a Uri from the string, this is an invalid string and it doesn't make+ // If we can't create a Uri from the string, this is an invalid string and it doesn't make// sense to try another encoding.result = ParsingResult.InvalidString;}@@ -196,7 +196,7 @@ namespace SocketHttpListener.Net}else{- // We found '%', but not followed by 'u', i.e. we have a percent encoded octed: %XX+ // We found '%', but not followed by 'u', i.e. we have a percent encoded octed: %XXif (!AddPercentEncodedOctetToRawOctetsList(encoding, _rawPath.Substring(index, 2))){return ParsingResult.InvalidString;@@ -207,7 +207,7 @@ namespace SocketHttpListener.Netelse{// We found a non-'%' character: decode the content of rawOctets into percent encoded- // UTF-8 characters and append it to the result.+ // UTF-8 characters and append it to the result.if (!EmptyDecodeAndAppendRawOctetsList(encoding)){return ParsingResult.EncodingError;@@ -402,7 +402,7 @@ namespace SocketHttpListener.Net// Find end of path: The path is terminated by// - the first '?' character- // - the first '#' character: This is never the case here, since http.sys won't accept+ // - the first '#' character: This is never the case here, since http.sys won't accept// Uris containing fragments. Also, RFC2616 doesn't allow fragments in request Uris.// - end of Uri stringint queryIndex = uriString.IndexOf('?');diff --git a/SocketHttpListener/Net/WebSockets/HttpWebSocket.cs b/SocketHttpListener/Net/WebSockets/HttpWebSocket.csindex 9dc9143f84..1649050d9e 100644--- a/SocketHttpListener/Net/WebSockets/HttpWebSocket.cs+++ b/SocketHttpListener/Net/WebSockets/HttpWebSocket.cs@@ -30,7 +30,7 @@ namespace SocketHttpListener.Net.WebSocketsreturn retVal;}- // return value here signifies if a Sec-WebSocket-Protocol header should be returned by the server.+ // return value here signifies if a Sec-WebSocket-Protocol header should be returned by the server.internal static bool ProcessWebSocketProtocolHeader(string clientSecWebSocketProtocol,string subProtocol,out string acceptProtocol)@@ -44,7 +44,7 @@ namespace SocketHttpListener.Net.WebSockets// If the server specified _anything_ this isn't valid.throw new WebSocketException("UnsupportedProtocol");}- // Treat empty and null from the server as the same thing here, server should not send headers.+ // Treat empty and null from the server as the same thing here, server should not send headers.return false;}@@ -52,7 +52,7 @@ namespace SocketHttpListener.Net.WebSocketsif (subProtocol == null){- // client specified some protocols, server specified 'null'. So server should send headers.+ // client specified some protocols, server specified 'null'. So server should send headers.return true;}@@ -63,8 +63,8 @@ namespace SocketHttpListener.Net.WebSocketsStringSplitOptions.RemoveEmptyEntries);acceptProtocol = subProtocol;- // client specified protocols, serverOptions has exactly 1 non-empty entry. Check that- // this exists in the list the client specified.+ // client specified protocols, serverOptions has exactly 1 non-empty entry. Check that+ // this exists in the list the client specified.for (int i = 0; i < requestProtocols.Length; i++){string currentRequestProtocol = requestProtocols[i].Trim();diff --git a/SocketHttpListener/Net/WebSockets/WebSocketCloseStatus.cs b/SocketHttpListener/Net/WebSockets/WebSocketCloseStatus.csindex 0f43b7b800..b83b6cd0f7 100644--- a/SocketHttpListener/Net/WebSockets/WebSocketCloseStatus.cs+++ b/SocketHttpListener/Net/WebSockets/WebSocketCloseStatus.cs@@ -22,9 +22,9 @@ namespace SocketHttpListener.Net.WebSockets// 0 - 999 Status codes in the range 0-999 are not used.// 1000 - 1999 Status codes in the range 1000-1999 are reserved for definition by this protocol.// 2000 - 2999 Status codes in the range 2000-2999 are reserved for use by extensions.- // 3000 - 3999 Status codes in the range 3000-3999 MAY be used by libraries and frameworks. The- // interpretation of these codes is undefined by this protocol. End applications MUST- // NOT use status codes in this range.+ // 3000 - 3999 Status codes in the range 3000-3999 MAY be used by libraries and frameworks. The+ // interpretation of these codes is undefined by this protocol. End applications MUST+ // NOT use status codes in this range.// 4000 - 4999 Status codes in the range 4000-4999 MAY be used by application code. The interpretation// of these codes is undefined by this protocol.}diff --git a/SocketHttpListener/Properties/AssemblyInfo.cs b/SocketHttpListener/Properties/AssemblyInfo.csindex 8876cea4fe..4151e83e34 100644--- a/SocketHttpListener/Properties/AssemblyInfo.cs+++ b/SocketHttpListener/Properties/AssemblyInfo.cs@@ -2,7 +2,7 @@using System.Runtime.CompilerServices;using System.Runtime.InteropServices;-// General Information about an assembly is controlled through the following+// 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("SocketHttpListener")]@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;[assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]-// Setting ComVisible to false makes the types in this assembly not visible-// to COM components. If you need to access a type in this assembly from+// Setting ComVisible to false makes the types in this assembly not visible+// to COM components. If you need to access a type in this assembly from// COM, set the ComVisible attribute to true on that type.[assembly: ComVisible(false)]@@ -25,10 +25,10 @@ using System.Runtime.InteropServices;// Version information for an assembly consists of the following four values://// Major Version-// Minor Version+// Minor Version// Build Number// Revision//-// You can specify all the values or you can default the Build and Revision Numbers+// You can specify all the values or you can default the Build and Revision Numbers// by using the '*' as shown below:// [assembly: AssemblyVersion("1.0.*")]