remove dead interface objects

This commit is contained in:
Luke Pulverenti
2016-10-17 12:35:29 -04:00
parent ba613d5671
commit bba0c564c7
33 changed files with 101 additions and 301 deletions

View File

@@ -2838,7 +2838,7 @@ namespace MediaBrowser.Server.Implementations.Library
private bool ValidateNetworkPath(string path)
{
if (Environment.OSVersion.Platform == PlatformID.Win32NT || !path.StartsWith("\\\\", StringComparison.OrdinalIgnoreCase))
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
{
return Directory.Exists(path);
}

View File

@@ -1854,23 +1854,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
ParentIndexNumber = program.SeasonNumber.Value,
IndexNumber = program.EpisodeNumber.Value,
AncestorIds = seriesIds,
ExcludeLocationTypes = new[] { LocationType.Virtual }
});
if (result.TotalRecordCount > 0)
{
return true;
}
}
if (!string.IsNullOrWhiteSpace(program.EpisodeTitle))
{
var result = _libraryManager.GetItemsResult(new InternalItemsQuery
{
IncludeItemTypes = new[] { typeof(Episode).Name },
Name = program.EpisodeTitle,
AncestorIds = seriesIds,
ExcludeLocationTypes = new[] { LocationType.Virtual }
IsVirtualItem = false
});
if (result.TotalRecordCount > 0)

View File

@@ -72,7 +72,11 @@ namespace MediaBrowser.Server.Implementations.LiveTv
{
dto.ProgramInfo = _dtoService.GetBaseItemDto(program, new DtoOptions());
dto.ProgramInfo.TimerId = dto.Id;
if (info.Status != RecordingStatus.Cancelled && info.Status != RecordingStatus.Error)
{
dto.ProgramInfo.TimerId = dto.Id;
dto.ProgramInfo.Status = info.Status.ToString();
}
dto.ProgramInfo.SeriesTimerId = dto.SeriesTimerId;
}

View File

@@ -144,7 +144,7 @@ namespace MediaBrowser.Server.Implementations.Photos
return ItemUpdateType.None;
}
await ProviderManager.SaveImage(item, outputPath, "image/png", imageType, null, Guid.NewGuid().ToString("N"), cancellationToken).ConfigureAwait(false);
await ProviderManager.SaveImage(item, outputPath, "image/png", imageType, null, false, cancellationToken).ConfigureAwait(false);
return ItemUpdateType.ImageUpdate;
}

View File

@@ -22,9 +22,7 @@ namespace MediaBrowser.Server.Implementations.Sorting
private float GetValue(BaseItem x)
{
var hasCriticRating = x as IHasCriticRating;
return hasCriticRating == null ? 0 : hasCriticRating.CriticRating ?? 0;
return x.CriticRating ?? 0;
}
/// <summary>