Example #1
0
 void UpdateCurrentSong(object sender, MetadataEventArgs args)
 {
     const string metadataSongPattern = @"StreamTitle='(?<artist>.+) - (?<title>.+)';";
     Match match = Regex.Match(args.NewMetadata, metadataSongPattern);
     if (!match.Success)
         CurrentSong = null;
     else
         CurrentSong = new SongInfo(match.Groups["artist"].Value, match.Groups["title"].Value);
 }
Example #2
0
 public CurrentSongEventArgs(SongInfo OldSong, SongInfo NewSong)
 {
     this.OldSong = OldSong;
     this.NewSong = NewSong;
 }