Ejemplo n.º 1
0
        void UpdateCurrentSong(object sender, MetadataEventArgs args)
        {
            const string metadataSongPattern = @"StreamTitle='(?<artist>.+?) - (?<title>.+?)';";
            var          match = Regex.Match(args.NewMetadata, metadataSongPattern);

            if (match.Success)
            {
                CurrentSong = new SongInfo(match.Groups["artist"].Value, match.Groups["title"].Value);
            }
        }
Ejemplo n.º 2
0
 void UpdateCurrentSong(object sender, MetadataEventArgs args)
 {
     const string metadataSongPattern = @"StreamTitle='(?<artist>.+?) - (?<title>.+?)';";
     var match = Regex.Match(args.NewMetadata, metadataSongPattern);
     if (match.Success)
         CurrentSong = new SongInfo(match.Groups["artist"].Value, match.Groups["title"].Value);
 }