Windows Dev Center

Using Auto Playlists to Organize Content in the Library

You can use auto playlists to organize premium content you provide. For example, you could use Windows Media Player to create an auto playlist that contains only content you provided having a user rating of at least four stars. You can then add the auto playlist to the library in Windows Media Player so that it displays in the Purchased Music node under your content distributor node.

To do this, follow these steps:

  1. Create the auto playlist.
  2. Using Windows Explorer, browse to the auto playlist and retrieve the .wpl file.
  3. Using the Windows Media Player object model, add the auto playlist to the library.
  4. Set the WM/ContentDistributor attribute for the playlist to your content distributor key name.
  5. Set the SyncOnly attribute for the playlist to true.

The following JScript example code shows a function that adds an auto playlist named "Favorite Hits" to the Proseware node in the library:



function AddWPL()
{
    var pl = Player.mediaCollection.add("c:\\media\\Favorite Hits.wpl");
    pl.setItemInfo("WM/ContentDistributor", "Proseware");
    pl.setItemInfo("SyncOnly", true);
}


Related topics

About Library Integration
Information Common to Type 1 and Type 2 Online Stores
MediaCollection.add
Playlist.setItemInfo
Static and Auto Playlists
SyncOnly Attribute
WM/ContentDistributor Attribute
Working with the Library

 

 

Community Additions

ADD
Show:
© 2015 Microsoft