From ef6b90b8e6e6c317fcda85a392c79324f91250db Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 25 Oct 2016 15:02:04 -0400 Subject: make controller project portable --- .../Persistence/SqliteItemRepository.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs') diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs index e6512f4df..bc62516c7 100644 --- a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs +++ b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs @@ -1140,7 +1140,10 @@ namespace MediaBrowser.Server.Implementations.Persistence { var idParts = part.Split('='); - item.SetProviderId(idParts[0], idParts[1]); + if (idParts.Length == 2) + { + item.SetProviderId(idParts[0], idParts[1]); + } } } -- cgit v1.2.3 From 0189f4c49dc89654e6aa10c5dd0fc50a0984bfec Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 26 Oct 2016 14:25:03 -0400 Subject: move provider project towards portability --- Emby.Photos/Emby.Photos.csproj | 72 +++++ Emby.Photos/PhotoProvider.cs | 169 ++++++++++ Emby.Photos/Properties/AssemblyInfo.cs | 36 +++ .../MediaBrowser.MediaEncoding.csproj | 6 + .../Subtitles/ConfigurationExtension.cs | 29 ++ .../Subtitles/OpenSubtitleDownloader.cs | 340 +++++++++++++++++++++ .../MediaBrowser.Providers.csproj | 12 - MediaBrowser.Providers/Photos/PhotoHelper.cs | 98 ------ MediaBrowser.Providers/Photos/PhotoProvider.cs | 169 ---------- .../Subtitles/ConfigurationExtension.cs | 29 -- .../Subtitles/OpenSubtitleDownloader.cs | 340 --------------------- .../Persistence/SqliteItemRepository.cs | 14 +- .../ApplicationHost.cs | 4 + .../MediaBrowser.Server.Startup.Common.csproj | 4 + MediaBrowser.sln | 32 ++ 15 files changed, 705 insertions(+), 649 deletions(-) create mode 100644 Emby.Photos/Emby.Photos.csproj create mode 100644 Emby.Photos/PhotoProvider.cs create mode 100644 Emby.Photos/Properties/AssemblyInfo.cs create mode 100644 MediaBrowser.MediaEncoding/Subtitles/ConfigurationExtension.cs create mode 100644 MediaBrowser.MediaEncoding/Subtitles/OpenSubtitleDownloader.cs delete mode 100644 MediaBrowser.Providers/Photos/PhotoHelper.cs delete mode 100644 MediaBrowser.Providers/Photos/PhotoProvider.cs delete mode 100644 MediaBrowser.Providers/Subtitles/ConfigurationExtension.cs delete mode 100644 MediaBrowser.Providers/Subtitles/OpenSubtitleDownloader.cs (limited to 'MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs') diff --git a/Emby.Photos/Emby.Photos.csproj b/Emby.Photos/Emby.Photos.csproj new file mode 100644 index 000000000..efc15519f --- /dev/null +++ b/Emby.Photos/Emby.Photos.csproj @@ -0,0 +1,72 @@ + + + + + Debug + AnyCPU + {89AB4548-770D-41FD-A891-8DAFF44F452C} + Library + Properties + Emby.Photos + Emby.Photos + v4.6 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + ..\ThirdParty\taglib\taglib-sharp.dll + + + + + + + + + {9142eefa-7570-41e1-bfcc-468bb571af2f} + MediaBrowser.Common + + + {17e1f4e6-8abd-4fe5-9ecf-43d4b6087ba2} + MediaBrowser.Controller + + + {7eeeb4bb-f3e8-48fc-b4c5-70f0fff8329b} + MediaBrowser.Model + + + + + \ No newline at end of file diff --git a/Emby.Photos/PhotoProvider.cs b/Emby.Photos/PhotoProvider.cs new file mode 100644 index 000000000..aa9b36f17 --- /dev/null +++ b/Emby.Photos/PhotoProvider.cs @@ -0,0 +1,169 @@ +using System; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Library; +using MediaBrowser.Controller.Providers; +using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Logging; +using TagLib; +using TagLib.IFD; +using TagLib.IFD.Entries; +using TagLib.IFD.Tags; + +namespace Emby.Photos +{ + public class PhotoProvider : ICustomMetadataProvider, IHasItemChangeMonitor, IForcedProvider + { + private readonly ILogger _logger; + + public PhotoProvider(ILogger logger) + { + _logger = logger; + } + + public Task FetchAsync(Photo item, MetadataRefreshOptions options, CancellationToken cancellationToken) + { + item.SetImagePath(ImageType.Primary, item.Path); + + // Examples: https://github.com/mono/taglib-sharp/blob/a5f6949a53d09ce63ee7495580d6802921a21f14/tests/fixtures/TagLib.Tests.Images/NullOrientationTest.cs + + try + { + using (var file = TagLib.File.Create(item.Path)) + { + var image = file as TagLib.Image.File; + + var tag = file.GetTag(TagTypes.TiffIFD) as IFDTag; + + if (tag != null) + { + var structure = tag.Structure; + + if (structure != null) + { + var exif = structure.GetEntry(0, (ushort)IFDEntryTag.ExifIFD) as SubIFDEntry; + + if (exif != null) + { + var exifStructure = exif.Structure; + + if (exifStructure != null) + { + var entry = exifStructure.GetEntry(0, (ushort)ExifEntryTag.ApertureValue) as RationalIFDEntry; + + if (entry != null) + { + double val = entry.Value.Numerator; + val /= entry.Value.Denominator; + item.Aperture = val; + } + + entry = exifStructure.GetEntry(0, (ushort)ExifEntryTag.ShutterSpeedValue) as RationalIFDEntry; + + if (entry != null) + { + double val = entry.Value.Numerator; + val /= entry.Value.Denominator; + item.ShutterSpeed = val; + } + } + } + } + } + + item.CameraMake = image.ImageTag.Make; + item.CameraModel = image.ImageTag.Model; + + item.Width = image.Properties.PhotoWidth; + item.Height = image.Properties.PhotoHeight; + + var rating = image.ImageTag.Rating; + if (rating.HasValue) + { + item.CommunityRating = rating; + } + else + { + item.CommunityRating = null; + } + + item.Overview = image.ImageTag.Comment; + + if (!string.IsNullOrWhiteSpace(image.ImageTag.Title)) + { + item.Name = image.ImageTag.Title; + } + + var dateTaken = image.ImageTag.DateTime; + if (dateTaken.HasValue) + { + item.DateCreated = dateTaken.Value; + item.PremiereDate = dateTaken.Value; + item.ProductionYear = dateTaken.Value.Year; + } + + item.Genres = image.ImageTag.Genres.ToList(); + item.Tags = image.ImageTag.Keywords.ToList(); + item.Software = image.ImageTag.Software; + + if (image.ImageTag.Orientation == TagLib.Image.ImageOrientation.None) + { + item.Orientation = null; + } + else + { + MediaBrowser.Model.Drawing.ImageOrientation orientation; + if (Enum.TryParse(image.ImageTag.Orientation.ToString(), true, out orientation)) + { + item.Orientation = orientation; + } + } + + item.ExposureTime = image.ImageTag.ExposureTime; + item.FocalLength = image.ImageTag.FocalLength; + + item.Latitude = image.ImageTag.Latitude; + item.Longitude = image.ImageTag.Longitude; + item.Altitude = image.ImageTag.Altitude; + + if (image.ImageTag.ISOSpeedRatings.HasValue) + { + item.IsoSpeedRating = Convert.ToInt32(image.ImageTag.ISOSpeedRatings.Value); + } + else + { + item.IsoSpeedRating = null; + } + } + } + catch (Exception e) + { + _logger.ErrorException("Image Provider - Error reading image tag for {0}", e, item.Path); + } + + const ItemUpdateType result = ItemUpdateType.ImageUpdate | ItemUpdateType.MetadataImport; + return Task.FromResult(result); + } + + public string Name + { + get { return "Embedded Information"; } + } + + public bool HasChanged(IHasMetadata item, IDirectoryService directoryService) + { + if (item.EnableRefreshOnDateModifiedChange && !string.IsNullOrWhiteSpace(item.Path) && item.LocationType == LocationType.FileSystem) + { + var file = directoryService.GetFile(item.Path); + if (file != null && file.LastWriteTimeUtc != item.DateModified) + { + return true; + } + } + + return false; + } + } +} diff --git a/Emby.Photos/Properties/AssemblyInfo.cs b/Emby.Photos/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..abef142ef --- /dev/null +++ b/Emby.Photos/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Emby.Photos")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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 +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("89ab4548-770d-41fd-a891-8daff44f452c")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// 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")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj b/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj index 1834aaf67..3b017cc4e 100644 --- a/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj +++ b/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj @@ -76,9 +76,11 @@ + + @@ -101,6 +103,10 @@ {7eeeb4bb-f3e8-48fc-b4c5-70f0fff8329b} MediaBrowser.Model + + {4a4402d4-e910-443b-b8fc-2c18286a2ca0} + OpenSubtitlesHandler + diff --git a/MediaBrowser.MediaEncoding/Subtitles/ConfigurationExtension.cs b/MediaBrowser.MediaEncoding/Subtitles/ConfigurationExtension.cs new file mode 100644 index 000000000..973c653a4 --- /dev/null +++ b/MediaBrowser.MediaEncoding/Subtitles/ConfigurationExtension.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; +using MediaBrowser.Common.Configuration; +using MediaBrowser.Model.Providers; + +namespace MediaBrowser.MediaEncoding.Subtitles +{ + public static class ConfigurationExtension + { + public static SubtitleOptions GetSubtitleConfiguration(this IConfigurationManager manager) + { + return manager.GetConfiguration("subtitles"); + } + } + + public class SubtitleConfigurationFactory : IConfigurationFactory + { + public IEnumerable GetConfigurations() + { + return new List + { + new ConfigurationStore + { + Key = "subtitles", + ConfigurationType = typeof (SubtitleOptions) + } + }; + } + } +} diff --git a/MediaBrowser.MediaEncoding/Subtitles/OpenSubtitleDownloader.cs b/MediaBrowser.MediaEncoding/Subtitles/OpenSubtitleDownloader.cs new file mode 100644 index 000000000..a58da3dc8 --- /dev/null +++ b/MediaBrowser.MediaEncoding/Subtitles/OpenSubtitleDownloader.cs @@ -0,0 +1,340 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using MediaBrowser.Common.Configuration; +using MediaBrowser.Common.Extensions; +using MediaBrowser.Common.Net; +using MediaBrowser.Controller.Configuration; +using MediaBrowser.Controller.Providers; +using MediaBrowser.Controller.Security; +using MediaBrowser.Controller.Subtitles; +using MediaBrowser.Model.Dto; +using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Logging; +using MediaBrowser.Model.Providers; +using MediaBrowser.Model.Serialization; +using OpenSubtitlesHandler; + +namespace MediaBrowser.MediaEncoding.Subtitles +{ + public class OpenSubtitleDownloader : ISubtitleProvider, IDisposable + { + private readonly ILogger _logger; + private readonly IHttpClient _httpClient; + private readonly CultureInfo _usCulture = new CultureInfo("en-US"); + + private readonly IServerConfigurationManager _config; + private readonly IEncryptionManager _encryption; + + private readonly IJsonSerializer _json; + + public OpenSubtitleDownloader(ILogManager logManager, IHttpClient httpClient, IServerConfigurationManager config, IEncryptionManager encryption, IJsonSerializer json) + { + _logger = logManager.GetLogger(GetType().Name); + _httpClient = httpClient; + _config = config; + _encryption = encryption; + _json = json; + + _config.NamedConfigurationUpdating += _config_NamedConfigurationUpdating; + + Utilities.HttpClient = httpClient; + OpenSubtitles.SetUserAgent("mediabrowser.tv"); + } + + private const string PasswordHashPrefix = "h:"; + void _config_NamedConfigurationUpdating(object sender, ConfigurationUpdateEventArgs e) + { + if (!string.Equals(e.Key, "subtitles", StringComparison.OrdinalIgnoreCase)) + { + return; + } + + var options = (SubtitleOptions)e.NewConfiguration; + + if (options != null && + !string.IsNullOrWhiteSpace(options.OpenSubtitlesPasswordHash) && + !options.OpenSubtitlesPasswordHash.StartsWith(PasswordHashPrefix, StringComparison.OrdinalIgnoreCase)) + { + options.OpenSubtitlesPasswordHash = EncryptPassword(options.OpenSubtitlesPasswordHash); + } + } + + private string EncryptPassword(string password) + { + return PasswordHashPrefix + _encryption.EncryptString(password); + } + + private string DecryptPassword(string password) + { + if (password == null || + !password.StartsWith(PasswordHashPrefix, StringComparison.OrdinalIgnoreCase)) + { + return string.Empty; + } + + return _encryption.DecryptString(password.Substring(2)); + } + + public string Name + { + get { return "Open Subtitles"; } + } + + private SubtitleOptions GetOptions() + { + return _config.GetSubtitleConfiguration(); + } + + public IEnumerable SupportedMediaTypes + { + get + { + var options = GetOptions(); + + if (string.IsNullOrWhiteSpace(options.OpenSubtitlesUsername) || + string.IsNullOrWhiteSpace(options.OpenSubtitlesPasswordHash)) + { + return new VideoContentType[] { }; + } + + return new[] { VideoContentType.Episode, VideoContentType.Movie }; + } + } + + public Task GetSubtitles(string id, CancellationToken cancellationToken) + { + return GetSubtitlesInternal(id, GetOptions(), cancellationToken); + } + + private DateTime _lastRateLimitException; + private async Task GetSubtitlesInternal(string id, + SubtitleOptions options, + CancellationToken cancellationToken) + { + if (string.IsNullOrWhiteSpace(id)) + { + throw new ArgumentNullException("id"); + } + + var idParts = id.Split(new[] { '-' }, 3); + + var format = idParts[0]; + var language = idParts[1]; + var ossId = idParts[2]; + + var downloadsList = new[] { int.Parse(ossId, _usCulture) }; + + await Login(cancellationToken).ConfigureAwait(false); + + if ((DateTime.UtcNow - _lastRateLimitException).TotalHours < 1) + { + throw new ApplicationException("OpenSubtitles rate limit reached"); + } + + var resultDownLoad = await OpenSubtitles.DownloadSubtitlesAsync(downloadsList, cancellationToken).ConfigureAwait(false); + + if ((resultDownLoad.Status ?? string.Empty).IndexOf("407", StringComparison.OrdinalIgnoreCase) != -1) + { + _lastRateLimitException = DateTime.UtcNow; + throw new ApplicationException("OpenSubtitles rate limit reached"); + } + + if (!(resultDownLoad is MethodResponseSubtitleDownload)) + { + throw new ApplicationException("Invalid response type"); + } + + var results = ((MethodResponseSubtitleDownload)resultDownLoad).Results; + + _lastRateLimitException = DateTime.MinValue; + + if (results.Count == 0) + { + var msg = string.Format("Subtitle with Id {0} was not found. Name: {1}. Status: {2}. Message: {3}", + ossId, + resultDownLoad.Name ?? string.Empty, + resultDownLoad.Status ?? string.Empty, + resultDownLoad.Message ?? string.Empty); + + throw new ResourceNotFoundException(msg); + } + + var data = Convert.FromBase64String(results.First().Data); + + return new SubtitleResponse + { + Format = format, + Language = language, + + Stream = new MemoryStream(Utilities.Decompress(new MemoryStream(data))) + }; + } + + private DateTime _lastLogin; + private async Task Login(CancellationToken cancellationToken) + { + if ((DateTime.UtcNow - _lastLogin).TotalSeconds < 60) + { + return; + } + + var options = GetOptions(); + + var user = options.OpenSubtitlesUsername ?? string.Empty; + var password = DecryptPassword(options.OpenSubtitlesPasswordHash); + + var loginResponse = await OpenSubtitles.LogInAsync(user, password, "en", cancellationToken).ConfigureAwait(false); + + if (!(loginResponse is MethodResponseLogIn)) + { + throw new Exception("Authentication to OpenSubtitles failed."); + } + + _lastLogin = DateTime.UtcNow; + } + + public async Task> GetSupportedLanguages(CancellationToken cancellationToken) + { + await Login(cancellationToken).ConfigureAwait(false); + + var result = OpenSubtitles.GetSubLanguages("en"); + if (!(result is MethodResponseGetSubLanguages)) + { + _logger.Error("Invalid response type"); + return new List(); + } + + var results = ((MethodResponseGetSubLanguages)result).Languages; + + return results.Select(i => new NameIdPair + { + Name = i.LanguageName, + Id = i.SubLanguageID + }); + } + + private string NormalizeLanguage(string language) + { + // Problem with Greek subtitle download #1349 + if (string.Equals (language, "gre", StringComparison.OrdinalIgnoreCase)) { + + return "ell"; + } + + return language; + } + + public async Task> Search(SubtitleSearchRequest request, CancellationToken cancellationToken) + { + var imdbIdText = request.GetProviderId(MetadataProviders.Imdb); + long imdbId = 0; + + switch (request.ContentType) + { + case VideoContentType.Episode: + if (!request.IndexNumber.HasValue || !request.ParentIndexNumber.HasValue || string.IsNullOrEmpty(request.SeriesName)) + { + _logger.Debug("Episode information missing"); + return new List(); + } + break; + case VideoContentType.Movie: + if (string.IsNullOrEmpty(request.Name)) + { + _logger.Debug("Movie name missing"); + return new List(); + } + if (string.IsNullOrWhiteSpace(imdbIdText) || !long.TryParse(imdbIdText.TrimStart('t'), NumberStyles.Any, _usCulture, out imdbId)) + { + _logger.Debug("Imdb id missing"); + return new List(); + } + break; + } + + if (string.IsNullOrEmpty(request.MediaPath)) + { + _logger.Debug("Path Missing"); + return new List(); + } + + await Login(cancellationToken).ConfigureAwait(false); + + var subLanguageId = NormalizeLanguage(request.Language); + var hash = Utilities.ComputeHash(request.MediaPath); + var fileInfo = new FileInfo(request.MediaPath); + var movieByteSize = fileInfo.Length; + var searchImdbId = request.ContentType == VideoContentType.Movie ? imdbId.ToString(_usCulture) : ""; + var subtitleSearchParameters = request.ContentType == VideoContentType.Episode + ? new List { + new SubtitleSearchParameters(subLanguageId, + query: request.SeriesName, + season: request.ParentIndexNumber.Value.ToString(_usCulture), + episode: request.IndexNumber.Value.ToString(_usCulture)) + } + : new List { + new SubtitleSearchParameters(subLanguageId, imdbid: searchImdbId), + new SubtitleSearchParameters(subLanguageId, query: request.Name, imdbid: searchImdbId) + }; + var parms = new List { + new SubtitleSearchParameters( subLanguageId, + movieHash: hash, + movieByteSize: movieByteSize, + imdbid: searchImdbId ), + }; + parms.AddRange(subtitleSearchParameters); + var result = await OpenSubtitles.SearchSubtitlesAsync(parms.ToArray(), cancellationToken).ConfigureAwait(false); + if (!(result is MethodResponseSubtitleSearch)) + { + _logger.Error("Invalid response type"); + return new List(); + } + + Predicate mediaFilter = + x => + request.ContentType == VideoContentType.Episode + ? !string.IsNullOrEmpty(x.SeriesSeason) && !string.IsNullOrEmpty(x.SeriesEpisode) && + int.Parse(x.SeriesSeason, _usCulture) == request.ParentIndexNumber && + int.Parse(x.SeriesEpisode, _usCulture) == request.IndexNumber + : !string.IsNullOrEmpty(x.IDMovieImdb) && long.Parse(x.IDMovieImdb, _usCulture) == imdbId; + + var results = ((MethodResponseSubtitleSearch)result).Results; + + // Avoid implicitly captured closure + var hasCopy = hash; + + return results.Where(x => x.SubBad == "0" && mediaFilter(x) && (!request.IsPerfectMatch || string.Equals(x.MovieHash, hash, StringComparison.OrdinalIgnoreCase))) + .OrderBy(x => (string.Equals(x.MovieHash, hash, StringComparison.OrdinalIgnoreCase) ? 0 : 1)) + .ThenBy(x => Math.Abs(long.Parse(x.MovieByteSize, _usCulture) - movieByteSize)) + .ThenByDescending(x => int.Parse(x.SubDownloadsCnt, _usCulture)) + .ThenByDescending(x => double.Parse(x.SubRating, _usCulture)) + .Select(i => new RemoteSubtitleInfo + { + Author = i.UserNickName, + Comment = i.SubAuthorComment, + CommunityRating = float.Parse(i.SubRating, _usCulture), + DownloadCount = int.Parse(i.SubDownloadsCnt, _usCulture), + Format = i.SubFormat, + ProviderName = Name, + ThreeLetterISOLanguageName = i.SubLanguageID, + + Id = i.SubFormat + "-" + i.SubLanguageID + "-" + i.IDSubtitleFile, + + Name = i.SubFileName, + DateCreated = DateTime.Parse(i.SubAddDate, _usCulture), + IsHashMatch = i.MovieHash == hasCopy + + }).Where(i => !string.Equals(i.Format, "sub", StringComparison.OrdinalIgnoreCase) && !string.Equals(i.Format, "idx", StringComparison.OrdinalIgnoreCase)); + } + + public void Dispose() + { + _config.NamedConfigurationUpdating -= _config_NamedConfigurationUpdating; + } + } +} diff --git a/MediaBrowser.Providers/MediaBrowser.Providers.csproj b/MediaBrowser.Providers/MediaBrowser.Providers.csproj index 3fcdbf1c7..4808dae1a 100644 --- a/MediaBrowser.Providers/MediaBrowser.Providers.csproj +++ b/MediaBrowser.Providers/MediaBrowser.Providers.csproj @@ -55,10 +55,6 @@ - - False - ..\ThirdParty\taglib\taglib-sharp.dll - @@ -131,16 +127,12 @@ - - - - @@ -182,10 +174,6 @@ {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B} MediaBrowser.Model - - {4a4402d4-e910-443b-b8fc-2c18286a2ca0} - OpenSubtitlesHandler - diff --git a/MediaBrowser.Providers/Photos/PhotoHelper.cs b/MediaBrowser.Providers/Photos/PhotoHelper.cs deleted file mode 100644 index 2334c792e..000000000 --- a/MediaBrowser.Providers/Photos/PhotoHelper.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.Text; - -namespace MediaBrowser.Providers.Photos -{ - public static class PhotoHelper - { - public static string Dec2Frac(double dbl) - { - char neg = ' '; - double dblDecimal = dbl; - if (dblDecimal == (int)dblDecimal) return dblDecimal.ToString(); //return no if it's not a decimal - if (dblDecimal < 0) - { - dblDecimal = Math.Abs(dblDecimal); - neg = '-'; - } - var whole = (int)Math.Truncate(dblDecimal); - string decpart = dblDecimal.ToString().Replace(Math.Truncate(dblDecimal) + ".", ""); - double rN = Convert.ToDouble(decpart); - double rD = Math.Pow(10, decpart.Length); - - string rd = Recur(decpart); - int rel = Convert.ToInt32(rd); - if (rel != 0) - { - rN = rel; - rD = (int)Math.Pow(10, rd.Length) - 1; - } - //just a few prime factors for testing purposes - var primes = new[] { 47, 43, 37, 31, 29, 23, 19, 17, 13, 11, 7, 5, 3, 2 }; - foreach (int i in primes) ReduceNo(i, ref rD, ref rN); - - rN = rN + (whole * rD); - return string.Format("{0}{1}/{2}", neg, rN, rD); - } - - /// - /// Finds out the recurring decimal in a specified number - /// - /// Number to check - /// - private static string Recur(string db) - { - if (db.Length < 13) return "0"; - var sb = new StringBuilder(); - for (int i = 0; i < 7; i++) - { - sb.Append(db[i]); - int dlength = (db.Length / sb.ToString().Length); - int occur = Occurence(sb.ToString(), db); - if (dlength == occur || dlength == occur - sb.ToString().Length) - { - return sb.ToString(); - } - } - return "0"; - } - - /// - /// Checks for number of occurence of specified no in a number - /// - /// The no to check occurence times - /// The number where to check this - /// - private static int Occurence(string s, string check) - { - int i = 0; - int d = s.Length; - string ds = check; - for (int n = (ds.Length / d); n > 0; n--) - { - if (ds.Contains(s)) - { - i++; - ds = ds.Remove(ds.IndexOf(s, System.StringComparison.Ordinal), d); - } - } - return i; - } - - /// - /// Reduces a fraction given the numerator and denominator - /// - /// Number to use in an attempt to reduce fraction - /// the Denominator - /// the Numerator - private static void ReduceNo(int i, ref double rD, ref double rN) - { - //keep reducing until divisibility ends - while ((rD % i) < 1e-10 && (rN % i) < 1e-10) - { - rN = rN / i; - rD = rD / i; - } - } - } -} diff --git a/MediaBrowser.Providers/Photos/PhotoProvider.cs b/MediaBrowser.Providers/Photos/PhotoProvider.cs deleted file mode 100644 index c48c3d09b..000000000 --- a/MediaBrowser.Providers/Photos/PhotoProvider.cs +++ /dev/null @@ -1,169 +0,0 @@ -using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.Providers; -using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Logging; -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using TagLib; -using TagLib.IFD; -using TagLib.IFD.Entries; -using TagLib.IFD.Tags; - -namespace MediaBrowser.Providers.Photos -{ - public class PhotoProvider : ICustomMetadataProvider, IHasItemChangeMonitor, IForcedProvider - { - private readonly ILogger _logger; - - public PhotoProvider(ILogger logger) - { - _logger = logger; - } - - public Task FetchAsync(Photo item, MetadataRefreshOptions options, CancellationToken cancellationToken) - { - item.SetImagePath(ImageType.Primary, item.Path); - - // Examples: https://github.com/mono/taglib-sharp/blob/a5f6949a53d09ce63ee7495580d6802921a21f14/tests/fixtures/TagLib.Tests.Images/NullOrientationTest.cs - - try - { - using (var file = TagLib.File.Create(item.Path)) - { - var image = file as TagLib.Image.File; - - var tag = file.GetTag(TagTypes.TiffIFD) as IFDTag; - - if (tag != null) - { - var structure = tag.Structure; - - if (structure != null) - { - var exif = structure.GetEntry(0, (ushort)IFDEntryTag.ExifIFD) as SubIFDEntry; - - if (exif != null) - { - var exifStructure = exif.Structure; - - if (exifStructure != null) - { - var entry = exifStructure.GetEntry(0, (ushort)ExifEntryTag.ApertureValue) as RationalIFDEntry; - - if (entry != null) - { - double val = entry.Value.Numerator; - val /= entry.Value.Denominator; - item.Aperture = val; - } - - entry = exifStructure.GetEntry(0, (ushort)ExifEntryTag.ShutterSpeedValue) as RationalIFDEntry; - - if (entry != null) - { - double val = entry.Value.Numerator; - val /= entry.Value.Denominator; - item.ShutterSpeed = val; - } - } - } - } - } - - item.CameraMake = image.ImageTag.Make; - item.CameraModel = image.ImageTag.Model; - - item.Width = image.Properties.PhotoWidth; - item.Height = image.Properties.PhotoHeight; - - var rating = image.ImageTag.Rating; - if (rating.HasValue) - { - item.CommunityRating = rating; - } - else - { - item.CommunityRating = null; - } - - item.Overview = image.ImageTag.Comment; - - if (!string.IsNullOrWhiteSpace(image.ImageTag.Title)) - { - item.Name = image.ImageTag.Title; - } - - var dateTaken = image.ImageTag.DateTime; - if (dateTaken.HasValue) - { - item.DateCreated = dateTaken.Value; - item.PremiereDate = dateTaken.Value; - item.ProductionYear = dateTaken.Value.Year; - } - - item.Genres = image.ImageTag.Genres.ToList(); - item.Tags = image.ImageTag.Keywords.ToList(); - item.Software = image.ImageTag.Software; - - if (image.ImageTag.Orientation == TagLib.Image.ImageOrientation.None) - { - item.Orientation = null; - } - else - { - Model.Drawing.ImageOrientation orientation; - if (Enum.TryParse(image.ImageTag.Orientation.ToString(), true, out orientation)) - { - item.Orientation = orientation; - } - } - - item.ExposureTime = image.ImageTag.ExposureTime; - item.FocalLength = image.ImageTag.FocalLength; - - item.Latitude = image.ImageTag.Latitude; - item.Longitude = image.ImageTag.Longitude; - item.Altitude = image.ImageTag.Altitude; - - if (image.ImageTag.ISOSpeedRatings.HasValue) - { - item.IsoSpeedRating = Convert.ToInt32(image.ImageTag.ISOSpeedRatings.Value); - } - else - { - item.IsoSpeedRating = null; - } - } - } - catch (Exception e) - { - _logger.ErrorException("Image Provider - Error reading image tag for {0}", e, item.Path); - } - - const ItemUpdateType result = ItemUpdateType.ImageUpdate | ItemUpdateType.MetadataImport; - return Task.FromResult(result); - } - - public string Name - { - get { return "Embedded Information"; } - } - - public bool HasChanged(IHasMetadata item, IDirectoryService directoryService) - { - if (item.EnableRefreshOnDateModifiedChange && !string.IsNullOrWhiteSpace(item.Path) && item.LocationType == LocationType.FileSystem) - { - var file = directoryService.GetFile(item.Path); - if (file != null && file.LastWriteTimeUtc != item.DateModified) - { - return true; - } - } - - return false; - } - } -} diff --git a/MediaBrowser.Providers/Subtitles/ConfigurationExtension.cs b/MediaBrowser.Providers/Subtitles/ConfigurationExtension.cs deleted file mode 100644 index f520915d8..000000000 --- a/MediaBrowser.Providers/Subtitles/ConfigurationExtension.cs +++ /dev/null @@ -1,29 +0,0 @@ -using MediaBrowser.Common.Configuration; -using MediaBrowser.Model.Providers; -using System.Collections.Generic; - -namespace MediaBrowser.Providers.Subtitles -{ - public static class ConfigurationExtension - { - public static SubtitleOptions GetSubtitleConfiguration(this IConfigurationManager manager) - { - return manager.GetConfiguration("subtitles"); - } - } - - public class SubtitleConfigurationFactory : IConfigurationFactory - { - public IEnumerable GetConfigurations() - { - return new List - { - new ConfigurationStore - { - Key = "subtitles", - ConfigurationType = typeof (SubtitleOptions) - } - }; - } - } -} diff --git a/MediaBrowser.Providers/Subtitles/OpenSubtitleDownloader.cs b/MediaBrowser.Providers/Subtitles/OpenSubtitleDownloader.cs deleted file mode 100644 index 271f8170f..000000000 --- a/MediaBrowser.Providers/Subtitles/OpenSubtitleDownloader.cs +++ /dev/null @@ -1,340 +0,0 @@ -using MediaBrowser.Common.Configuration; -using MediaBrowser.Common.Extensions; -using MediaBrowser.Common.Net; -using MediaBrowser.Controller.Configuration; -using MediaBrowser.Controller.Providers; -using MediaBrowser.Controller.Security; -using MediaBrowser.Controller.Subtitles; -using MediaBrowser.Model.Dto; -using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Logging; -using MediaBrowser.Model.Providers; -using MediaBrowser.Model.Serialization; -using OpenSubtitlesHandler; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; - -namespace MediaBrowser.Providers.Subtitles -{ - public class OpenSubtitleDownloader : ISubtitleProvider, IDisposable - { - private readonly ILogger _logger; - private readonly IHttpClient _httpClient; - private readonly CultureInfo _usCulture = new CultureInfo("en-US"); - - private readonly IServerConfigurationManager _config; - private readonly IEncryptionManager _encryption; - - private readonly IJsonSerializer _json; - - public OpenSubtitleDownloader(ILogManager logManager, IHttpClient httpClient, IServerConfigurationManager config, IEncryptionManager encryption, IJsonSerializer json) - { - _logger = logManager.GetLogger(GetType().Name); - _httpClient = httpClient; - _config = config; - _encryption = encryption; - _json = json; - - _config.NamedConfigurationUpdating += _config_NamedConfigurationUpdating; - - Utilities.HttpClient = httpClient; - OpenSubtitles.SetUserAgent("mediabrowser.tv"); - } - - private const string PasswordHashPrefix = "h:"; - void _config_NamedConfigurationUpdating(object sender, ConfigurationUpdateEventArgs e) - { - if (!string.Equals(e.Key, "subtitles", StringComparison.OrdinalIgnoreCase)) - { - return; - } - - var options = (SubtitleOptions)e.NewConfiguration; - - if (options != null && - !string.IsNullOrWhiteSpace(options.OpenSubtitlesPasswordHash) && - !options.OpenSubtitlesPasswordHash.StartsWith(PasswordHashPrefix, StringComparison.OrdinalIgnoreCase)) - { - options.OpenSubtitlesPasswordHash = EncryptPassword(options.OpenSubtitlesPasswordHash); - } - } - - private string EncryptPassword(string password) - { - return PasswordHashPrefix + _encryption.EncryptString(password); - } - - private string DecryptPassword(string password) - { - if (password == null || - !password.StartsWith(PasswordHashPrefix, StringComparison.OrdinalIgnoreCase)) - { - return string.Empty; - } - - return _encryption.DecryptString(password.Substring(2)); - } - - public string Name - { - get { return "Open Subtitles"; } - } - - private SubtitleOptions GetOptions() - { - return _config.GetSubtitleConfiguration(); - } - - public IEnumerable SupportedMediaTypes - { - get - { - var options = GetOptions(); - - if (string.IsNullOrWhiteSpace(options.OpenSubtitlesUsername) || - string.IsNullOrWhiteSpace(options.OpenSubtitlesPasswordHash)) - { - return new VideoContentType[] { }; - } - - return new[] { VideoContentType.Episode, VideoContentType.Movie }; - } - } - - public Task GetSubtitles(string id, CancellationToken cancellationToken) - { - return GetSubtitlesInternal(id, GetOptions(), cancellationToken); - } - - private DateTime _lastRateLimitException; - private async Task GetSubtitlesInternal(string id, - SubtitleOptions options, - CancellationToken cancellationToken) - { - if (string.IsNullOrWhiteSpace(id)) - { - throw new ArgumentNullException("id"); - } - - var idParts = id.Split(new[] { '-' }, 3); - - var format = idParts[0]; - var language = idParts[1]; - var ossId = idParts[2]; - - var downloadsList = new[] { int.Parse(ossId, _usCulture) }; - - await Login(cancellationToken).ConfigureAwait(false); - - if ((DateTime.UtcNow - _lastRateLimitException).TotalHours < 1) - { - throw new ApplicationException("OpenSubtitles rate limit reached"); - } - - var resultDownLoad = await OpenSubtitles.DownloadSubtitlesAsync(downloadsList, cancellationToken).ConfigureAwait(false); - - if ((resultDownLoad.Status ?? string.Empty).IndexOf("407", StringComparison.OrdinalIgnoreCase) != -1) - { - _lastRateLimitException = DateTime.UtcNow; - throw new ApplicationException("OpenSubtitles rate limit reached"); - } - - if (!(resultDownLoad is MethodResponseSubtitleDownload)) - { - throw new ApplicationException("Invalid response type"); - } - - var results = ((MethodResponseSubtitleDownload)resultDownLoad).Results; - - _lastRateLimitException = DateTime.MinValue; - - if (results.Count == 0) - { - var msg = string.Format("Subtitle with Id {0} was not found. Name: {1}. Status: {2}. Message: {3}", - ossId, - resultDownLoad.Name ?? string.Empty, - resultDownLoad.Status ?? string.Empty, - resultDownLoad.Message ?? string.Empty); - - throw new ResourceNotFoundException(msg); - } - - var data = Convert.FromBase64String(results.First().Data); - - return new SubtitleResponse - { - Format = format, - Language = language, - - Stream = new MemoryStream(Utilities.Decompress(new MemoryStream(data))) - }; - } - - private DateTime _lastLogin; - private async Task Login(CancellationToken cancellationToken) - { - if ((DateTime.UtcNow - _lastLogin).TotalSeconds < 60) - { - return; - } - - var options = GetOptions(); - - var user = options.OpenSubtitlesUsername ?? string.Empty; - var password = DecryptPassword(options.OpenSubtitlesPasswordHash); - - var loginResponse = await OpenSubtitles.LogInAsync(user, password, "en", cancellationToken).ConfigureAwait(false); - - if (!(loginResponse is MethodResponseLogIn)) - { - throw new Exception("Authentication to OpenSubtitles failed."); - } - - _lastLogin = DateTime.UtcNow; - } - - public async Task> GetSupportedLanguages(CancellationToken cancellationToken) - { - await Login(cancellationToken).ConfigureAwait(false); - - var result = OpenSubtitles.GetSubLanguages("en"); - if (!(result is MethodResponseGetSubLanguages)) - { - _logger.Error("Invalid response type"); - return new List(); - } - - var results = ((MethodResponseGetSubLanguages)result).Languages; - - return results.Select(i => new NameIdPair - { - Name = i.LanguageName, - Id = i.SubLanguageID - }); - } - - private string NormalizeLanguage(string language) - { - // Problem with Greek subtitle download #1349 - if (string.Equals (language, "gre", StringComparison.OrdinalIgnoreCase)) { - - return "ell"; - } - - return language; - } - - public async Task> Search(SubtitleSearchRequest request, CancellationToken cancellationToken) - { - var imdbIdText = request.GetProviderId(MetadataProviders.Imdb); - long imdbId = 0; - - switch (request.ContentType) - { - case VideoContentType.Episode: - if (!request.IndexNumber.HasValue || !request.ParentIndexNumber.HasValue || string.IsNullOrEmpty(request.SeriesName)) - { - _logger.Debug("Episode information missing"); - return new List(); - } - break; - case VideoContentType.Movie: - if (string.IsNullOrEmpty(request.Name)) - { - _logger.Debug("Movie name missing"); - return new List(); - } - if (string.IsNullOrWhiteSpace(imdbIdText) || !long.TryParse(imdbIdText.TrimStart('t'), NumberStyles.Any, _usCulture, out imdbId)) - { - _logger.Debug("Imdb id missing"); - return new List(); - } - break; - } - - if (string.IsNullOrEmpty(request.MediaPath)) - { - _logger.Debug("Path Missing"); - return new List(); - } - - await Login(cancellationToken).ConfigureAwait(false); - - var subLanguageId = NormalizeLanguage(request.Language); - var hash = Utilities.ComputeHash(request.MediaPath); - var fileInfo = new FileInfo(request.MediaPath); - var movieByteSize = fileInfo.Length; - var searchImdbId = request.ContentType == VideoContentType.Movie ? imdbId.ToString(_usCulture) : ""; - var subtitleSearchParameters = request.ContentType == VideoContentType.Episode - ? new List { - new SubtitleSearchParameters(subLanguageId, - query: request.SeriesName, - season: request.ParentIndexNumber.Value.ToString(_usCulture), - episode: request.IndexNumber.Value.ToString(_usCulture)) - } - : new List { - new SubtitleSearchParameters(subLanguageId, imdbid: searchImdbId), - new SubtitleSearchParameters(subLanguageId, query: request.Name, imdbid: searchImdbId) - }; - var parms = new List { - new SubtitleSearchParameters( subLanguageId, - movieHash: hash, - movieByteSize: movieByteSize, - imdbid: searchImdbId ), - }; - parms.AddRange(subtitleSearchParameters); - var result = await OpenSubtitles.SearchSubtitlesAsync(parms.ToArray(), cancellationToken).ConfigureAwait(false); - if (!(result is MethodResponseSubtitleSearch)) - { - _logger.Error("Invalid response type"); - return new List(); - } - - Predicate mediaFilter = - x => - request.ContentType == VideoContentType.Episode - ? !string.IsNullOrEmpty(x.SeriesSeason) && !string.IsNullOrEmpty(x.SeriesEpisode) && - int.Parse(x.SeriesSeason, _usCulture) == request.ParentIndexNumber && - int.Parse(x.SeriesEpisode, _usCulture) == request.IndexNumber - : !string.IsNullOrEmpty(x.IDMovieImdb) && long.Parse(x.IDMovieImdb, _usCulture) == imdbId; - - var results = ((MethodResponseSubtitleSearch)result).Results; - - // Avoid implicitly captured closure - var hasCopy = hash; - - return results.Where(x => x.SubBad == "0" && mediaFilter(x) && (!request.IsPerfectMatch || string.Equals(x.MovieHash, hash, StringComparison.OrdinalIgnoreCase))) - .OrderBy(x => (string.Equals(x.MovieHash, hash, StringComparison.OrdinalIgnoreCase) ? 0 : 1)) - .ThenBy(x => Math.Abs(long.Parse(x.MovieByteSize, _usCulture) - movieByteSize)) - .ThenByDescending(x => int.Parse(x.SubDownloadsCnt, _usCulture)) - .ThenByDescending(x => double.Parse(x.SubRating, _usCulture)) - .Select(i => new RemoteSubtitleInfo - { - Author = i.UserNickName, - Comment = i.SubAuthorComment, - CommunityRating = float.Parse(i.SubRating, _usCulture), - DownloadCount = int.Parse(i.SubDownloadsCnt, _usCulture), - Format = i.SubFormat, - ProviderName = Name, - ThreeLetterISOLanguageName = i.SubLanguageID, - - Id = i.SubFormat + "-" + i.SubLanguageID + "-" + i.IDSubtitleFile, - - Name = i.SubFileName, - DateCreated = DateTime.Parse(i.SubAddDate, _usCulture), - IsHashMatch = i.MovieHash == hasCopy - - }).Where(i => !string.Equals(i.Format, "sub", StringComparison.OrdinalIgnoreCase) && !string.Equals(i.Format, "idx", StringComparison.OrdinalIgnoreCase)); - } - - public void Dispose() - { - _config.NamedConfigurationUpdating -= _config_NamedConfigurationUpdating; - } - } -} diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs index bc62516c7..667f6b89a 100644 --- a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs +++ b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs @@ -1112,7 +1112,10 @@ namespace MediaBrowser.Server.Implementations.Persistence private string SerializeProviderIds(BaseItem item) { - var ids = item.ProviderIds.ToList(); + // Ideally we shouldn't need this IsNullOrWhiteSpace check but we're seeing some cases of bad data slip through + var ids = item.ProviderIds + .Where(i => !string.IsNullOrWhiteSpace(i.Value)) + .ToList(); if (ids.Count == 0) { @@ -4889,6 +4892,15 @@ namespace MediaBrowser.Server.Implementations.Persistence foreach (var pair in newValues) { + if (string.IsNullOrWhiteSpace(pair.Key)) + { + continue; + } + if (string.IsNullOrWhiteSpace(pair.Value)) + { + continue; + } + _saveProviderIdsCommand.GetParameter(0).Value = itemId; _saveProviderIdsCommand.GetParameter(1).Value = pair.Key; _saveProviderIdsCommand.GetParameter(2).Value = pair.Value; diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs index f8294a24d..23b6dd097 100644 --- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs +++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs @@ -96,6 +96,7 @@ using System.Net.Sockets; using System.Reflection; using System.Threading; using System.Threading.Tasks; +using Emby.Photos; using MediaBrowser.Model.IO; using MediaBrowser.Api.Playback; using MediaBrowser.Common.Implementations.Networking; @@ -1232,6 +1233,9 @@ namespace MediaBrowser.Server.Startup.Common // Include composable parts in the Providers assembly list.Add(typeof(ProviderUtils).Assembly); + // Include composable parts in the Photos assembly + list.Add(typeof(PhotoProvider).Assembly); + // Common implementations list.Add(typeof(TaskManager).Assembly); diff --git a/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj b/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj index deab10804..245231eca 100644 --- a/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj +++ b/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj @@ -85,6 +85,10 @@ {08fff49b-f175-4807-a2b5-73b0ebd9f716} Emby.Drawing + + {89ab4548-770d-41fd-a891-8daff44f452c} + Emby.Photos + {4fd51ac5-2c16-4308-a993-c3a84f3b4582} MediaBrowser.Api diff --git a/MediaBrowser.sln b/MediaBrowser.sln index 459598e85..e8ceff89b 100644 --- a/MediaBrowser.sln +++ b/MediaBrowser.sln @@ -62,6 +62,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emby.Drawing", "Emby.Drawin EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Nat", "Mono.Nat\Mono.Nat.csproj", "{D7453B88-2266-4805-B39B-2B5A2A33E1BA}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emby.Photos", "Emby.Photos\Emby.Photos.csproj", "{89AB4548-770D-41FD-A891-8DAFF44F452C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -508,6 +510,36 @@ Global {D7453B88-2266-4805-B39B-2B5A2A33E1BA}.Release|x64.Build.0 = Release|Any CPU {D7453B88-2266-4805-B39B-2B5A2A33E1BA}.Release|x86.ActiveCfg = Release|Any CPU {D7453B88-2266-4805-B39B-2B5A2A33E1BA}.Release|x86.Build.0 = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Debug|Win32.ActiveCfg = Debug|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Debug|Win32.Build.0 = Debug|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Debug|x64.ActiveCfg = Debug|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Debug|x64.Build.0 = Debug|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Debug|x86.ActiveCfg = Debug|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Debug|x86.Build.0 = Debug|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release Mono|Any CPU.ActiveCfg = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release Mono|Any CPU.Build.0 = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release Mono|Mixed Platforms.ActiveCfg = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release Mono|Mixed Platforms.Build.0 = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release Mono|Win32.ActiveCfg = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release Mono|Win32.Build.0 = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release Mono|x64.ActiveCfg = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release Mono|x64.Build.0 = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release Mono|x86.ActiveCfg = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release Mono|x86.Build.0 = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release|Any CPU.Build.0 = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release|Win32.ActiveCfg = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release|Win32.Build.0 = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release|x64.ActiveCfg = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release|x64.Build.0 = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release|x86.ActiveCfg = Release|Any CPU + {89AB4548-770D-41FD-A891-8DAFF44F452C}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE -- cgit v1.2.3