Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Cazzar <[email protected]>
  • Loading branch information
LordFlashmeow and Cazzar committed Jun 12, 2024
1 parent ef7c281 commit 9df5c1b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Shoko.Server/API/v2/Modules/PlexWebhook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,19 +194,16 @@ private void Scrobble(PlexEvent data, SVR_JMMUser user)
{
if (episode == null)
{
_logger.LogInformation(
$"Failed to get anime episode from plex using key {metadata.Key}.");
_logger.LogInformation($"Failed to get anime episode from plex using key {metadata.Key}.");
return (null, anime);
}

if (episode.EpisodeTypeEnum == episodeType
&& anime.GetAnimeEpisodes().Contains(episode))
if (episode.EpisodeTypeEnum == episodeType && anime.GetAnimeEpisodes().Contains(episode))
{
return (episode, anime);
}

_logger.LogInformation(
$"Unable to work out the metadata for {metadata.Guid}.");
_logger.LogInformation($"Unable to work out the metadata for {metadata.Guid}.");

return (null, anime);
}
Expand Down Expand Up @@ -299,7 +296,7 @@ public async Task<ActionResult> SyncForUser(int id)

[Authorize]
[HttpGet("libraries")]
public ActionResult<Shoko.Models.Plex.Libraries.Directory[]> GetLibraries()
public ActionResult<Directory[]> GetLibraries()
{
var result = CallPlexHelper(h => h.GetDirectories());

Expand Down

0 comments on commit 9df5c1b

Please sign in to comment.