From f3159f3feff6a0ef11edb50cfc456f8c43d26d79 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 2 Mar 2015 13:48:21 -0500 Subject: update ProcessManager --- .../Library/Resolvers/TV/SeriesResolver.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library/Resolvers') diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs index 7371ca5a9c..3551b71b7f 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs +++ b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs @@ -1,19 +1,18 @@ -using System.Collections.Generic; -using System.Linq; -using MediaBrowser.Common.IO; +using MediaBrowser.Common.IO; using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Resolvers; using MediaBrowser.Model.Entities; -using System; -using System.IO; using MediaBrowser.Model.Logging; using MediaBrowser.Naming.Common; using MediaBrowser.Naming.IO; using MediaBrowser.Naming.TV; using MediaBrowser.Server.Implementations.Logging; -using EpisodeInfo = MediaBrowser.Controller.Providers.EpisodeInfo; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV { -- cgit v1.2.3 From 639090ecf30581f3aedcc20ad32bb2707d721ca5 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 8 Mar 2015 12:50:14 -0400 Subject: fixes #910: Feature Request: Support for additional Image Formats --- MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Server.Implementations/Library/Resolvers') diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs index 02960ea7ea..d1cf7d6682 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs +++ b/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs @@ -30,7 +30,8 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers return null; } - protected static string[] ImageExtensions = { ".tiff", ".jpeg", ".jpg", ".png", ".aiff" }; + // Some common file name extensions for RAW picture files include: .cr2, .crw, .dng, .nef, .orf, .rw2, .pef, .arw, .sr2, .srf, and .tif. + protected static string[] ImageExtensions = { ".tiff", ".jpeg", ".jpg", ".png", ".aiff", ".cr2", ".crw", "dng", ".nef", ".orf", ".pef", ".arw" }; private static readonly string[] IgnoreFiles = { -- cgit v1.2.3 From 5d9ab74e75a88b0d3310ba518675a767bc6730b6 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 8 Mar 2015 13:34:02 -0400 Subject: set context with sync services --- MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs | 2 +- .../Localization/JavaScript/javascript.json | 2 ++ MediaBrowser.Server.Implementations/Localization/Server/server.json | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library/Resolvers') diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs index d1cf7d6682..b714e968b5 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs +++ b/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs @@ -31,7 +31,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers } // Some common file name extensions for RAW picture files include: .cr2, .crw, .dng, .nef, .orf, .rw2, .pef, .arw, .sr2, .srf, and .tif. - protected static string[] ImageExtensions = { ".tiff", ".jpeg", ".jpg", ".png", ".aiff", ".cr2", ".crw", "dng", ".nef", ".orf", ".pef", ".arw" }; + protected static string[] ImageExtensions = { ".tiff", ".jpeg", ".jpg", ".png", ".aiff", ".cr2", ".crw", ".dng", ".nef", ".orf", ".pef", ".arw", ".webp" }; private static readonly string[] IgnoreFiles = { diff --git a/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json b/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json index fd5ff94242..ed25d75eba 100644 --- a/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json +++ b/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json @@ -87,6 +87,8 @@ "HeaderWelcomeToMediaBrowserWebClient": "Welcome to the Media Browser Web Client", "ButtonTakeTheTour": "Take the tour", "HeaderWelcomeBack": "Welcome back!", + "TitleSync": "Sync", + "TitlePlugins": "Plugins", "ButtonTakeTheTourToSeeWhatsNew": "Take the tour to see what's new", "MessageNoSyncJobsFound": "No sync jobs found. Create sync jobs using the Sync buttons found throughout the web interface.", "HeaderLibraryAccess": "Library Access", diff --git a/MediaBrowser.Server.Implementations/Localization/Server/server.json b/MediaBrowser.Server.Implementations/Localization/Server/server.json index 711c141b88..d6fe5bb974 100644 --- a/MediaBrowser.Server.Implementations/Localization/Server/server.json +++ b/MediaBrowser.Server.Implementations/Localization/Server/server.json @@ -226,7 +226,7 @@ "ScheduledTasksTitle": "Scheduled Tasks", "TabMyPlugins": "My Plugins", "TabCatalog": "Catalog", - "PluginsTitle": "Plugins", + "TitlePlugins": "Plugins", "HeaderAutomaticUpdates": "Automatic Updates", "HeaderNowPlaying": "Now Playing", "HeaderLatestAlbums": "Latest Albums", -- cgit v1.2.3 From c87c516ea32b8c9bdd01f76c453b65bf24f9ce86 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 18 Mar 2015 23:47:21 -0400 Subject: updated nuget --- .../Library/LibraryStructureService.cs | 150 +++++++++++---------- .../Sync/IServerSyncProvider.cs | 3 +- .../Library/Resolvers/Movies/MovieResolver.cs | 13 +- .../Sync/MediaSync.cs | 6 +- Nuget/MediaBrowser.Common.Internal.nuspec | 4 +- Nuget/MediaBrowser.Common.nuspec | 2 +- Nuget/MediaBrowser.Model.Signed.nuspec | 2 +- Nuget/MediaBrowser.Server.Core.nuspec | 4 +- 8 files changed, 103 insertions(+), 81 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library/Resolvers') diff --git a/MediaBrowser.Api/Library/LibraryStructureService.cs b/MediaBrowser.Api/Library/LibraryStructureService.cs index 27944a4ea7..f5fe921cec 100644 --- a/MediaBrowser.Api/Library/LibraryStructureService.cs +++ b/MediaBrowser.Api/Library/LibraryStructureService.cs @@ -212,24 +212,26 @@ namespace MediaBrowser.Api.Library File.Create(path); } - - // Need to add a delay here or directory watchers may still pick up the changes - var task = Task.Delay(1000); - // Have to block here to allow exceptions to bubble - Task.WaitAll(task); } finally { - // No need to start if scanning the library because it will handle it - if (!request.RefreshLibrary) + Task.Run(() => { - _libraryMonitor.Start(); - } - } - - if (request.RefreshLibrary) - { - _libraryManager.ValidateMediaLibrary(new Progress(), CancellationToken.None); + // No need to start if scanning the library because it will handle it + if (request.RefreshLibrary) + { + _libraryManager.ValidateMediaLibrary(new Progress(), CancellationToken.None); + } + else + { + // Need to add a delay here or directory watchers may still pick up the changes + var task = Task.Delay(1000); + // Have to block here to allow exceptions to bubble + Task.WaitAll(task); + + _libraryMonitor.Start(); + } + }); } } @@ -279,24 +281,26 @@ namespace MediaBrowser.Api.Library } Directory.Move(currentPath, newPath); - - // Need to add a delay here or directory watchers may still pick up the changes - var task = Task.Delay(1000); - // Have to block here to allow exceptions to bubble - Task.WaitAll(task); } finally { - // No need to start if scanning the library because it will handle it - if (!request.RefreshLibrary) + Task.Run(() => { - _libraryMonitor.Start(); - } - } - - if (request.RefreshLibrary) - { - _libraryManager.ValidateMediaLibrary(new Progress(), CancellationToken.None); + // No need to start if scanning the library because it will handle it + if (request.RefreshLibrary) + { + _libraryManager.ValidateMediaLibrary(new Progress(), CancellationToken.None); + } + else + { + // Need to add a delay here or directory watchers may still pick up the changes + var task = Task.Delay(1000); + // Have to block here to allow exceptions to bubble + Task.WaitAll(task); + + _libraryMonitor.Start(); + } + }); } } @@ -325,24 +329,26 @@ namespace MediaBrowser.Api.Library try { _fileSystem.DeleteDirectory(path, true); - - // Need to add a delay here or directory watchers may still pick up the changes - var delayTask = Task.Delay(1000); - // Have to block here to allow exceptions to bubble - Task.WaitAll(delayTask); } finally { - // No need to start if scanning the library because it will handle it - if (!request.RefreshLibrary) + Task.Run(() => { - _libraryMonitor.Start(); - } - } - - if (request.RefreshLibrary) - { - _libraryManager.ValidateMediaLibrary(new Progress(), CancellationToken.None); + // No need to start if scanning the library because it will handle it + if (request.RefreshLibrary) + { + _libraryManager.ValidateMediaLibrary(new Progress(), CancellationToken.None); + } + else + { + // Need to add a delay here or directory watchers may still pick up the changes + var task = Task.Delay(1000); + // Have to block here to allow exceptions to bubble + Task.WaitAll(task); + + _libraryMonitor.Start(); + } + }); } } @@ -362,24 +368,26 @@ namespace MediaBrowser.Api.Library try { LibraryHelpers.AddMediaPath(_fileSystem, request.Name, request.Path, _appPaths); - - // Need to add a delay here or directory watchers may still pick up the changes - var task = Task.Delay(1000); - // Have to block here to allow exceptions to bubble - Task.WaitAll(task); } finally { - // No need to start if scanning the library because it will handle it - if (!request.RefreshLibrary) + Task.Run(() => { - _libraryMonitor.Start(); - } - } - - if (request.RefreshLibrary) - { - _libraryManager.ValidateMediaLibrary(new Progress(), CancellationToken.None); + // No need to start if scanning the library because it will handle it + if (request.RefreshLibrary) + { + _libraryManager.ValidateMediaLibrary(new Progress(), CancellationToken.None); + } + else + { + // Need to add a delay here or directory watchers may still pick up the changes + var task = Task.Delay(1000); + // Have to block here to allow exceptions to bubble + Task.WaitAll(task); + + _libraryMonitor.Start(); + } + }); } } @@ -399,24 +407,26 @@ namespace MediaBrowser.Api.Library try { LibraryHelpers.RemoveMediaPath(_fileSystem, request.Name, request.Path, _appPaths); - - // Need to add a delay here or directory watchers may still pick up the changes - var task = Task.Delay(1000); - // Have to block here to allow exceptions to bubble - Task.WaitAll(task); } finally { - // No need to start if scanning the library because it will handle it - if (!request.RefreshLibrary) + Task.Run(() => { - _libraryMonitor.Start(); - } - } - - if (request.RefreshLibrary) - { - _libraryManager.ValidateMediaLibrary(new Progress(), CancellationToken.None); + // No need to start if scanning the library because it will handle it + if (request.RefreshLibrary) + { + _libraryManager.ValidateMediaLibrary(new Progress(), CancellationToken.None); + } + else + { + // Need to add a delay here or directory watchers may still pick up the changes + var task = Task.Delay(1000); + // Have to block here to allow exceptions to bubble + Task.WaitAll(task); + + _libraryMonitor.Start(); + } + }); } } } diff --git a/MediaBrowser.Controller/Sync/IServerSyncProvider.cs b/MediaBrowser.Controller/Sync/IServerSyncProvider.cs index 422349b80e..abf884e9d5 100644 --- a/MediaBrowser.Controller/Sync/IServerSyncProvider.cs +++ b/MediaBrowser.Controller/Sync/IServerSyncProvider.cs @@ -60,7 +60,8 @@ namespace MediaBrowser.Controller.Sync /// /// The path. /// The target. + /// The cancellation token. /// Task<List<DeviceFileInfo>>. - Task> GetFileSystemEntries(string path, SyncTarget target); + Task> GetFileSystemEntries(string path, SyncTarget target, CancellationToken cancellationToken); } } diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs index 95dcee98ad..71daf2b0cf 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs +++ b/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs @@ -62,6 +62,11 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies return ResolveVideos