From 62db1579c800e0837f843d0be8f9cb581cd361f4 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 8 Jun 2015 17:32:20 -0400 Subject: [PATCH] auto-organize fix --- .../Playback/BaseStreamingService.cs | 3 +- .../FileOrganization/TvFolderOrganizer.cs | 15 +++++++--- .../Api/PackageCreator.cs | 28 +------------------ .../MediaBrowser.WebDashboard.csproj | 18 ++++++++++-- 4 files changed, 28 insertions(+), 36 deletions(-) diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 99aa12467..71ef689a7 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -8,12 +8,12 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Controller.MediaEncoding; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Dlna; -using MediaBrowser.Model.Drawing; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.IO; using MediaBrowser.Model.MediaInfo; +using MediaBrowser.Model.Serialization; using System; using System.Collections.Generic; using System.Diagnostics; @@ -23,7 +23,6 @@ using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; -using MediaBrowser.Model.Serialization; namespace MediaBrowser.Api.Playback { diff --git a/MediaBrowser.Server.Implementations/FileOrganization/TvFolderOrganizer.cs b/MediaBrowser.Server.Implementations/FileOrganization/TvFolderOrganizer.cs index e3c8e6d25..557b531b4 100644 --- a/MediaBrowser.Server.Implementations/FileOrganization/TvFolderOrganizer.cs +++ b/MediaBrowser.Server.Implementations/FileOrganization/TvFolderOrganizer.cs @@ -59,11 +59,18 @@ namespace MediaBrowser.Server.Implementations.FileOrganization var organizer = new EpisodeFileOrganizer(_organizationService, _config, _fileSystem, _logger, _libraryManager, _libraryMonitor, _providerManager); - var result = await organizer.OrganizeEpisodeFile(file.FullName, options, options.OverwriteExistingEpisodes, cancellationToken).ConfigureAwait(false); - - if (result.Status == FileSortingStatus.Success) + try { - scanLibrary = true; + var result = await organizer.OrganizeEpisodeFile(file.FullName, options, options.OverwriteExistingEpisodes, cancellationToken).ConfigureAwait(false); + + if (result.Status == FileSortingStatus.Success) + { + scanLibrary = true; + } + } + catch (Exception ex) + { + _logger.ErrorException("Error organizing episode {0}", ex, file); } numComplete++; diff --git a/MediaBrowser.WebDashboard/Api/PackageCreator.cs b/MediaBrowser.WebDashboard/Api/PackageCreator.cs index b52845e99..cc4916bda 100644 --- a/MediaBrowser.WebDashboard/Api/PackageCreator.cs +++ b/MediaBrowser.WebDashboard/Api/PackageCreator.cs @@ -458,24 +458,14 @@ namespace MediaBrowser.WebDashboard.Api "thirdparty/apiclient/md5.js", "thirdparty/apiclient/sha1.js", "thirdparty/apiclient/store.js", - "thirdparty/apiclient/network.js", "thirdparty/apiclient/device.js", "thirdparty/apiclient/credentials.js", "thirdparty/apiclient/ajax.js", "thirdparty/apiclient/events.js", "thirdparty/apiclient/deferred.js", - "thirdparty/apiclient/apiclient.js", - "thirdparty/apiclient/connectservice.js" + "thirdparty/apiclient/apiclient.js" }.ToList(); - if (string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase)) - { - apiClientFiles.Add("thirdparty/cordova/serverdiscovery.js"); - } - else - { - apiClientFiles.Add("thirdparty/apiclient/serverdiscovery.js"); - } apiClientFiles.Add("thirdparty/apiclient/connectionmanager.js"); foreach (var file in apiClientFiles) @@ -559,30 +549,14 @@ namespace MediaBrowser.WebDashboard.Api "taskbutton.js", "alphapicker.js", "addpluginpage.js", - "autoorganizetv.js", - "autoorganizelog.js", - "dashboardgeneral.js", "dashboardpage.js", "directorybrowser.js", "editcollectionitems.js", "edititemmetadata.js", - "playbackconfiguration.js", - "cinemamodeconfiguration.js", "indexpage.js", - "itembynamedetailpage.js", "itemdetailpage.js", - "librarypathmapping.js", - "livetvrecording.js", - "livetvtimer.js", - "livetvseriestimer.js", - "medialibrarypage.js", - "metadataconfigurationpage.js", - "metadataimagespage.js", - "metadatasubtitles.js", "moviecollections.js", "notifications.js", - "playlists.js", - "playlistedit.js", "plugincatalogpage.js", "pluginspage.js", "remotecontrol.js", diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index 749341eba..55f8e8c34 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -126,12 +126,27 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + PreserveNewest + + PreserveNewest + PreserveNewest + + PreserveNewest + + + PreserveNewest + PreserveNewest @@ -1013,9 +1028,6 @@ PreserveNewest - - PreserveNewest - PreserveNewest