mirror of
https://github.com/fergalmoran/Readarr.git
synced 2025-12-22 09:29:59 +00:00
Prevent NullRef for cases when media covers have nullable urls
(cherry picked from commit a26df9e9afa8d925c2ad62c126d4edebec7e4e54) Closes #2981
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using NzbDrone.Common.Cache;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Core.Configuration;
|
||||
|
||||
@@ -30,6 +31,11 @@ namespace NzbDrone.Core.MediaCover
|
||||
|
||||
public string RegisterUrl(string url)
|
||||
{
|
||||
if (url.IsNullOrWhiteSpace())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var hash = url.SHA256Hash();
|
||||
|
||||
_cache.Set(hash, url, TimeSpan.FromHours(24));
|
||||
|
||||
Reference in New Issue
Block a user