From 47fae7e93369d54eed7f841a3e1d4c3aaba5ea13 Mon Sep 17 00:00:00 2001 From: Elwador <75888166+Elwador@users.noreply.github.com> Date: Sun, 25 Aug 2024 22:08:34 +0200 Subject: [PATCH] Fix - Some CC didn't get downloaded https://github.com/Crunchy-DL/Crunchy-Downloader/issues/97 --- CRD/Downloader/Crunchyroll/CrunchyrollManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CRD/Downloader/Crunchyroll/CrunchyrollManager.cs b/CRD/Downloader/Crunchyroll/CrunchyrollManager.cs index 981dd5a..37cc71f 100644 --- a/CRD/Downloader/Crunchyroll/CrunchyrollManager.cs +++ b/CRD/Downloader/Crunchyroll/CrunchyrollManager.cs @@ -1417,9 +1417,9 @@ public class CrunchyrollManager{ private static async Task DownloadSubtitles(CrDownloadOptions options, PlaybackData pbData, string audDub, string fileName, List files, string fileDir, CrunchyEpMeta data, bool needsDelay, DownloadedMedia videoDownloadMedia){ - if (pbData.Meta != null && pbData.Meta.Subtitles != null && pbData.Meta.Subtitles.Count > 0){ - List subsData = pbData.Meta.Subtitles.Values.ToList(); - List capsData = pbData.Meta.Captions?.Values.ToList() ?? new List(); + if (pbData.Meta != null && (pbData.Meta.Subtitles is{ Count: > 0 } || pbData.Meta.Captions is{ Count: > 0 })){ + List subsData = pbData.Meta.Subtitles?.Values.ToList() ?? []; + List capsData = pbData.Meta.Captions?.Values.ToList() ?? []; var subsDataMapped = subsData.Select(s => { var subLang = Languages.FixAndFindCrLc((s.Locale ?? Locale.DefaulT).GetEnumMemberValue()); return new{