本文整理汇总了C#中Library.addAlbum方法的典型用法代码示例。如果您正苦于以下问题:C# Library.addAlbum方法的具体用法?C# Library.addAlbum怎么用?C# Library.addAlbum使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Library
的用法示例。
在下文中一共展示了Library.addAlbum方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
//.........这里部分代码省略.........
else
{
opResult.StatusCode = OpStatusCode.BadRequest;
opResult.StatusText = "No artists found!";
}
}
return opResult;
case LIST_ALBUM_ARTISTS:
if (create_playlist_name != null)
{
IWMPPlaylist album_artists_playlist = collection.getPlaylistByQuery(query, "Audio", "WM/AlbumArtist", true);
add_to_playlist(opResult, has_query, album_artists_playlist, create_playlist_name);
opResult.StatusCode = OpStatusCode.Ok;
}
else
{
IWMPStringCollection album_artists;
if (has_query)
{
album_artists = collection.getStringCollectionByQuery("WM/AlbumArtist", query, "Audio", "WM/AlbumArtist", true);
}
else
{
album_artists = collection.getAttributeStringCollection("WM/AlbumArtist", "Audio");
}
if (album_artists != null && album_artists.count > 0)
{
result_count = 0;
for (int k = 0; k < album_artists.count; k++)
{
string item = album_artists.Item(k);
if (item != null && !item.Equals("") && !metadata.containsAlbumArtist(item))
{
if (!m_stats_only) metadata.addAlbumArtist(item);
else result_count++;
}
}
opResult.ResultCount = result_count;
metadata.trimToSize();
opResult = serializeObject(opResult, metadata, cache_fn, cache_ver);
}
else
{
opResult.StatusCode = OpStatusCode.BadRequest;
opResult.StatusText = "No album artists found!";
}
}
return opResult;
case LIST_ALBUMS:
if (create_playlist_name != null)
{
IWMPPlaylist albums_playlist = collection.getPlaylistByQuery(query, "Audio", "WM/AlbumTitle", true);
add_to_playlist(opResult, has_query, albums_playlist, create_playlist_name);
opResult.StatusCode = OpStatusCode.Ok;
}
else
{
IWMPStringCollection albums;
if (has_query)
{
albums = collection.getStringCollectionByQuery("WM/AlbumTitle", query, "Audio", "WM/AlbumTitle", true);
}
else
{
albums = collection.getAttributeStringCollection("WM/AlbumTitle", "Audio");
}