mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 15:32:31 +01:00
parent
fc5dd8137f
commit
51e2e084af
@ -21,7 +21,15 @@ namespace NzbDrone.Core.SeriesStats
|
|||||||
{
|
{
|
||||||
DateTime nextAiring;
|
DateTime nextAiring;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
if (!DateTime.TryParse(NextAiringString, out nextAiring)) return null;
|
if (!DateTime.TryParse(NextAiringString, out nextAiring)) return null;
|
||||||
|
}
|
||||||
|
catch (ArgumentOutOfRangeException)
|
||||||
|
{
|
||||||
|
// GHI 3518: Can throw on mono (6.x?) despite being a Try*
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return nextAiring;
|
return nextAiring;
|
||||||
}
|
}
|
||||||
@ -33,7 +41,15 @@ namespace NzbDrone.Core.SeriesStats
|
|||||||
{
|
{
|
||||||
DateTime previousAiring;
|
DateTime previousAiring;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
if (!DateTime.TryParse(PreviousAiringString, out previousAiring)) return null;
|
if (!DateTime.TryParse(PreviousAiringString, out previousAiring)) return null;
|
||||||
|
}
|
||||||
|
catch (ArgumentOutOfRangeException)
|
||||||
|
{
|
||||||
|
// GHI 3518: Can throw on mono (6.x?) despite being a Try*
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return previousAiring;
|
return previousAiring;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,15 @@ namespace NzbDrone.Core.SeriesStats
|
|||||||
{
|
{
|
||||||
DateTime nextAiring;
|
DateTime nextAiring;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
if (!DateTime.TryParse(NextAiringString, out nextAiring)) return null;
|
if (!DateTime.TryParse(NextAiringString, out nextAiring)) return null;
|
||||||
|
}
|
||||||
|
catch (ArgumentOutOfRangeException)
|
||||||
|
{
|
||||||
|
// GHI 3518: Can throw on mono (6.x?) despite being a Try*
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return nextAiring;
|
return nextAiring;
|
||||||
}
|
}
|
||||||
@ -33,7 +41,15 @@ namespace NzbDrone.Core.SeriesStats
|
|||||||
{
|
{
|
||||||
DateTime previousAiring;
|
DateTime previousAiring;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
if (!DateTime.TryParse(PreviousAiringString, out previousAiring)) return null;
|
if (!DateTime.TryParse(PreviousAiringString, out previousAiring)) return null;
|
||||||
|
}
|
||||||
|
catch (ArgumentOutOfRangeException)
|
||||||
|
{
|
||||||
|
// GHI 3518: Can throw on mono (6.x?) despite being a Try*
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return previousAiring;
|
return previousAiring;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user