views:

399

answers:

1

I've been messing with the iTunes SDK under .NET 3.5 with C#, but I have not found a way to load a shared music library from another computer on the network. Does anyone know how I can access shared music from the iTunes SDK? If this is not possible, then can anyone suggest alternatives?

+4  A: 

Here's some sample C# code to get a Shared Library.

iTunesLib.IiTunes iTunesApp;
iTunesApp = new iTunesLib.iTunesAppClass();
iTunesLib.IITSourceCollection iSources = iTunesApp.Sources;
foreach (iTunesLib.IITSource iSource in iSources)
{
  if (iSource.Kind.Equals(iTunesLib.ITSourceKind.ITSourceKindSharedLibrary))
  {
    //Do AwesomeStuffHere!
  }
}
Adam Hawkes