Skip to content

Commit

Permalink
[#49] Plugin now looks before leaping when enumerating filter folders
Browse files Browse the repository at this point in the history
  • Loading branch information
cnapolit committed Nov 9, 2022
1 parent 87ba0a5 commit b23d11a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
12 changes: 8 additions & 4 deletions PlayniteSounds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ private void PerformDeleteAction(string message, Action deleteAction)
//because we closed the music above
ReloadMusic = true;

PlayMusicFromFirst(SelectedGames);
if (ShouldPlayMusic()) PlayMusicFromFirst(SelectedGames);
}

private void SelectMusicForSelectedGames()
Expand Down Expand Up @@ -1838,10 +1838,14 @@ private string[] GetBackupFiles()
{
if (Settings.MusicType != MusicType.Default)
{
var filterFiles = Directory.GetFiles(GetCurrentFilterDirectoryPath());
if (filterFiles.Any())
var filterDirectory = GetCurrentFilterDirectoryPath();
if (Directory.Exists(filterDirectory))
{
return filterFiles;
var filterFiles = Directory.GetFiles(filterDirectory);
if (filterFiles.Any())
{
return filterFiles;
}
}
}

Expand Down
7 changes: 7 additions & 0 deletions PlayniteSounds.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
AddonId: 'Playnite.Sounds.WD'
Packages:
- Version: 5.6
RequiredApiVersion: 6.4.0
ReleaseDate: 2022-10-31
PackageUrl: https://github.com/joyrider3774/PlayniteSound/releases/download/v5.6/PlayniteSounds-v5.6.pext
Changelog:
- Error message no longer displays sometimes when plugin attempted to play backup music from a filter
- GameStarted sound has been restored
- Version: 5.4
RequiredApiVersion: 6.4.0
ReleaseDate: 2022-10-31
Expand Down
2 changes: 1 addition & 1 deletion extension.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Id: Playnite.Sounds.WD
Name: Playnite Sounds
Author: Joyrider3774,cnapolit
Version: 5.4
Version: 5.6
Module: PlayniteSounds.dll
Type: GenericPlugin
Icon: icon.png
Expand Down

0 comments on commit b23d11a

Please sign in to comment.