Skip to content

Commit

Permalink
Prefix, Suffix Preview pass 2
Browse files Browse the repository at this point in the history
  • Loading branch information
kurdtkobain committed Jun 20, 2016
1 parent 045dcdc commit 05cccb4
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 53 deletions.
20 changes: 10 additions & 10 deletions EssentialNowPlaying/SpotifyHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ async public override Task pollForSongChanges()
//Debug.WriteLine("{0} + {1}", "DEBUG", s.MainWindowTitle);
if (!isSpotifyUp)
{
writeToPath(path, "Spotify not open");
writeToPath(path, "Spotify not open", true);

preview.Text = "Spotify not open";
//preview.Text = "Spotify not open";
}
else if (noSong)
{
writeToPath(path, "Paused");
writeToPath(path, "Paused", true);

preview.Text = "Paused";
//preview.Text = "Paused";
oldName = null;
}
else
Expand All @@ -94,24 +94,24 @@ async public override Task pollForSongChanges()
{
if (string.Compare(oldName, songName) != 0)
{
preview.Text = songName;
writeToPath(path, songName);
//preview.Text = songName;
writeToPath(path, songName, true);
oldName = songName;
}
}
else
{
// first run
preview.Text = songName;
writeToPath(path, songName);
//preview.Text = songName;
writeToPath(path, songName, true);
oldName = songName;
}
}
}
catch (NullReferenceException)
{
writeToPath(path, "Spotify not open");
preview.Text = "Spotify not open";
writeToPath(path, "Spotify not open", true);
//preview.Text = "Spotify not open";
}

await Task.Delay(500);
Expand Down
26 changes: 13 additions & 13 deletions EssentialNowPlaying/VLCHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async public override Task pollForSongChanges()
while (!bStop)
{
// get the Spotify process (if it exists)


try
{
Expand All @@ -76,13 +76,13 @@ async public override Task pollForSongChanges()
//Debug.WriteLine("{0} + {1}", "DEBUG", s.MainWindowTitle);
if (!isVLCUp)
{
writeToPath(path, "VLC not open");
preview.Text = "VLC not open";
writeToPath(path, "VLC not open", true);
//preview.Text = "VLC not open";
}
else if (noSong)
{
writeToPath(path, "Paused");
preview.Text = "Paused";
writeToPath(path, "Paused", true);
//preview.Text = "Paused";
oldName = null;
}
else
Expand All @@ -93,28 +93,28 @@ async public override Task pollForSongChanges()
{
if (oldName != songName)
{
preview.Text = songName;
writeToPath(path, songName);
//preview.Text = songName;
writeToPath(path, songName, true);
oldName = songName;
}
}
else
{
// first run
preview.Text = songName;
writeToPath(path, songName);
//preview.Text = songName;
writeToPath(path, songName, true);
oldName = songName;
}
}



}
catch (NullReferenceException)
{
writeToPath(path, "VLC not open");
preview.Text = "VLC not open";
writeToPath(path, "VLC not open", true);
//preview.Text = "VLC not open";

}

await Task.Delay(500);
Expand Down
20 changes: 10 additions & 10 deletions EssentialNowPlaying/WinAmpHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ async public override Task pollForSongChanges()
//Debug.WriteLine("{0} + {1}", "DEBUG", s.MainWindowTitle);
if (!isFoobarUp)
{
writeToPath(path, "foobar2000 not open");
preview.Text = "foobar2000 not open";
writeToPath(path, "foobar2000 not open", true);
//preview.Text = "foobar2000 not open";
}
else if (noSong)
{
writeToPath(path, "Paused");
preview.Text = "Paused";
writeToPath(path, "Paused", true);
//preview.Text = "Paused";
oldName = null;
}
else
Expand All @@ -95,16 +95,16 @@ async public override Task pollForSongChanges()
{
if (oldName != songName)
{
preview.Text = songName;
writeToPath(path, songName);
//preview.Text = songName;
writeToPath(path, songName, true);
oldName = songName;
}
}
else
{
// first run
preview.Text = songName;
writeToPath(path, songName);
//preview.Text = songName;
writeToPath(path, songName, true);
oldName = songName;
}
}
Expand All @@ -114,8 +114,8 @@ async public override Task pollForSongChanges()
}
catch (NullReferenceException)
{
writeToPath(path, "foobar2000 not open");
preview.Text = "foobar2000 not open";
writeToPath(path, "foobar2000 not open", true);
//preview.Text = "foobar2000 not open";

}

Expand Down
20 changes: 10 additions & 10 deletions EssentialNowPlaying/foobar2000.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ async public override Task pollForSongChanges()
//Debug.WriteLine("{0} + {1}", "DEBUG", s.MainWindowTitle);
if (!isFoobarUp)
{
writeToPath(path, "foobar2000 not open");
preview.Text = "foobar2000 not open";
writeToPath(path, "foobar2000 not open", true);
//preview.Text = "foobar2000 not open";
}
else if (noSong)
{
writeToPath(path, "Paused");
preview.Text = "Paused";
writeToPath(path, "Paused", true);
//preview.Text = "Paused";
oldName = null;
}
else
Expand All @@ -95,16 +95,16 @@ async public override Task pollForSongChanges()
{
if (oldName != songName)
{
preview.Text = songName;
writeToPath(path, songName);
//preview.Text = songName;
writeToPath(path, songName, true);
oldName = songName;
}
}
else
{
// first run
preview.Text = songName;
writeToPath(path, songName);
//preview.Text = songName;
writeToPath(path, songName, true);
oldName = songName;
}
}
Expand All @@ -114,8 +114,8 @@ async public override Task pollForSongChanges()
}
catch (NullReferenceException)
{
writeToPath(path, "foobar2000 not open");
preview.Text = "foobar2000 not open";
writeToPath(path, "foobar2000 not open", true);
//preview.Text = "foobar2000 not open";

}

Expand Down
20 changes: 10 additions & 10 deletions EssentialNowPlaying/iTunesHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ async public override Task pollForSongChanges()

if (!findItunes())
{
writeToPath(path, "iTunes not open");
preview.Text = "iTunes not open";
writeToPath(path, "iTunes not open", true);
//preview.Text = "iTunes not open";
oldName = null;
}
else
Expand All @@ -73,15 +73,15 @@ async public override Task pollForSongChanges()
fullName = artist + " - " + songName + " ";
if (fullName != oldName)
{
writeToPath(path, fullName);
preview.Text = fullName;
writeToPath(path, fullName, true);
//preview.Text = fullName;
oldName = fullName;
}
}
else
{
writeToPath(path, "Paused");
preview.Text = "Paused";
writeToPath(path, "Paused", true);
//preview.Text = "Paused";
oldName = null;
}
}
Expand All @@ -93,14 +93,14 @@ async public override Task pollForSongChanges()
songName = ITrack.Name;
artist = ITrack.Artist;
fullName = artist + " - " + songName + " ";
writeToPath(path, fullName);
preview.Text = fullName;
writeToPath(path, fullName, true);
//preview.Text = fullName;
oldName = fullName;
}
else
{
writeToPath(path, "Paused");
preview.Text = "Paused";
writeToPath(path, "Paused", true);
//preview.Text = "Paused";
oldName = null;
}
}
Expand Down

0 comments on commit 05cccb4

Please sign in to comment.