mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge pull request #1350 from MediaBrowser/master
update MovieDbPersonProvider
This commit is contained in:
commit
2a3609106c
@ -18,6 +18,7 @@ using System.Net;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using CommonIO;
|
using CommonIO;
|
||||||
|
using MediaBrowser.Model.Net;
|
||||||
|
|
||||||
namespace MediaBrowser.Providers.People
|
namespace MediaBrowser.Providers.People
|
||||||
{
|
{
|
||||||
@ -125,7 +126,19 @@ namespace MediaBrowser.Providers.People
|
|||||||
|
|
||||||
if (!string.IsNullOrEmpty(tmdbId))
|
if (!string.IsNullOrEmpty(tmdbId))
|
||||||
{
|
{
|
||||||
await EnsurePersonInfo(tmdbId, cancellationToken).ConfigureAwait(false);
|
try
|
||||||
|
{
|
||||||
|
await EnsurePersonInfo(tmdbId, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
catch (HttpException ex)
|
||||||
|
{
|
||||||
|
if (ex.StatusCode.HasValue && ex.StatusCode.Value == HttpStatusCode.NotFound)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
var dataFilePath = GetPersonDataFilePath(_configurationManager.ApplicationPaths, tmdbId);
|
var dataFilePath = GetPersonDataFilePath(_configurationManager.ApplicationPaths, tmdbId);
|
||||||
|
|
||||||
@ -201,7 +214,7 @@ namespace MediaBrowser.Providers.People
|
|||||||
|
|
||||||
}).ConfigureAwait(false))
|
}).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
_fileSystem.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
||||||
|
|
||||||
using (var fs = _fileSystem.GetFileStream(dataFilePath, FileMode.Create, FileAccess.Write, FileShare.Read, true))
|
using (var fs = _fileSystem.GetFileStream(dataFilePath, FileMode.Create, FileAccess.Write, FileShare.Read, true))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user