diff --git a/Mikai/Controller.cs b/Mikai/Controller.cs index 5ec5ddf..90fdaef 100644 --- a/Mikai/Controller.cs +++ b/Mikai/Controller.cs @@ -57,7 +57,8 @@ namespace Mikai.Controllers if (isSerial) { - bool restrictByVoice = !string.IsNullOrEmpty(t) && voices.TryGetValue(t, out var voiceForSeasons); + MikaiVoiceInfo voiceForSeasons = null; + bool restrictByVoice = !string.IsNullOrEmpty(t) && voices.TryGetValue(t, out voiceForSeasons); var seasonNumbers = restrictByVoice ? GetSeasonSet(voiceForSeasons).OrderBy(n => n).ToList() : voices.Values diff --git a/Uaflix/Controller.cs b/Uaflix/Controller.cs index bf70816..4ca2558 100644 --- a/Uaflix/Controller.cs +++ b/Uaflix/Controller.cs @@ -168,7 +168,8 @@ namespace Uaflix.Controllers if (s == -1) { List allSeasons; - bool restrictByVoice = !string.IsNullOrEmpty(t) && structure.Voices.TryGetValue(t, out var tVoice) && IsAshdiVoice(tVoice); + VoiceInfo tVoice = null; + bool restrictByVoice = !string.IsNullOrEmpty(t) && structure.Voices.TryGetValue(t, out tVoice) && IsAshdiVoice(tVoice); if (restrictByVoice) { allSeasons = GetSeasonSet(tVoice).OrderBy(sn => sn).ToList();