Skip to content

Commit

Permalink
Run scrobbler only for Shoko recognized files
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithmohan committed Jun 1, 2021
1 parent 05b6f46 commit fece5cf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Shokofin/Scrobbler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ private async void OnPlaybackStopped(object sender, PlaybackStopEventArgs e)
return;
}

if (!e.Item.HasProviderId("Shoko Episode"))
{
_logger.LogError("Shoko Scrobbler... Unrecognized file");
return; // Skip if file does exist in Shoko
}

if (e.Item is Episode episode && e.PlayedToCompletion)
{
var episodeId = episode.GetProviderId("Shoko Episode");
Expand Down

0 comments on commit fece5cf

Please sign in to comment.