void OnSongRepeated(TrackInfoEventArgs e) { if (SongRepeated != null) SongRepeated(this, e); }
void Winamp_SongRepeated(object sender, TrackInfoEventArgs e) { //scrobbler.SetCurrentTrack(new Track(e.Song)); //var msg = string.Format("Repeat:\r\n{0} - {1}", e.Song.Artist, e.Song.Title); var msg = "Repeat? " + e.Track.ToString(); MessageBox.Show(msg, "Winamp Last.fm scrobbler"); }
void OnSongChanged(TrackInfoEventArgs e) { if (SongChanged != null) SongChanged(this, e); }
void Winamp_SongChanged(object sender, TrackInfoEventArgs e) { Logger.WriteEmptyLine(); Logger.LogMessage("Track changed"); //if (Winamp.Status != Status.Playing) return; if (!e.Track.HasMetadata) { Logger.LogMessage("No metadata available for playlist entry: " + e.Track); return; } var track = e.Track; //MessageBox.Show(string.Format("Current track: {0} [{1:m':'ss}]", track, track.NaturalDuration)); if (track.Duration <= 0) { Track.GetInfoAsync(e.Track.Artist, e.Track.Title, true, (t) => { t.Filename = track.Filename; track = t; //t.IsChosenByUser = false; LogTrackInfo(track); if (!(e.Track.IsRadioStream && !scrobblingSettings.ScrobbleRadio)) { scrobbler.ResetCurrentTrack(track); } }); } else { LogTrackInfo(track); scrobbler.ResetCurrentTrack(track); } }