Thanks a lot for this great framework.
It helped me to accomplish my first add-on
Just 1 question, I'm having trouble running my plugin from command line on windows 7:
Code:
(xbmcswift2) C:\Users\peu141\Documents\Apps\xbmc\plugin.video.slbenfica.pt>xbmcs
wift2 run once
Traceback (most recent call last):
File "C:\Python27\Scripts\xbmcswift2-script.py", line 9, in <module>
load_entry_point('xbmcswift2==0.3.0', 'console_scripts', 'xbmcswift2')()
File "build\bdist.win-amd64\egg\pkg_resources.py", line 353, in load_entry_point
File "build\bdist.win-amd64\egg\pkg_resources.py", line 2302, in load_entry_point
File "build\bdist.win-amd64\egg\pkg_resources.py", line 2029, in load
File "C:\Python27\lib\site-packages\xbmcswift2-0.3.0-py2.7.egg\xbmcswift2\__init__.py", line 57, in <module>
from mockxbmc import xbmc, xbmcgui, xbmcplugin, xbmcaddon, xbmcvfs
File "C:\Python27\lib\site-packages\xbmcswift2-0.3.0-py2.7.egg\xbmcswift2\mockxbmc\xbmc.py", line 4, in <module>
from xbmcswift2.cli.create import get_value
File "C:\Python27\lib\site-packages\xbmcswift2-0.3.0-py2.7.egg\xbmcswift2\cli\create.py", line 12, in <module>
import readline
ImportError: No module named readline
EDIT: just fixed previous problem. Had to install pyreadline, along with BeautifulSoup on xbmcswift2 virtualenv
However it is triggering this error:
Code:
(xbmcswift2) C:\Users\peu141\Documents\Apps\xbmc\plugin.video.slbenfica.pt>xbmcs
wift2 run once
2014-01-30 11:38:59,855 - INFO - [xbmcswift2] Using temp directory c:\users\peu1
41\appdata\local\temp\xbmcswift2_debug
2014-01-30 11:38:59,997 - WARNING - [xbmcswift2] The getLanguage method has not
been implented on the CLI. Your code might not work properly when calling it.
2014-01-30 11:39:00,006 - INFO - [xbmcswift2] Request for "/" matches rule for f
unction "show_menu"
Traceback (most recent call last):
File "C:\Python27\Scripts\xbmcswift2-script.py", line 9, in <module>
load_entry_point('xbmcswift2==0.3.0', 'console_scripts', 'xbmcswift2')()
File "C:\Python27\lib\site-packages\xbmcswift2-0.3.0-py2.7.egg\xbmcswift2\cli\cli.py", line 76, in main
manager.run(opts, args[1:])
File "C:\Python27\lib\site-packages\xbmcswift2-0.3.0-py2.7.egg\xbmcswift2\cli\app.py", line 52, in run
plugin_mgr.run()
File "C:\Python27\lib\site-packages\xbmcswift2-0.3.0-py2.7.egg\xbmcswift2\cli\app.py", line 129, in run
return handler(self.plugin)
File "C:\Python27\lib\site-packages\xbmcswift2-0.3.0-py2.7.egg\xbmcswift2\cli\app.py", line 150, in once
items = plugin.run()
File "C:\Python27\lib\site-packages\xbmcswift2-0.3.0-py2.7.egg\xbmcswift2\plugin.py", line 332, in run
items = self._dispatch(self.request.path)
File "C:\Python27\lib\site-packages\xbmcswift2-0.3.0-py2.7.egg\xbmcswift2\plugin.py", line 306, in _dispatch
listitems = view_func(**items)
File "C:\Users\peu141\Documents\Apps\xbmc\plugin.video.slbenfica.pt\addon.py", line 158, in show_menu
{'label': __language__(30001), 'path': plugin.url_for('show_video_highlights
')},
File "C:\Python27\lib\site-packages\xbmcswift2-0.3.0-py2.7.egg\xbmcswift2\mockxbmc\xbmcaddon.py", line 32, in getLocalizedString
assert key in self._strings, 'id not found in English/strings.xml.'
AssertionError: id not found in English/strings.xml.
And I have this English/strings.xml:
Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<strings>
<!-- Menu labels -->
<string id="30001">Highlights</string>
<string id="30002">Videos</string>
<string id="30003">Photos</string>
<string id="30004">Stadium</string>
<string id="30005">Tickets</string>
<!-- Login Settings -->
<string id="30100">Login for http://www.slbenfica.pt</string>
<string id="30101">Username:</string>
<string id="30102">Password:</string>
</strings>