From d6b31e01ce32c91105ac599d24f9ba16719df0fa Mon Sep 17 00:00:00 2001 From: Andrey Arekhva Date: Sun, 22 Dec 2019 15:54:47 +0300 Subject: [PATCH] Fix loading lyrics for tracks from radio --- AimpLyrics/LyricsWIndow.xaml | 2 +- AimpLyrics/LyricsWIndow.xaml.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/AimpLyrics/LyricsWIndow.xaml b/AimpLyrics/LyricsWIndow.xaml index c918332..f2ab7e8 100644 --- a/AimpLyrics/LyricsWIndow.xaml +++ b/AimpLyrics/LyricsWIndow.xaml @@ -109,7 +109,7 @@ - + diff --git a/AimpLyrics/LyricsWIndow.xaml.cs b/AimpLyrics/LyricsWIndow.xaml.cs index 6260e69..a88d9dc 100644 --- a/AimpLyrics/LyricsWIndow.xaml.cs +++ b/AimpLyrics/LyricsWIndow.xaml.cs @@ -76,6 +76,9 @@ private void ClearLyrics() private bool GetLyricsFromFile() { + if (_filePath is null || !new Uri(_filePath).IsFile) + return false; + string directory = Path.GetDirectoryName(_filePath); string filePattern = Path.GetFileNameWithoutExtension(_filePath) + ".*"; _lyricsFilePath = Directory.EnumerateFiles(directory, filePattern)