Browse Source

save to xml before db

Luke Pulverenti 11 years ago
parent
commit
84a7f6acd9
1 changed files with 4 additions and 4 deletions
  1. 4 4
      MediaBrowser.Server.Implementations/Library/LibraryManager.cs

+ 4 - 4
MediaBrowser.Server.Implementations/Library/LibraryManager.cs

@@ -1288,15 +1288,15 @@ namespace MediaBrowser.Server.Implementations.Library
         /// <returns>Task.</returns>
         public async Task UpdateItem(BaseItem item, ItemUpdateType updateReason, CancellationToken cancellationToken)
         {
-            await ItemRepository.SaveItem(item, cancellationToken).ConfigureAwait(false);
-
-            UpdateItemInLibraryCache(item);
-
             if (item.LocationType == LocationType.FileSystem)
             {
                 await SaveMetadata(item, updateReason).ConfigureAwait(false);
             }
 
+            await ItemRepository.SaveItem(item, cancellationToken).ConfigureAwait(false);
+
+            UpdateItemInLibraryCache(item);
+
             if (ItemUpdated != null)
             {
                 try