XBMC插件开发

阅读: 评论:0

XBMC插件开发

XBMC插件开发

  • 介绍
本文介绍如何开发 XBMC插件。 Python库手册:/。 这里有一篇来自wiki的英文介绍:/view/HOW-TO_write_Python_Scripts_for_XBMC#XBMC_Python_Scripting_Tutorial
  • 目录结构
~/.xbmc/addons/ 在这个目录下通常会有三个文件&#l、hello.py、icon.png 分别是插件描述文件、主程序、图标文件(256x256) 下面是l一个示例: [codesyntax lang="xml"]
<?xml version="1.0" encoding="UTF-8"?>
<addon id="plugin.suren.system.fan"name="AutoFan"version="0.0.1"provider-name=""><extension point="xbmc.python.pluginsource" library="suren.py"><provides>Video</provides></extension><extension point="adata"><platform>all</platform><summary>suren hello world plugin</summary><summary lang="zh">suren hello world plugin</summary><description>plugin desc information</description><description lang="zh">plugin desc information</description><disclaimer>disclaimer</disclaimer></extension>
</addon>
[/codesyntax] 从上面的例子可以看到,对于插件的多语言是直接支持的。按照上面的目录结构打包成zip文件后即可发行。
  • API
先从一个例子说起: [codesyntax lang="python"]
# -*- coding: utf-8 -*-
# suren.pyimport xbmcplugin, xbmcguiurl=''handle=int(sys.argv[1])
listitem=xbmcgui.ListItem('Hello, World!')
xbmcplugin.addDirectoryItem(handle, url, listitem)
dOfDirectory(handle)
[/codesyntax]
  • 参考
.html

转载于:

本文发布于:2024-02-03 03:02:11,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/170690052948219.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:插件   XBMC
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23