Skip to content

Commit

Permalink
Prevent a possible runtime mistake
Browse files Browse the repository at this point in the history
Technically, the instance is already validated by intros, but if they get skipped for some reason, the variable might lose its confidence. Automated code correction does things like that a lot.
  • Loading branch information
AbandonedCart committed Apr 20, 2024
1 parent 489e390 commit 10ec9ef
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions ConfusedPolarBear.Plugin.IntroSkipper/Entrypoint.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Controller.Entities.TV;
Expand Down
3 changes: 1 addition & 2 deletions ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using MediaBrowser.Common.Plugins;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Entities;
Expand Down Expand Up @@ -215,7 +214,7 @@ public void SaveTimestamps()
// Serialize credits
introList.Clear();

foreach (var intro in Instance.Credits)
foreach (var intro in Instance!.Credits)
{
introList.Add(intro.Value);
}
Expand Down

0 comments on commit 10ec9ef

Please sign in to comment.