Skip to content

Commit

Permalink
fix: check if plugin is enabled for item before looking up id
Browse files Browse the repository at this point in the history
  • Loading branch information
revam committed Aug 19, 2024
1 parent b7ca959 commit 6e4fe63
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Shokofin/Sync/UserDataSyncManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public async void OnUserDataSaved(object? sender, UserDataSaveEventArgs e)
if (!(
(e.Item is Movie || e.Item is Episode) &&
TryGetUserConfiguration(e.UserId, out var userConfig) &&
Lookup.IsEnabledForItem(e.Item) &&
Lookup.TryGetFileIdFor(e.Item, out var fileId) &&
Lookup.TryGetEpisodeIdFor(e.Item, out var episodeId) &&
(userConfig!.SyncRestrictedVideos || e.Item.CustomRating != "XXX")
Expand Down

0 comments on commit 6e4fe63

Please sign in to comment.