Adjust file read async functions

This commit is contained in:
1hitsong 2022-09-22 09:00:07 -04:00
parent a50bdb4770
commit 97409adb45
2 changed files with 2 additions and 2 deletions

View file

@ -61,7 +61,7 @@ public class LrcLyricProvider : ILyricProvider
}
var fileMetaData = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
string lrcFileContent = await Task.FromResult(File.ReadAllText(lyricFilePath)).ConfigureAwait(false);
string lrcFileContent = await File.ReadAllTextAsync(lyricFilePath).ConfigureAwait(false);
Song lyricData;

View file

@ -39,7 +39,7 @@ public class TxtLyricProvider : ILyricProvider
return null;
}
string[] lyricTextLines = await Task.FromResult(File.ReadAllLines(lyricFilePath)).ConfigureAwait(false);
string[] lyricTextLines = await File.ReadAllLinesAsync(lyricFilePath).ConfigureAwait(false);
if (lyricTextLines.Length == 0)
{