From ae76e1c725109bc17e0e4fbfd426dbe16d6e71e6 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 30 Nov 2015 13:16:56 -0500 Subject: [PATCH 1/4] 3.0.5781.4 --- MediaBrowser.Providers/Manager/MetadataService.cs | 2 +- SharedVersion.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Providers/Manager/MetadataService.cs b/MediaBrowser.Providers/Manager/MetadataService.cs index 6860aeff32..3ed34e5be3 100644 --- a/MediaBrowser.Providers/Manager/MetadataService.cs +++ b/MediaBrowser.Providers/Manager/MetadataService.cs @@ -145,7 +145,7 @@ namespace MediaBrowser.Providers.Manager { var id = itemOfType.GetLookupInfo(); - await FindIdentities(id, cancellationToken).ConfigureAwait(false); + //await FindIdentities(id, cancellationToken).ConfigureAwait(false); var result = await RefreshWithProviders(metadataResult, id, refreshOptions, providers, itemImageProvider, cancellationToken).ConfigureAwait(false); diff --git a/SharedVersion.cs b/SharedVersion.cs index 01e44e2ca9..83969cb188 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,4 +1,4 @@ using System.Reflection; //[assembly: AssemblyVersion("3.0.*")] -[assembly: AssemblyVersion("3.0.5781.3")] +[assembly: AssemblyVersion("3.0.5781.4")] From 1a1fbec334cb9494bfc73446a980474b75299113 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 30 Nov 2015 22:54:24 -0500 Subject: [PATCH 2/4] add error handling when resolving shortcuts --- MediaBrowser.Controller/IO/FileData.cs | 43 +++++++++++++++----------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/MediaBrowser.Controller/IO/FileData.cs b/MediaBrowser.Controller/IO/FileData.cs index e2bdb28e34..ed5acbb3dd 100644 --- a/MediaBrowser.Controller/IO/FileData.cs +++ b/MediaBrowser.Controller/IO/FileData.cs @@ -26,12 +26,12 @@ namespace MediaBrowser.Controller.IO /// if set to true [resolve shortcuts]. /// Dictionary{System.StringFileSystemInfo}. /// path - public static Dictionary GetFilteredFileSystemEntries(IDirectoryService directoryService, - string path, - IFileSystem fileSystem, - ILogger logger, - ItemResolveArgs args, - int flattenFolderDepth = 0, + public static Dictionary GetFilteredFileSystemEntries(IDirectoryService directoryService, + string path, + IFileSystem fileSystem, + ILogger logger, + ItemResolveArgs args, + int flattenFolderDepth = 0, bool resolveShortcuts = true) { if (string.IsNullOrEmpty(path)) @@ -60,22 +60,29 @@ namespace MediaBrowser.Controller.IO if (resolveShortcuts && fileSystem.IsShortcut(fullName)) { - var newPath = fileSystem.ResolveShortcut(fullName); - - if (string.IsNullOrWhiteSpace(newPath)) + try { - //invalid shortcut - could be old or target could just be unavailable - logger.Warn("Encountered invalid shortcut: " + fullName); - continue; - } + var newPath = fileSystem.ResolveShortcut(fullName); + + if (string.IsNullOrWhiteSpace(newPath)) + { + //invalid shortcut - could be old or target could just be unavailable + logger.Warn("Encountered invalid shortcut: " + fullName); + continue; + } - // Don't check if it exists here because that could return false for network shares. - var data = fileSystem.GetDirectoryInfo(newPath); + // Don't check if it exists here because that could return false for network shares. + var data = fileSystem.GetDirectoryInfo(newPath); - // add to our physical locations - args.AddAdditionalLocation(newPath); + // add to our physical locations + args.AddAdditionalLocation(newPath); - dict[newPath] = data; + dict[newPath] = data; + } + catch (Exception ex) + { + logger.ErrorException("Error resolving shortcut from {0}", ex, fullName); + } } else if (flattenFolderDepth > 0 && isDirectory) { From 3800fe9051fa3fcfc4d7032ef5f796048efb02cf Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 1 Dec 2015 22:10:04 -0500 Subject: [PATCH 3/4] fixes #1216 - Scraper (thetvdb) searches in wrong language --- MediaBrowser.Providers/TV/TvdbSeriesProvider.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Providers/TV/TvdbSeriesProvider.cs b/MediaBrowser.Providers/TV/TvdbSeriesProvider.cs index 16c0098127..5df5151caf 100644 --- a/MediaBrowser.Providers/TV/TvdbSeriesProvider.cs +++ b/MediaBrowser.Providers/TV/TvdbSeriesProvider.cs @@ -101,7 +101,7 @@ namespace MediaBrowser.Providers.TV result.Item = new Series(); result.HasMetadata = true; - FetchSeriesData(result, itemId.ProviderIds, cancellationToken); + FetchSeriesData(result, itemId.MetadataLanguage, itemId.ProviderIds, cancellationToken); await FindAnimeSeriesIndex(result.Item, itemId).ConfigureAwait(false); } @@ -140,10 +140,11 @@ namespace MediaBrowser.Providers.TV /// Fetches the series data. /// /// The result. + /// The metadata language. /// The series provider ids. /// The cancellation token. /// Task{System.Boolean}. - private void FetchSeriesData(MetadataResult result, Dictionary seriesProviderIds, CancellationToken cancellationToken) + private void FetchSeriesData(MetadataResult result, string metadataLanguage, Dictionary seriesProviderIds, CancellationToken cancellationToken) { var series = result.Item; @@ -160,7 +161,7 @@ namespace MediaBrowser.Providers.TV var seriesDataPath = GetSeriesDataPath(_config.ApplicationPaths, seriesProviderIds); - var seriesXmlFilename = series.GetPreferredMetadataLanguage().ToLower() + ".xml"; + var seriesXmlFilename = metadataLanguage.ToLower() + ".xml"; var seriesXmlPath = Path.Combine(seriesDataPath, seriesXmlFilename); var actorsXmlPath = Path.Combine(seriesDataPath, "actors.xml"); From 10f9aaaee4d811578a1dc534adec7a6c1cd5cf1c Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 1 Dec 2015 22:11:08 -0500 Subject: [PATCH 4/4] fixes #1248 - Browsing to /web/ causes error --- .../HttpServer/HttpListenerHost.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs index 1ac47016da..6ade9a8f6d 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -330,6 +330,16 @@ namespace MediaBrowser.Server.Implementations.HttpServer httpRes.RedirectToUrl("emby/" + DefaultRedirectPath); return Task.FromResult(true); } + if (string.Equals(localPath, "/web", StringComparison.OrdinalIgnoreCase)) + { + httpRes.RedirectToUrl(DefaultRedirectPath); + return Task.FromResult(true); + } + if (string.Equals(localPath, "/web/", StringComparison.OrdinalIgnoreCase)) + { + httpRes.RedirectToUrl("../" + DefaultRedirectPath); + return Task.FromResult(true); + } if (string.Equals(localPath, "/", StringComparison.OrdinalIgnoreCase)) { httpRes.RedirectToUrl(DefaultRedirectPath);