updated nuget

pull/702/head
Luke Pulverenti 10 years ago
parent aac044f18f
commit c87c516ea3

@ -212,25 +212,27 @@ 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();
}
}
// No need to start if scanning the library because it will handle it
if (request.RefreshLibrary)
{
_libraryManager.ValidateMediaLibrary(new Progress<double>(), 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();
}
});
}
}
/// <summary>
@ -279,25 +281,27 @@ 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();
}
}
// No need to start if scanning the library because it will handle it
if (request.RefreshLibrary)
{
_libraryManager.ValidateMediaLibrary(new Progress<double>(), 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();
}
});
}
}
/// <summary>
@ -325,25 +329,27 @@ 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();
}
}
// No need to start if scanning the library because it will handle it
if (request.RefreshLibrary)
{
_libraryManager.ValidateMediaLibrary(new Progress<double>(), 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();
}
});
}
}
/// <summary>
@ -362,25 +368,27 @@ 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();
}
}
// No need to start if scanning the library because it will handle it
if (request.RefreshLibrary)
{
_libraryManager.ValidateMediaLibrary(new Progress<double>(), 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();
}
});
}
}
/// <summary>
@ -399,25 +407,27 @@ 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();
}
}
// No need to start if scanning the library because it will handle it
if (request.RefreshLibrary)
{
_libraryManager.ValidateMediaLibrary(new Progress<double>(), 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();
}
});
}
}
}
}

@ -60,7 +60,8 @@ namespace MediaBrowser.Controller.Sync
/// </summary>
/// <param name="path">The path.</param>
/// <param name="target">The target.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;List&lt;DeviceFileInfo&gt;&gt;.</returns>
Task<List<DeviceFileInfo>> GetFileSystemEntries(string path, SyncTarget target);
Task<List<DeviceFileInfo>> GetFileSystemEntries(string path, SyncTarget target, CancellationToken cancellationToken);
}
}

@ -62,6 +62,11 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
return ResolveVideos<Video>(parent, files, directoryService, collectionType, false);
}
if (string.Equals(collectionType, CollectionType.Photos, StringComparison.OrdinalIgnoreCase))
{
return ResolveVideos<Video>(parent, files, directoryService, collectionType, false);
}
if (string.IsNullOrEmpty(collectionType))
{
// Owned items should just use the plain video type
@ -225,6 +230,10 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
{
item = ResolveVideo<Video>(args, false);
}
else if (string.Equals(collectionType, CollectionType.Photos, StringComparison.OrdinalIgnoreCase))
{
item = ResolveVideo<Video>(args, false);
}
else if (string.IsNullOrEmpty(collectionType))
{
if (args.HasParent<Series>())
@ -358,6 +367,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
}
var supportsMultiVersion = !string.Equals(collectionType, CollectionType.HomeVideos) &&
!string.Equals(collectionType, CollectionType.Photos) &&
!string.Equals(collectionType, CollectionType.MusicVideos);
var result = ResolveVideos<T>(parent, fileSystemEntries, directoryService, collectionType, supportsMultiVersion);
@ -474,7 +484,8 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
CollectionType.Movies,
CollectionType.HomeVideos,
CollectionType.MusicVideos,
CollectionType.Movies
CollectionType.Movies,
CollectionType.Photos
};
return !validCollectionTypes.Contains(collectionType ?? string.Empty, StringComparer.OrdinalIgnoreCase);

@ -203,7 +203,7 @@ namespace MediaBrowser.Server.Implementations.Sync
foreach (var localItem in localItems)
{
var files = await GetFiles(provider, localItem, target);
var files = await GetFiles(provider, localItem, target, cancellationToken);
foreach (var file in files)
{
@ -326,12 +326,12 @@ namespace MediaBrowser.Server.Implementations.Sync
return _fileSystem.GetValidFilename(filename);
}
private async Task<List<ItemFileInfo>> GetFiles(IServerSyncProvider provider, LocalItem item, SyncTarget target)
private async Task<List<ItemFileInfo>> GetFiles(IServerSyncProvider provider, LocalItem item, SyncTarget target, CancellationToken cancellationToken)
{
var path = item.LocalPath;
path = provider.GetParentDirectoryPath(path, target);
var list = await provider.GetFileSystemEntries(path, target).ConfigureAwait(false);
var list = await provider.GetFileSystemEntries(path, target, cancellationToken).ConfigureAwait(false);
var itemFiles = new List<ItemFileInfo>();

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common.Internal</id>
<version>3.0.591</version>
<version>3.0.593</version>
<title>MediaBrowser.Common.Internal</title>
<authors>Luke</authors>
<owners>ebr,Luke,scottisafool</owners>
@ -12,7 +12,7 @@
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
<dependency id="MediaBrowser.Common" version="3.0.591" />
<dependency id="MediaBrowser.Common" version="3.0.593" />
<dependency id="NLog" version="3.2.0.0" />
<dependency id="SimpleInjector" version="2.7.0" />
</dependencies>

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common</id>
<version>3.0.591</version>
<version>3.0.593</version>
<title>MediaBrowser.Common</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Model.Signed</id>
<version>3.0.591</version>
<version>3.0.593</version>
<title>MediaBrowser.Model - Signed Edition</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>MediaBrowser.Server.Core</id>
<version>3.0.591</version>
<version>3.0.593</version>
<title>Media Browser.Server.Core</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>
@ -12,7 +12,7 @@
<description>Contains core components required to build plugins for Media Browser Server.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
<dependency id="MediaBrowser.Common" version="3.0.591" />
<dependency id="MediaBrowser.Common" version="3.0.593" />
</dependencies>
</metadata>
<files>

Loading…
Cancel
Save