C# – ITunes SDK: Loading shared music

citunes-sdknet

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?

Best Answer

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!
  }
}
Related Topic