This commit is contained in:
Luke Pulverenti
2014-11-04 22:41:14 -05:00
parent 4a04483445
commit ccb4e58519
3 changed files with 17 additions and 10 deletions

View File

@@ -710,7 +710,7 @@ namespace MediaBrowser.Providers.Manager
// Give it a dummy path just so that it looks like a file system item
var dummy = new TItemType
{
Path = "C:\\",
Path = BaseItem.GetInternalMetadataPathForId(Guid.NewGuid()),
// Dummy this up to fool the local trailer check
Parent = new Folder()
@@ -737,13 +737,20 @@ namespace MediaBrowser.Providers.Manager
foreach (var provider in providers)
{
var results = await GetSearchResults(provider, searchInfo.SearchInfo, cancellationToken).ConfigureAwait(false);
var list = results.ToList();
if (list.Count > 0)
try
{
return list.Take(10);
var results = await GetSearchResults(provider, searchInfo.SearchInfo, cancellationToken).ConfigureAwait(false);
var list = results.ToList();
if (list.Count > 0)
{
return list.Take(10);
}
}
catch (Exception ex)
{
// Logged at lower levels
}
}