mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-12 11:15:43 +02:00
Prevent NullRef for cases when media covers have nullable urls
This commit is contained in:
parent
8c07f0d3d1
commit
a26df9e9af
@ -3,6 +3,7 @@
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using NzbDrone.Common.Cache;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Core.Configuration;
|
||||
|
||||
@ -31,6 +32,11 @@ public MediaCoverProxy(IHttpClient httpClient, IConfigFileProvider configFilePro
|
||||
|
||||
public string RegisterUrl(string url)
|
||||
{
|
||||
if (url.IsNullOrWhiteSpace())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var hash = url.SHA256Hash();
|
||||
|
||||
_cache.Set(hash, url, TimeSpan.FromHours(24));
|
||||
|
Loading…
Reference in New Issue
Block a user