update download error handling

This commit is contained in:
Luke Pulverenti
2017-08-11 17:55:48 -04:00
parent a7db7cd40c
commit b7867214ef
36 changed files with 23 additions and 2469 deletions

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
namespace MediaBrowser.Controller.Entities
{
@@ -9,6 +8,6 @@ namespace MediaBrowser.Controller.Entities
/// Gets or sets the special feature ids.
/// </summary>
/// <value>The special feature ids.</value>
List<Guid> SpecialFeatureIds { get; set; }
Guid[] SpecialFeatureIds { get; set; }
}
}

View File

@@ -19,11 +19,11 @@ namespace MediaBrowser.Controller.Entities.Movies
/// </summary>
public class Movie : Video, IHasSpecialFeatures, IHasTrailers, IHasLookupInfo<MovieInfo>, ISupportsBoxSetGrouping
{
public List<Guid> SpecialFeatureIds { get; set; }
public Guid[] SpecialFeatureIds { get; set; }
public Movie()
{
SpecialFeatureIds = new List<Guid>();
SpecialFeatureIds = EmptyGuidArray;
RemoteTrailers = EmptyMediaUrlArray;
LocalTrailerIds = EmptyGuidArray;
RemoteTrailerIds = EmptyGuidArray;
@@ -77,7 +77,7 @@ namespace MediaBrowser.Controller.Entities.Movies
private async Task<bool> RefreshSpecialFeatures(MetadataRefreshOptions options, List<FileSystemMetadata> fileSystemChildren, CancellationToken cancellationToken)
{
var newItems = LibraryManager.FindExtras(this, fileSystemChildren, options.DirectoryService).ToList();
var newItemIds = newItems.Select(i => i.Id).ToList();
var newItemIds = newItems.Select(i => i.Id).ToArray();
var itemsChanged = !SpecialFeatureIds.SequenceEqual(newItemIds);

View File

@@ -1387,8 +1387,8 @@ namespace MediaBrowser.Controller.Entities
if (movie != null)
{
var ok = filterValue
? movie.SpecialFeatureIds.Count > 0
: movie.SpecialFeatureIds.Count == 0;
? movie.SpecialFeatureIds.Length > 0
: movie.SpecialFeatureIds.Length == 0;
if (!ok)
{