Skip to content

Commit

Permalink
Fix seek issue when a song has finished
Browse files Browse the repository at this point in the history
  • Loading branch information
sabihoshi committed May 27, 2021
1 parent 073af05 commit 5a5fd63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<UseWPF>true</UseWPF>
<StartupObject>GenshinLyreMidiPlayer.WPF.App</StartupObject>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Version>2.0.2</Version>
<Version>2.0.3</Version>
<ApplicationIcon>item_windsong_lyre.ico</ApplicationIcon>
<Nullable>enable</Nullable>
<RepositoryUrl>https://github.com/sabihoshi/GenshinLyreMidiPlayer</RepositoryUrl>
Expand Down
7 changes: 6 additions & 1 deletion GenshinLyreMidiPlayer.WPF/ViewModels/LyrePlayerViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ public void OnSongPositionChanged()
if (Settings.UseSpeakers)
Playback.Start();
}

_ignoreSliderChange = false;
}

public void OnSelectedMidiInputChanged()
Expand Down Expand Up @@ -355,8 +357,11 @@ public void Previous()
{
if (CurrentTime > TimeSpan.FromSeconds(3))
{
Playback!.MoveToStart();
Playback?.Stop();
Playback?.MoveToStart();

MoveSlider(TimeSpan.Zero);
Playback?.Start();
}
else
Playlist.Previous();
Expand Down

0 comments on commit 5a5fd63

Please sign in to comment.