diff --git a/PlayMe.Server/PlayMe.Server.csproj b/PlayMe.Server/PlayMe.Server.csproj index 52f39c0..170b285 100644 --- a/PlayMe.Server/PlayMe.Server.csproj +++ b/PlayMe.Server/PlayMe.Server.csproj @@ -271,7 +271,6 @@ - Designer diff --git a/PlayMe.Server/SoundBoard/ISoundBoardService.cs b/PlayMe.Server/SoundBoard/ISoundBoardService.cs index 047b7fe..2d3c857 100644 --- a/PlayMe.Server/SoundBoard/ISoundBoardService.cs +++ b/PlayMe.Server/SoundBoard/ISoundBoardService.cs @@ -1,9 +1,12 @@  +using PlayMe.Common.Model; + namespace PlayMe.Server.SoundBoard { public interface ISoundBoardService { - void PlayFinishHim(); void PlayVetoSound(); + + void PlayFinishHim(int requiredVetos, QueuedTrack foundTrack); } } diff --git a/PlayMe.Server/SoundBoard/SoundBoardService.cs b/PlayMe.Server/SoundBoard/SoundBoardService.cs index a1e87fa..ce217d5 100644 --- a/PlayMe.Server/SoundBoard/SoundBoardService.cs +++ b/PlayMe.Server/SoundBoard/SoundBoardService.cs @@ -113,6 +113,19 @@ private string GetVetoSound(int vetoCount) } return string.Empty; } + + public void PlayFinishHim(int requiredVetos, QueuedTrack foundTrack) + { + if (soundBoardSettings.IsEnabled) + { + var howManyVetosToGo = (requiredVetos - foundTrack.VetoCount); + + if (foundTrack.LikeCount > 5 && howManyVetosToGo == 1) + { + player.PlayFromFile(pathBuilder.BuildFilePath("finishhim.wav")); + } + } + } } diff --git a/PlayMe.Web/Scripts/app/views/partials/queued-track.html b/PlayMe.Web/Scripts/app/views/partials/queued-track.html index 6c9080f..a3ac673 100644 --- a/PlayMe.Web/Scripts/app/views/partials/queued-track.html +++ b/PlayMe.Web/Scripts/app/views/partials/queued-track.html @@ -29,6 +29,10 @@ played at +
  • + Likes/Vetoes: + / +