mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 11:34:57 +02:00
Restore offline functions
This commit is contained in:
parent
d82eecc3fa
commit
73dcf0f2e8
1 changed files with 18 additions and 5 deletions
|
@ -808,9 +808,15 @@ namespace MediaBrowser.Controller.Entities
|
|||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
var child = currentTuple.Item1;
|
||||
|
||||
try
|
||||
{
|
||||
//refresh it
|
||||
await child.RefreshMetadata(cancellationToken, forceSave: currentTuple.Item2, forceRefresh: forceRefreshMetadata, resetResolveArgs: false).ConfigureAwait(false);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
Logger.ErrorException("Error refreshing {0}", ex, child.Path ?? child.Name);
|
||||
}
|
||||
|
||||
// Refresh children if a folder and the item changed or recursive is set to true
|
||||
var refreshChildren = child.IsFolder && (currentTuple.Item2 || (recursive.HasValue && recursive.Value));
|
||||
|
@ -845,9 +851,16 @@ namespace MediaBrowser.Controller.Entities
|
|||
|
||||
await ((Folder)child).ValidateChildren(innerProgress, cancellationToken, recursive, forceRefreshMetadata).ConfigureAwait(false);
|
||||
|
||||
try
|
||||
{
|
||||
// Some folder providers are unable to refresh until children have been refreshed.
|
||||
await child.RefreshMetadata(cancellationToken, resetResolveArgs: false).ConfigureAwait(false);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
Logger.ErrorException("Error refreshing {0}", ex, child.Path ?? child.Name);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lock (percentages)
|
||||
|
|
Loading…
Reference in a new issue