本文整理汇总了C#中XBMCRPC类的典型用法代码示例。如果您正苦于以下问题:C# XBMCRPC类的具体用法?C# XBMCRPC怎么用?C# XBMCRPC使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XBMCRPC类属于命名空间,在下文中一共展示了XBMCRPC类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetEpisodes
/// <summary>
/// Retrieve all tv show episodes
/// </summary>
public async Task<XBMCRPC.VideoLibrary.GetEpisodesResponse> GetEpisodes(XBMCRPC.VideoLibrary.GetEpisodes_filterGenreid filter, int tvshowid=0, int season=0, XBMCRPC.Video.Fields.Episode properties=null, XBMCRPC.List.Limits limits=null, XBMCRPC.List.Sort sort=null)
{
var jArgs = new JObject();
if (tvshowid != null)
{
var jproptvshowid = JToken.FromObject(tvshowid, _client.Serializer);
jArgs.Add(new JProperty("tvshowid", jproptvshowid));
}
if (season != null)
{
var jpropseason = JToken.FromObject(season, _client.Serializer);
jArgs.Add(new JProperty("season", jpropseason));
}
if (properties != null)
{
var jpropproperties = JToken.FromObject(properties, _client.Serializer);
jArgs.Add(new JProperty("properties", jpropproperties));
}
if (limits != null)
{
var jproplimits = JToken.FromObject(limits, _client.Serializer);
jArgs.Add(new JProperty("limits", jproplimits));
}
if (sort != null)
{
var jpropsort = JToken.FromObject(sort, _client.Serializer);
jArgs.Add(new JProperty("sort", jpropsort));
}
if (filter != null)
{
var jpropfilter = JToken.FromObject(filter, _client.Serializer);
jArgs.Add(new JProperty("filter", jpropfilter));
}
return await _client.GetData<XBMCRPC.VideoLibrary.GetEpisodesResponse>("VideoLibrary.GetEpisodes", jArgs);
}
示例2: GetAlbums
/// <summary>
/// Retrieve all albums from specified artist or genre
/// </summary>
public async Task<XBMCRPC.AudioLibrary.GetAlbumsResponse> GetAlbums(XBMCRPC.AudioLibrary.GetAlbums_filterGenreid filter, XBMCRPC.Audio.Fields.Album properties=null, XBMCRPC.List.Limits limits=null, XBMCRPC.List.Sort sort=null)
{
var jArgs = new JObject();
if (properties != null)
{
var jpropproperties = JToken.FromObject(properties, _client.Serializer);
jArgs.Add(new JProperty("properties", jpropproperties));
}
if (limits != null)
{
var jproplimits = JToken.FromObject(limits, _client.Serializer);
jArgs.Add(new JProperty("limits", jproplimits));
}
if (sort != null)
{
var jpropsort = JToken.FromObject(sort, _client.Serializer);
jArgs.Add(new JProperty("sort", jpropsort));
}
if (filter != null)
{
var jpropfilter = JToken.FromObject(filter, _client.Serializer);
jArgs.Add(new JProperty("filter", jpropfilter));
}
return await _client.GetData<XBMCRPC.AudioLibrary.GetAlbumsResponse>("AudioLibrary.GetAlbums", jArgs);
}
示例3: Introspect
/// <summary>
/// Enumerates all actions and descriptions
/// </summary>
public async Task<XBMCRPC.JSONRPC.IntrospectResponse> Introspect(bool getdescriptions=false, bool getmetadata=false, bool filterbytransport=false, XBMCRPC.JSONRPC.Introspect_filter filter=null)
{
var jArgs = new JObject();
if (getdescriptions != null)
{
var jpropgetdescriptions = JToken.FromObject(getdescriptions, _client.Serializer);
jArgs.Add(new JProperty("getdescriptions", jpropgetdescriptions));
}
if (getmetadata != null)
{
var jpropgetmetadata = JToken.FromObject(getmetadata, _client.Serializer);
jArgs.Add(new JProperty("getmetadata", jpropgetmetadata));
}
if (filterbytransport != null)
{
var jpropfilterbytransport = JToken.FromObject(filterbytransport, _client.Serializer);
jArgs.Add(new JProperty("filterbytransport", jpropfilterbytransport));
}
if (filter != null)
{
var jpropfilter = JToken.FromObject(filter, _client.Serializer);
jArgs.Add(new JProperty("filter", jpropfilter));
}
return await _client.GetData<XBMCRPC.JSONRPC.IntrospectResponse>("JSONRPC.Introspect", jArgs);
}
示例4: AddFavourite
/// <summary>
/// Add a favourite with the given details
/// </summary>
public async Task<string> AddFavourite(string title=null, XBMCRPC.Favourite.Type type=0, string path=null, string window=null, string windowparameter=null, string thumbnail=null)
{
var jArgs = new JObject();
if (title != null)
{
var jproptitle = JToken.FromObject(title, _client.Serializer);
jArgs.Add(new JProperty("title", jproptitle));
}
if (type != null)
{
var jproptype = JToken.FromObject(type, _client.Serializer);
jArgs.Add(new JProperty("type", jproptype));
}
if (path != null)
{
var jproppath = JToken.FromObject(path, _client.Serializer);
jArgs.Add(new JProperty("path", jproppath));
}
if (window != null)
{
var jpropwindow = JToken.FromObject(window, _client.Serializer);
jArgs.Add(new JProperty("window", jpropwindow));
}
if (windowparameter != null)
{
var jpropwindowparameter = JToken.FromObject(windowparameter, _client.Serializer);
jArgs.Add(new JProperty("windowparameter", jpropwindowparameter));
}
if (thumbnail != null)
{
var jpropthumbnail = JToken.FromObject(thumbnail, _client.Serializer);
jArgs.Add(new JProperty("thumbnail", jpropthumbnail));
}
return await _client.GetData<string>("Favourites.AddFavourite", jArgs);
}
示例5: GetDirectory
/// <summary>
/// Get the directories and files in the given directory
/// </summary>
public async Task<XBMCRPC.Files.GetDirectoryResponse> GetDirectory(string directory=null, XBMCRPC.Files.Media media=0, XBMCRPC.List.Fields.Files properties=null, XBMCRPC.List.Sort sort=null, XBMCRPC.List.Limits limits=null)
{
var jArgs = new JObject();
if (directory != null)
{
var jpropdirectory = JToken.FromObject(directory, _client.Serializer);
jArgs.Add(new JProperty("directory", jpropdirectory));
}
if (media != null)
{
var jpropmedia = JToken.FromObject(media, _client.Serializer);
jArgs.Add(new JProperty("media", jpropmedia));
}
if (properties != null)
{
var jpropproperties = JToken.FromObject(properties, _client.Serializer);
jArgs.Add(new JProperty("properties", jpropproperties));
}
if (sort != null)
{
var jpropsort = JToken.FromObject(sort, _client.Serializer);
jArgs.Add(new JProperty("sort", jpropsort));
}
if (limits != null)
{
var jproplimits = JToken.FromObject(limits, _client.Serializer);
jArgs.Add(new JProperty("limits", jproplimits));
}
return await _client.GetData<XBMCRPC.Files.GetDirectoryResponse>("Files.GetDirectory", jArgs);
}
示例6: GetCurrentProfile
/// <summary>
/// Retrieve the current profile
/// </summary>
public async Task<XBMCRPC.Profiles.Details.Profile> GetCurrentProfile(XBMCRPC.Profiles.Fields.Profile properties=null)
{
var jArgs = new JObject();
if (properties != null)
{
var jpropproperties = JToken.FromObject(properties, _client.Serializer);
jArgs.Add(new JProperty("properties", jpropproperties));
}
return await _client.GetData<XBMCRPC.Profiles.Details.Profile>("Profiles.GetCurrentProfile", jArgs);
}
示例7: SetFullscreen
/// <summary>
/// Toggle fullscreen/GUI
/// </summary>
public async Task<bool> SetFullscreen(XBMCRPC.Global.Toggle2 fullscreen)
{
var jArgs = new JObject();
if (fullscreen != null)
{
var jpropfullscreen = JToken.FromObject(fullscreen, _client.Serializer);
jArgs.Add(new JProperty("fullscreen", jpropfullscreen));
}
return await _client.GetData<bool>("GUI.SetFullscreen", jArgs);
}
示例8: GetProperties
/// <summary>
/// Retrieves the values of the given properties
/// </summary>
public async Task<XBMCRPC.System.Property.Value> GetProperties(XBMCRPC.System.GetProperties_properties properties=null)
{
var jArgs = new JObject();
if (properties != null)
{
var jpropproperties = JToken.FromObject(properties, _client.Serializer);
jArgs.Add(new JProperty("properties", jpropproperties));
}
return await _client.GetData<XBMCRPC.System.Property.Value>("System.GetProperties", jArgs);
}
示例9: SetMute
/// <summary>
/// Toggle mute/unmute
/// </summary>
public async Task<bool> SetMute(XBMCRPC.Global.Toggle2 mute)
{
var jArgs = new JObject();
if (mute != null)
{
var jpropmute = JToken.FromObject(mute, _client.Serializer);
jArgs.Add(new JProperty("mute", jpropmute));
}
return await _client.GetData<bool>("Application.SetMute", jArgs);
}
示例10: Export
/// <summary>
/// Exports all items from the audio library
/// </summary>
public async Task<string> Export(XBMCRPC.AudioLibrary.Export_options1 options)
{
var jArgs = new JObject();
if (options != null)
{
var jpropoptions = JToken.FromObject(options, _client.Serializer);
jArgs.Add(new JProperty("options", jpropoptions));
}
return await _client.GetData<string>("AudioLibrary.Export", jArgs);
}
示例11: GetTextures
/// <summary>
/// Retrieve all textures
/// </summary>
public async Task<XBMCRPC.Textures.GetTexturesResponse> GetTextures(XBMCRPC.Textures.Fields.Texture properties=null)
{
var jArgs = new JObject();
if (properties != null)
{
var jpropproperties = JToken.FromObject(properties, _client.Serializer);
jArgs.Add(new JProperty("properties", jpropproperties));
}
return await _client.GetData<XBMCRPC.Textures.GetTexturesResponse>("Textures.GetTextures", jArgs);
}
示例12: ExecuteAction
/// <summary>
/// Execute a specific action
/// </summary>
public async Task<string> ExecuteAction(XBMCRPC.Input.Action action=0)
{
var jArgs = new JObject();
if (action != null)
{
var jpropaction = JToken.FromObject(action, _client.Serializer);
jArgs.Add(new JProperty("action", jpropaction));
}
return await _client.GetData<string>("Input.ExecuteAction", jArgs);
}
示例13: GetChannelGroupDetails
/// <summary>
/// Retrieves the details of a specific channel group
/// </summary>
public async Task<XBMCRPC.PVR.GetChannelGroupDetailsResponse> GetChannelGroupDetails(int channelgroupid, XBMCRPC.PVR.GetChannelGroupDetails_channels channels=null)
{
var jArgs = new JObject();
if (channelgroupid != null)
{
var jpropchannelgroupid = JToken.FromObject(channelgroupid, _client.Serializer);
jArgs.Add(new JProperty("channelgroupid", jpropchannelgroupid));
}
if (channels != null)
{
var jpropchannels = JToken.FromObject(channels, _client.Serializer);
jArgs.Add(new JProperty("channels", jpropchannels));
}
return await _client.GetData<XBMCRPC.PVR.GetChannelGroupDetailsResponse>("PVR.GetChannelGroupDetails", jArgs);
}
示例14: GetChannelDetails
/// <summary>
/// Retrieves the details of a specific channel
/// </summary>
public async Task<XBMCRPC.PVR.GetChannelDetailsResponse> GetChannelDetails(int channelid=0, XBMCRPC.PVR.Fields.Channel properties=null)
{
var jArgs = new JObject();
if (channelid != null)
{
var jpropchannelid = JToken.FromObject(channelid, _client.Serializer);
jArgs.Add(new JProperty("channelid", jpropchannelid));
}
if (properties != null)
{
var jpropproperties = JToken.FromObject(properties, _client.Serializer);
jArgs.Add(new JProperty("properties", jpropproperties));
}
return await _client.GetData<XBMCRPC.PVR.GetChannelDetailsResponse>("PVR.GetChannelDetails", jArgs);
}
示例15: GoTo
/// <summary>
/// Go to previous/next/specific item in the playlist
/// </summary>
public async Task<string> GoTo(XBMCRPC.Player.GoTo_to1 to, int playerid=0)
{
var jArgs = new JObject();
if (playerid != null)
{
var jpropplayerid = JToken.FromObject(playerid, _client.Serializer);
jArgs.Add(new JProperty("playerid", jpropplayerid));
}
if (to != null)
{
var jpropto = JToken.FromObject(to, _client.Serializer);
jArgs.Add(new JProperty("to", jpropto));
}
return await _client.GetData<string>("Player.GoTo", jArgs);
}