本文整理汇总了C#中Album.addTracks方法的典型用法代码示例。如果您正苦于以下问题:C# Album.addTracks方法的具体用法?C# Album.addTracks怎么用?C# Album.addTracks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Album
的用法示例。
在下文中一共展示了Album.addTracks方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
//.........这里部分代码省略.........
{
mediaPlaylist = getPlaylistFromExactQuery(query_text, query_type, collection);
}
else if (has_query)
{
string type = getSortAttributeFromQueryType(query_type);
mediaPlaylist = collection.getPlaylistByQuery(query, "Audio", type, true);
}
if (mediaPlaylist != null)
{
//Create playlist from query if supplied with playlist name
if (create_playlist_name != null)
{
add_to_playlist(opResult, has_query, mediaPlaylist, create_playlist_name);
return opResult;
}
else if (query_indexes.Count > 0)
{
for (int j = 0; j < query_indexes.Count; j++)
{
media_item = mediaPlaylist.get_Item((Int16)query_indexes[j]);
if (media_item != null)
{
metadata.addSong(media_item);
}
}
}
else
{
if (query_type.Equals("Album"))
{
Album album = new Album(query_text, m_stats_only);
album.addTracks(mediaPlaylist);
metadata.addAlbum(album);
}
else
{
metadata.addSongs(mediaPlaylist);
}
}
}
else
{
if (logger != null)
{
logger.Write("Creating library metadata object");
}
//No query supplied so entire detailed library requested
//Parse all albums and return, no value album will be added as songs
IWMPStringCollection album_collection = collection.getAttributeStringCollection("WM/AlbumTitle", "Audio");
if (album_collection.count > 0)
{
result_count = 0;
for (int j = 0; j < album_collection.count; j++)
{
if (album_collection.Item(j) != null)
{
//The collection seems to represent the abcense of an album as an "" string value
IWMPPlaylist album_playlist = collection.getByAlbum(album_collection.Item(j));
if (album_playlist != null)
{
if (!album_collection.Item(j).Equals(""))
{
Album album = new Album(album_collection.Item(j), m_stats_only);
result_count += album.addTracks(album_playlist);