mirror of
https://github.com/lampame/lampac-ukraine.git
synced 2026-04-16 09:22:21 +00:00
refactor(mikai,uaflix): explicitly declare voice info variables before assignment
Changed implicit variable declarations to explicit type declarations for voiceForSeasons and tVoice variables to improve code clarity and maintain consistent typing patterns in both controllers.
This commit is contained in:
parent
f2b70fa95e
commit
6ea1a5febe
@ -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
|
||||
|
||||
@ -168,7 +168,8 @@ namespace Uaflix.Controllers
|
||||
if (s == -1)
|
||||
{
|
||||
List<int> 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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user