Skip to content

Instantly share code, notes, and snippets.

@mohemohe
Last active January 31, 2016 15:43
Show Gist options
  • Select an option

  • Save mohemohe/3e024705b9dd1a358d0e to your computer and use it in GitHub Desktop.

Select an option

Save mohemohe/3e024705b9dd1a358d0e to your computer and use it in GitHub Desktop.
using System;
namespace Example
{
class Program
{
static void Main(string[] args)
{
var name = iTunesLibrary.Library.CurrentSong.Name;
var album = iTunesLibrary.Library.CurrentSong.Album.Name;
var artist = iTunesLibrary.Library.CurrentSong.Artist.Name;
var track = iTunesLibrary.Library.CurrentSong.TrackNum;
var disc = iTunesLibrary.Library.CurrentSong.Disc;
var normalizedText = $"{disc}-{track}. {name} / {album} - {artist}";
Console.WriteLine(normalizedText);
}
}
}
public int TrackNum
{
get
{
return Track.TrackNumber;
}
}
public int Disc
{
get
{
return Track.DiscNumber;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment