I have attached my code so far, my problem is that all playlists will be using "Auto" or "WPL "Return. (This is using all WMPLib references)
mediaplayer = new WindowsMediaPlayer (); // In it. Playlist IWMPPlaylistCollection plcollection = mediaplayer.playlistCollection; Plarray = plcollection.getAll (); Int i = 0, count = plarray.count; String [] t = new string [count]; // here is the place where I want to sort non-music playlists and to them (i = 0; i Unrelated, but if you add playlists as data instead of wires, then it will also be helpful :)
I think that you can be repeated through playlist items and if the " MediaType " attribute of the item is equal to " audio "This list assumes that there is an audio file in such a way: Private Butt ListHouse Audio (IWMP) Playlists Playlist) {if (playlist! = Null and playlists list & gt; 0) {for (int n = 0; n & lt; PlayList.count; n ++) {IWMP Media = playlist .get_Item (n); String media type = media.getitminoinfo ("mediatype"); If (media type! = Null & amp; media typeEllols ("audio", string comperson, currently agricultural explorer)) is true; } } return false; } How it can be used here:
var mediaplayer = new WindowsMediaPlayer (); // In it. Playlist IWMPPlaylistCollection plcollection = mediaplayer.playlistCollection; Var plarray = plcollection.getAll (); // Load list for box item (int i = 0; i & lt; plarray.count; i ++) {IWMPPlaylist playList = plarray.Item (i); If (ListHasAudio (playlist) PlaylistBox.Items.Add (playList.name); } Hope this helps,
Comments
Post a Comment