public void SendSongInfo() { if (ZuneRunning == 1 && !string.IsNullOrEmpty(ZuneTrack) && !string.IsNullOrEmpty(ZuneArtist) && !string.IsNullOrEmpty(ZuneAlbum)) { string song = ZuneArtist + " - " + ZuneTrack + " - " + ZuneAlbum + " - " + ZuseLength + " - " + ZuneRunning; if (previousSong != song) { //If the song has changed previousSong = song; //Check MusicBrainz Settings /** * if (int.Parse(ConfigurationManager.AppSettings["ZuseUseMusicBrainz"]) >= 1) * { * GetSongInfoLength(); * } * else * { * ZuseLength = int.Parse(ConfigurationManager.AppSettings["ZuseLengthDefault"]); * } **/ Console.WriteLine(ZuneArtist + " - " + ZuneTrack + " - " + ZuneAlbum + " - " + ZuseLength + " - " + ZuneId + " - " + ZuneFilename); //Start scrobbling //SendLastFM.Start(ZuneArtist, ZuneTrack, ZuneAlbum, ZuneId, ZuseLength, ZuneFilename); DiscordControl.Init(); DiscordControl.ChangeStatus(ZuneArtist, ZuneTrack, ZuneAlbum); //form1.changeInfo(ZuneArtist, ZuneTrack, ZuneAlbum); } } else { string song = ZuneArtist + " - " + ZuneTrack + " - " + ZuneAlbum + " - " + ZuseLength + " - " + ZuneRunning; if (previousSong != song) { //If the song has changed previousSong = song; Console.WriteLine("Zune has stopped playing or has been closed or opened."); //Stop scrobbling //SendLastFM.Stop(); } } }
public static void Main() { DiscordControl DiscordControl = new DiscordControl(); DiscordControl.Init(); StartupCheck StartupCheck = new StartupCheck(); Console.WriteLine("Waiting for a song to begin or change..."); ReceiveSong ReceiveSong = new ReceiveSong(); ReceiveSong.Show(); //DiscordControl.ChangeStatus(); Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); //Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); }