Skip to content

Commit

Permalink
Remove patcher, fix muting
Browse files Browse the repository at this point in the history
  • Loading branch information
Xeroday committed Oct 20, 2018
1 parent 8bc0761 commit f452881
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 1,008 deletions.
4 changes: 0 additions & 4 deletions EZBlocker/EZBlocker/EZBlocker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@
<DependentUpon>EZBlockerMain.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\strings.de.resx" />
<EmbeddedResource Include="Properties\strings.es.resx" />
<EmbeddedResource Include="Properties\strings.fr.resx" />
<EmbeddedResource Include="Properties\strings.pt.resx" />
<EmbeddedResource Include="Properties\strings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>strings.Designer.cs</LastGenOutput>
Expand Down
14 changes: 4 additions & 10 deletions EZBlocker/EZBlocker/EZBlockerMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private void MainTimer_Tick(object sender, EventArgs e)
try {
if (hook.IsRunning())
{
if (listener.Message.Equals("true"))
if (hook.IsAdPlaying())
{
if (MainTimer.Interval != 1000) MainTimer.Interval = 1000;
if (!muted) Mute(true);
Expand Down Expand Up @@ -88,7 +88,7 @@ private void MainTimer_Tick(object sender, EventArgs e)
LogAction("/play/" + artist);
}
}
else
else if (hook.WindowName.Equals("Spotify"))
{
string message = Properties.strings.StatusPaused;
if (lastMessage != message)
Expand Down Expand Up @@ -176,7 +176,6 @@ private void LogAction(string action)
**/
private void Heartbeat_Tick(object sender, EventArgs e)
{
CheckPatch(false);
if (DateTime.Now - lastRequest > TimeSpan.FromMinutes(5))
{
LogAction("/heartbeat");
Expand Down Expand Up @@ -216,10 +215,6 @@ private void Main_Load(object sender, EventArgs e)
return;
}

// Patch Spotify
patcher = new SpotifyPatcher();
CheckPatch(true);

// Start Spotify and give EZBlocker higher priority
try
{
Expand Down Expand Up @@ -263,9 +258,9 @@ private void Main_Load(object sender, EventArgs e)
// Start Spotify hook
hook = new SpotifyHook();

// Start EZBlocker listener
/* Start EZBlocker listener
listener = new Listener();
Task.Run(() => listener.Listen());
Task.Run(() => listener.Listen()); */

MainTimer.Enabled = true;

Expand Down Expand Up @@ -459,7 +454,6 @@ protected override void OnFormClosing(FormClosingEventArgs e)
Properties.Settings.Default.Save();
}
}
listener.Stop();
}

[DllImport("shell32.dll")]
Expand Down
68 changes: 43 additions & 25 deletions EZBlocker/EZBlocker/EZBlockerMain.resx
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,8 @@
<value>348, 16</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="openToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>289, 24</value>
</data>
<data name="websiteToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>289, 24</value>
</data>
<data name="undoPatchToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>289, 24</value>
</data>
<data name="separatorToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>286, 6</value>
</data>
<data name="exitToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>289, 24</value>
</data>
<data name="NotifyIconContextMenu.Size" type="System.Drawing.Size, System.Drawing">
<value>290, 106</value>
<value>319, 122</value>
</data>
<data name="&gt;&gt;NotifyIconContextMenu.Name" xml:space="preserve">
<value>NotifyIconContextMenu</value>
Expand Down Expand Up @@ -7367,15 +7352,36 @@
<data name="NotifyIcon.Visible" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="openToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>318, 28</value>
</data>
<data name="websiteToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>318, 28</value>
</data>
<data name="undoPatchToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>318, 28</value>
</data>
<data name="undoPatchToolStripMenuItem.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="separatorToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>315, 6</value>
</data>
<data name="exitToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>318, 28</value>
</data>
<data name="WebsiteLink.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="WebsiteLink.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.059701pt</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="WebsiteLink.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="WebsiteLink.Location" type="System.Drawing.Point, System.Drawing">
<value>179, 133</value>
<value>173, 134</value>
</data>
<data name="WebsiteLink.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 0, 4, 0</value>
Expand All @@ -7384,7 +7390,7 @@
<value>Yes</value>
</data>
<data name="WebsiteLink.Size" type="System.Drawing.Size, System.Drawing">
<value>107, 17</value>
<value>113, 18</value>
</data>
<data name="WebsiteLink.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
Expand All @@ -7407,6 +7413,9 @@
<metadata name="Heartbeat.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>242, 16</value>
</metadata>
<data name="VolumeMixerButton.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.059701pt</value>
</data>
<data name="VolumeMixerButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
Expand Down Expand Up @@ -7438,19 +7447,19 @@
<value>True</value>
</data>
<data name="StatusLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt</value>
<value>Microsoft Sans Serif, 8.059701pt</value>
</data>
<data name="StatusLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="StatusLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 133</value>
<value>13, 134</value>
</data>
<data name="StatusLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 0, 4, 0</value>
</data>
<data name="StatusLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>71, 17</value>
<value>72, 18</value>
</data>
<data name="StatusLabel.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
Expand All @@ -7473,6 +7482,9 @@
<data name="BlockBannersCheckbox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="BlockBannersCheckbox.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.059701pt</value>
</data>
<data name="BlockBannersCheckbox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
Expand All @@ -7483,7 +7495,7 @@
<value>4, 4, 4, 4</value>
</data>
<data name="BlockBannersCheckbox.Size" type="System.Drawing.Size, System.Drawing">
<value>139, 21</value>
<value>148, 22</value>
</data>
<data name="BlockBannersCheckbox.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
Expand All @@ -7503,6 +7515,9 @@
<data name="StartupCheckbox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="StartupCheckbox.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.059701pt</value>
</data>
<data name="StartupCheckbox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
Expand All @@ -7513,7 +7528,7 @@
<value>4, 4, 4, 4</value>
</data>
<data name="StartupCheckbox.Size" type="System.Drawing.Size, System.Drawing">
<value>185, 21</value>
<value>196, 22</value>
</data>
<data name="StartupCheckbox.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
Expand All @@ -7533,6 +7548,9 @@
<data name="SpotifyCheckbox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="SpotifyCheckbox.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.059701pt</value>
</data>
<data name="SpotifyCheckbox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
Expand All @@ -7543,7 +7561,7 @@
<value>4, 4, 4, 4</value>
</data>
<data name="SpotifyCheckbox.Size" type="System.Drawing.Size, System.Drawing">
<value>201, 21</value>
<value>214, 22</value>
</data>
<data name="SpotifyCheckbox.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
Expand All @@ -7567,7 +7585,7 @@
<value>8, 16</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>298, 160</value>
<value>291, 163</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Expand Down
4 changes: 2 additions & 2 deletions EZBlocker/EZBlocker/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.7.2.5")]
[assembly: AssemblyFileVersion("1.7.2.5")]
[assembly: AssemblyVersion("1.7.3.0")]
[assembly: AssemblyFileVersion("1.7.3.0")]
Loading

0 comments on commit f452881

Please sign in to comment.