Skip to content

Commit

Permalink
remove debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuffins committed Aug 18, 2017
1 parent cbf6884 commit cc27a58
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions PluginMediaMonkey/MediaMonkey/MediaMonkey5.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,8 @@ public MediaMonkey5(string ExecutablePath)

public async void Initialize()
{
LogMessageToFile("Initialize");

if (OnCooldown || !IsRunning())
{
LogMessageToFile("Initialize blocking");
return;
}

Expand Down Expand Up @@ -107,13 +104,10 @@ async private Task InitializeAsync()

public bool IsInitialized()
{
LogMessageToFile("IsInitialized");

if (!IsRunning())
{
// Currently initializing or not running
// try again later
LogMessageToFile("IsInitialized False");
return false;
}

Expand All @@ -123,24 +117,19 @@ public bool IsInitialized()
{
try
{
LogMessageToFile("tryHasActiveSession");
activeSession = mm.HasActiveSession();
}
catch
{
LogMessageToFile("IsInitialized catch");
Dispose();
return false;
}
}

if (!activeSession)
{
LogMessageToFile("hasnoactivesession, dispose");
Dispose();
LogMessageToFile("hasnoactivesession, afterdispose");
}
LogMessageToFile("IsInitialized return " + activeSession);

return activeSession;
}
Expand Down Expand Up @@ -237,7 +226,6 @@ public void Dispose()
{
if (IsRunning())
{
LogMessageToFile("disposemm");
if (mm != null)
{
mm.Dispose();
Expand All @@ -256,8 +244,6 @@ public async void UpdateTrack()
{
// Attempt to update the currently playing track

LogMessageToFile("UpdateTrack");

if (!IsInitialized())
{
Initialize();
Expand All @@ -272,7 +258,6 @@ public async void UpdateTrack()
{
try
{
LogMessageToFile("start awaitrefreshtracktask");
RefreshTrackTask = UpdateTrackAsync();
await RefreshTrackTask;
}
Expand All @@ -285,7 +270,6 @@ public async void UpdateTrack()

async private Task UpdateTrackAsync()
{
LogMessageToFile("UpdateTrackAsync");
try
{
await Task.Factory.StartNew(() => CurrentTrack = mm.GetCurrentTrack());
Expand Down Expand Up @@ -1071,14 +1055,14 @@ public void SetVolume(int Volume)
}


public string GetTempPath()
private string GetTempPath()
{
string path = System.Environment.GetEnvironmentVariable("TEMP");
if (!path.EndsWith("\\")) path += "\\";
return path;
}

public void LogMessageToFile(string msg)
private void LogMessageToFile(string msg)
{
try
{
Expand Down

0 comments on commit cc27a58

Please sign in to comment.