public WMPLib.IWMPPlaylist byArtist(string filter)
        {
            WMPLib.IWMPMediaCollection2 collection = null;

            collection = (WMPLib.IWMPMediaCollection2)Player.mediaCollection;
            WMPLib.IWMPQuery query = collection.createQuery();

            if (filter.Length > 0)
            {
                query.addCondition("Artist", "BeginsWith", filter);
                query.beginNextGroup();
                query.addCondition("Artist", "Contains", " " + filter);
            }
            return(collection.getPlaylistByQuery(query, "Audio", "", false));
        }
        public OpResult listArtistsOnly(OpResult or, string filter)
        {
            WMPLib.IWMPMediaCollection2 collection = null;

            collection = (WMPLib.IWMPMediaCollection2)Player.mediaCollection;
            WMPLib.IWMPQuery            query   = collection.createQuery();
            WMPLib.IWMPStringCollection artists = null;

            if (filter.Length > 0)
            {
                query.addCondition("Artist", "Contains", filter);
            }
            artists = collection.getStringCollectionByQuery("Artist", query, "Audio", "", true);
            for (int j = 0; j < artists.count; j++)
            {
                or.AppendFormat("artist={0}", artists.Item(j));
            }

            return(or);
        }