From f7c2fbc6158b8fc703940aafe612be6c67bdd474 Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Sun, 17 Nov 2024 17:29:24 +0100 Subject: [PATCH] fix: only check if null in while run statement --- Shoko.Server/API/v3/Controllers/TmdbController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shoko.Server/API/v3/Controllers/TmdbController.cs b/Shoko.Server/API/v3/Controllers/TmdbController.cs index 54bbf72a4..60fc6e1ca 100644 --- a/Shoko.Server/API/v3/Controllers/TmdbController.cs +++ b/Shoko.Server/API/v3/Controllers/TmdbController.cs @@ -2546,7 +2546,7 @@ IFormFile file var currentHeader = ""; var movieIdXrefs = new List<(int anidbAnime, int anidbEpisode, int tmdbMovie, bool isAutomatic)>(); var episodeIdXrefs = new List<(int anidbAnime, int anidbEpisode, int tmdbShow, int tmdbEpisode, MatchRating rating)>(); - while (!string.IsNullOrEmpty(line = stream.ReadLine())) + while ((line = stream.ReadLine()) is not null) { lineNumber++; if (line.Length == 0 || line[0] == '#')