Skip to content

Commit

Permalink
Stuff we left out from the feature branches. #embarrassed #willdobetter
Browse files Browse the repository at this point in the history
  • Loading branch information
fordprefect480 committed May 30, 2014
1 parent c3bb01b commit f96c4d5
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
1 change: 0 additions & 1 deletion PlayMe.Server/PlayMe.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@
<Compile Include="UserSettings.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.Debug.config" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
Expand Down
5 changes: 4 additions & 1 deletion PlayMe.Server/SoundBoard/ISoundBoardService.cs
Original file line number Diff line number Diff line change
@@ -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);
}
}
13 changes: 13 additions & 0 deletions PlayMe.Server/SoundBoard/SoundBoardService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
}
}
}


Expand Down
4 changes: 4 additions & 0 deletions PlayMe.Web/Scripts/app/views/partials/queued-track.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
<span data-bind="if: $data.StartedPlayingDateTime"> played at <span data-bind=" timeAndDate: StartedPlayingDateTime"></span></span>
</li>
</li>
<li class="small-text" data-bind="if: $data.StartedPlayingDateTime">
Likes/Vetoes: <span class="badge badge-like" data-bind="text: $data.LikeCount, popover: { template: 'likesPopover', visible: Likes().length, title: 'Liked by' }"></span>
/ <span data-bind="text: $data.VetoCount, popover: { template: 'vetoesPopover', visible: Vetoes().length, title: 'Vetoed by' }" class="badge badge-veto"></span>
</li>
</ul>
</li>
<!--
Expand Down
3 changes: 0 additions & 3 deletions PlayMe.Web/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
<staticContent>
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
</staticContent>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
Expand Down

0 comments on commit f96c4d5

Please sign in to comment.