Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
Fix loading lyrics for tracks from radio
Browse files Browse the repository at this point in the history
  • Loading branch information
avdynut committed Dec 22, 2019
1 parent 441f10b commit d6b31e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion AimpLyrics/LyricsWIndow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
</ResourceDictionary>
</Window.Resources>
<DockPanel>
<Grid MaxHeight="28" DockPanel.Dock="Top">
<Grid MaxHeight="26" DockPanel.Dock="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
Expand Down
3 changes: 3 additions & 0 deletions AimpLyrics/LyricsWIndow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d6b31e0

Please sign in to comment.