2015-01-30, 20:08
I'm trying to write addon which loads two subtitle files (top and bottom) when uses hits pause while watching video.
I am stuck with "Addon does not have correct structure". I've seen tutorials and everything seems to be ok but it's not.
addon.py
addon.xml
Can anyone help me? I just want it done because I like to watch and learn vocabulary. I watch videos in foreign language with subtitles and if I need to lookup some word I simply press space (pause) and got my native subs.
Thanks!
I am stuck with "Addon does not have correct structure". I've seen tutorials and everything seems to be ok but it's not.
Code:
$ uname -a
Linux PC 3.2.0-4-686-pae #1 SMP Debian 3.2.65-1+deb7u1 i686 GNU/Linux
$ xbmc --version
XBMC Media Center 13.2 Debian package version:2:13.2+dfsg1-3~bpo70+1
Copyright (C) 2005-2013 Team XBMC - http://xbmc.org
$ ls plugin.video.two_subs_pause
addon.py addon.xml changelog.txt icon.png LICENSE.txt
$ zip -r plugin.video.two_subs_pause-0.1.zip plugin.video.two_subs_pause
addon.py
Code:
import xbmc
class MyPlayer(xbmc.Player):
def __init__(self):
xbmc.Player.__init__(self)
def onPlayBackPaused(self):
xbmc.log('paused')
# ToDo: show two subtitles files
player = MyPlayer()
Code:
<?xml version="1.0" encoding="utf-8"?>
<addon id="plugin.video.two_subs_pause" version="0.1" name="two subtitles pause" provider-name="anonymous">
<requires></requires>
<extension point="xbmc.python.pluginsource" library="addon.py">
<provides>video</provides>
</extension>
<extension point="xbmc.addon.metadata">
<summary>Shows two subtitles on pause</summary>
<description>Shows two subtitles on pause</description>
<platform>all</platform>
</extension>
</addon>
Code:
http://speedy.sh/u4J9F/plugin.video.two-subs-pause-0.1.zip
Can anyone help me? I just want it done because I like to watch and learn vocabulary. I watch videos in foreign language with subtitles and if I need to lookup some word I simply press space (pause) and got my native subs.
Thanks!