pull/702/head
Bond_009 6 years ago
parent 0c1b9d3bff
commit bf01918659

@ -1,7 +1,5 @@
using System; using System;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using Microsoft.Extensions.Logging;
using MediaBrowser.Model.System;
namespace IsoMounter namespace IsoMounter
{ {

@ -1,5 +1,4 @@
using MediaBrowser.Common; using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Extensions; using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Progress; using MediaBrowser.Common.Progress;
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Configuration;
@ -18,9 +17,7 @@ using Microsoft.Extensions.Logging;
using MediaBrowser.Model.Querying; using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Serialization; using MediaBrowser.Model.Serialization;
using System; using System;
using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -29,7 +26,6 @@ using MediaBrowser.Common.Events;
using MediaBrowser.Common.Security; using MediaBrowser.Common.Security;
using MediaBrowser.Controller.Entities.Movies; using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.IO;
using MediaBrowser.Model.Events; using MediaBrowser.Model.Events;
using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.Globalization; using MediaBrowser.Model.Globalization;

@ -17,7 +17,6 @@ using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using MediaBrowser.Api.UserLibrary; using MediaBrowser.Api.UserLibrary;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using MediaBrowser.Controller.IO;
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Model.Services; using MediaBrowser.Model.Services;

@ -6,9 +6,9 @@ using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Session; using MediaBrowser.Model.Session;
using System; using System;
using System.Globalization; using System.Globalization;
using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using MediaBrowser.Model.Services; using MediaBrowser.Model.Services;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Api.UserLibrary namespace MediaBrowser.Api.UserLibrary
{ {
@ -381,7 +381,7 @@ namespace MediaBrowser.Api.UserLibrary
public void Post(ReportPlaybackStopped request) public void Post(ReportPlaybackStopped request)
{ {
Logger.Debug("ReportPlaybackStopped PlaySessionId: {0}", request.PlaySessionId ?? string.Empty); Logger.LogDebug("ReportPlaybackStopped PlaySessionId: {0}", request.PlaySessionId ?? string.Empty);
if (!string.IsNullOrWhiteSpace(request.PlaySessionId)) if (!string.IsNullOrWhiteSpace(request.PlaySessionId))
{ {

@ -371,6 +371,7 @@ namespace MediaBrowser.Controller.Entities
} }
catch (Exception ex) catch (Exception ex)
{ {
Logger.LogError(ex, "Error retrieving children folder");
return; return;
} }
@ -419,11 +420,7 @@ namespace MediaBrowser.Controller.Entities
foreach (var item in itemsRemoved) foreach (var item in itemsRemoved)
{ {
if (!item.IsFileProtocol) if (item.IsFileProtocol)
{
}
else
{ {
Logger.LogDebug("Removed item: " + item.Path); Logger.LogDebug("Removed item: " + item.Path);
@ -571,14 +568,9 @@ namespace MediaBrowser.Controller.Entities
await child.RefreshMetadata(refreshOptions, cancellationToken).ConfigureAwait(false); await child.RefreshMetadata(refreshOptions, cancellationToken).ConfigureAwait(false);
} }
if (recursive) if (recursive && child is Folder folder)
{ {
var folder = child as Folder; await folder.RefreshMetadataRecursive(folder.Children.ToList(), refreshOptions, true, progress, cancellationToken);
if (folder != null)
{
await folder.RefreshMetadataRecursive(folder.Children.ToList(), refreshOptions, true, progress, cancellationToken);
}
} }
} }
} }
@ -782,7 +774,7 @@ namespace MediaBrowser.Controller.Entities
{ {
if (query.IncludeItemTypes.Length == 1 && string.Equals(query.IncludeItemTypes[0], typeof(BoxSet).Name, StringComparison.OrdinalIgnoreCase)) if (query.IncludeItemTypes.Length == 1 && string.Equals(query.IncludeItemTypes[0], typeof(BoxSet).Name, StringComparison.OrdinalIgnoreCase))
{ {
Logger.Debug("Query requires post-filtering due to BoxSet query"); Logger.LogDebug("Query requires post-filtering due to BoxSet query");
return true; return true;
} }
@ -803,44 +795,44 @@ namespace MediaBrowser.Controller.Entities
// Filter by Video3DFormat // Filter by Video3DFormat
if (query.Is3D.HasValue) if (query.Is3D.HasValue)
{ {
Logger.Debug("Query requires post-filtering due to Is3D"); Logger.LogDebug("Query requires post-filtering due to Is3D");
return true; return true;
} }
if (query.HasOfficialRating.HasValue) if (query.HasOfficialRating.HasValue)
{ {
Logger.Debug("Query requires post-filtering due to HasOfficialRating"); Logger.LogDebug("Query requires post-filtering due to HasOfficialRating");
return true; return true;
} }
if (query.IsPlaceHolder.HasValue) if (query.IsPlaceHolder.HasValue)
{ {
Logger.Debug("Query requires post-filtering due to IsPlaceHolder"); Logger.LogDebug("Query requires post-filtering due to IsPlaceHolder");
return true; return true;
} }
if (query.HasSpecialFeature.HasValue) if (query.HasSpecialFeature.HasValue)
{ {
Logger.Debug("Query requires post-filtering due to HasSpecialFeature"); Logger.LogDebug("Query requires post-filtering due to HasSpecialFeature");
return true; return true;
} }
if (query.HasSubtitles.HasValue) if (query.HasSubtitles.HasValue)
{ {
Logger.Debug("Query requires post-filtering due to HasSubtitles"); Logger.LogDebug("Query requires post-filtering due to HasSubtitles");
return true; return true;
} }
if (query.HasTrailer.HasValue) if (query.HasTrailer.HasValue)
{ {
Logger.Debug("Query requires post-filtering due to HasTrailer"); Logger.LogDebug("Query requires post-filtering due to HasTrailer");
return true; return true;
} }
// Filter by VideoType // Filter by VideoType
if (query.VideoTypes.Length > 0) if (query.VideoTypes.Length > 0)
{ {
Logger.Debug("Query requires post-filtering due to VideoTypes"); Logger.LogDebug("Query requires post-filtering due to VideoTypes");
return true; return true;
} }
@ -852,19 +844,19 @@ namespace MediaBrowser.Controller.Entities
if (!string.IsNullOrEmpty(query.AdjacentTo)) if (!string.IsNullOrEmpty(query.AdjacentTo))
{ {
Logger.Debug("Query requires post-filtering due to AdjacentTo"); Logger.LogDebug("Query requires post-filtering due to AdjacentTo");
return true; return true;
} }
if (query.SeriesStatuses.Length > 0) if (query.SeriesStatuses.Length > 0)
{ {
Logger.Debug("Query requires post-filtering due to SeriesStatuses"); Logger.LogDebug("Query requires post-filtering due to SeriesStatuses");
return true; return true;
} }
if (query.AiredDuringSeason.HasValue) if (query.AiredDuringSeason.HasValue)
{ {
Logger.Debug("Query requires post-filtering due to AiredDuringSeason"); Logger.LogDebug("Query requires post-filtering due to AiredDuringSeason");
return true; return true;
} }
@ -872,7 +864,7 @@ namespace MediaBrowser.Controller.Entities
{ {
if (query.IncludeItemTypes.Length == 1 && query.IncludeItemTypes.Contains(typeof(Series).Name)) if (query.IncludeItemTypes.Length == 1 && query.IncludeItemTypes.Contains(typeof(Series).Name))
{ {
Logger.Debug("Query requires post-filtering due to IsPlayed"); Logger.LogDebug("Query requires post-filtering due to IsPlayed");
return true; return true;
} }
} }
@ -1594,7 +1586,7 @@ namespace MediaBrowser.Controller.Entities
} }
catch (IOException ex) catch (IOException ex)
{ {
Logger.LogError("Error resolving shortcut {0}", ex, i.FullName); Logger.LogError(ex, "Error resolving shortcut {0}", i.FullName);
return null; return null;
} }
}) })

Loading…
Cancel
Save