Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
HansLehnert committed Sep 2, 2024
1 parent d8f91ee commit 2f31bb1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public async Task<IEnumerable<RemoteImageInfo>> GetImages(string aid, Cancellati

if (!string.IsNullOrEmpty(aid))
{
Media media = await _aniListApi.GetAnime(aid, cancellationToken);
Media media = await _aniListApi.GetAnime(aid, cancellationToken).ConfigureAwait(false);
if (media != null)
{
if (media.GetImageUrl() != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ public async Task<MetadataResult<Person>> GetMetadata(PersonLookupInfo info, Can
{
var result = new MetadataResult<Person>();

int anilistId = int.Parse(info.GetProviderId(ProviderNames.AniList));
if (!info.TryGetProviderId(ProviderNames.AniList, out string stringId)
|| !int.TryParse(stringId, out int anilistId))
{
return result;
}

Staff staff = await _aniListApi.GetStaff(anilistId, cancellationToken).ConfigureAwait(false);

if (staff == null)
Expand Down

0 comments on commit 2f31bb1

Please sign in to comment.