Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/jellyfin/commit/9eaad18c2c2145a6deccfd51d5fc8532f65d2bfc You should set ROOT_URL correctly, otherwise the web may not work correctly.

fix: don't allow exceptions to propagate from Refresh progress event handlers ()

pull/9243/head
Claus Vium 2 years ago committed by GitHub
parent 9e155eacea
commit 9eaad18c2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -910,19 +910,34 @@ namespace MediaBrowser.Providers.Manager
/// <inheritdoc/>
public void OnRefreshStart(BaseItem item)
{
_logger.LogDebug("OnRefreshStart {Item}", item.Id.ToString("N", CultureInfo.InvariantCulture));
_logger.LogDebug("OnRefreshStart {Item:N}", item.Id);
_activeRefreshes[item.Id] = 0;
RefreshStarted?.Invoke(this, new GenericEventArgs<BaseItem>(item));
try
{
RefreshStarted?.Invoke(this, new GenericEventArgs<BaseItem>(item));
}
catch (Exception ex)
{
// EventHandlers should never propagate exceptions, but we have little control over plugins...
_logger.LogError(ex, "Invoking {RefreshEvent} event handlers failed", nameof(RefreshStarted));
}
}
/// <inheritdoc/>
public void OnRefreshComplete(BaseItem item)
{
_logger.LogDebug("OnRefreshComplete {Item}", item.Id.ToString("N", CultureInfo.InvariantCulture));
_activeRefreshes.Remove(item.Id, out _);
_logger.LogDebug("OnRefreshComplete {Item:N}", item.Id);
_activeRefreshes.TryRemove(item.Id, out _);
RefreshCompleted?.Invoke(this, new GenericEventArgs<BaseItem>(item));
try
{
RefreshCompleted?.Invoke(this, new GenericEventArgs<BaseItem>(item));
}
catch (Exception ex)
{
// EventHandlers should never propagate exceptions, but we have little control over plugins...
_logger.LogError(ex, "Invoking {RefreshEvent} event handlers failed", nameof(RefreshCompleted));
}
}
/// <inheritdoc/>
@ -940,12 +955,12 @@ namespace MediaBrowser.Providers.Manager
public void OnRefreshProgress(BaseItem item, double progress)
{
var id = item.Id;
_logger.LogDebug("OnRefreshProgress {Id} {Progress}", id.ToString("N", CultureInfo.InvariantCulture), progress);
_logger.LogDebug("OnRefreshProgress {Id:N} {Progress}", id, progress);
// TODO: Need to hunt down the conditions for this happening
_activeRefreshes.AddOrUpdate(
id,
(_) => throw new InvalidOperationException(
_ => throw new InvalidOperationException(
string.Format(
CultureInfo.InvariantCulture,
"Cannot update refresh progress of item '{0}' ({1}) because a refresh for this item is not running",
@ -953,7 +968,15 @@ namespace MediaBrowser.Providers.Manager
item.Id.ToString("N", CultureInfo.InvariantCulture))),
(_, _) => progress);
RefreshProgress?.Invoke(this, new GenericEventArgs<Tuple<BaseItem, double>>(new Tuple<BaseItem, double>(item, progress)));
try
{
RefreshProgress?.Invoke(this, new GenericEventArgs<Tuple<BaseItem, double>>(new Tuple<BaseItem, double>(item, progress)));
}
catch (Exception ex)
{
// EventHandlers should never propagate exceptions, but we have little control over plugins...
_logger.LogError(ex, "Invoking {RefreshEvent} event handlers failed", nameof(RefreshProgress));
}
}
/// <inheritdoc/>

Loading…
Cancel
Save