mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Fix duplicated exception when the item was deleted
This commit is contained in:
parent
a01ce5c11c
commit
f0e6ee5835
@ -19,8 +19,6 @@
|
||||
using System.Threading.Tasks;
|
||||
using Kyoo.Abstractions.Models;
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace Kyoo.Abstractions.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -140,7 +140,7 @@ namespace Kyoo.Core.Controllers
|
||||
{
|
||||
lock (_downloading)
|
||||
{
|
||||
if (File.Exists(posterPath) || _downloading.ContainsKey(posterPath))
|
||||
if (_downloading.ContainsKey(posterPath))
|
||||
{
|
||||
duplicated = true;
|
||||
sync = _downloading.GetValueOrDefault(posterPath);
|
||||
@ -154,7 +154,8 @@ namespace Kyoo.Core.Controllers
|
||||
if (duplicated)
|
||||
{
|
||||
object? dup = sync != null ? await sync.Task : null;
|
||||
throw new DuplicatedItemException(dup);
|
||||
if (dup != null)
|
||||
throw new DuplicatedItemException(dup);
|
||||
}
|
||||
|
||||
await _DownloadImage(
|
||||
|
Loading…
x
Reference in New Issue
Block a user