fixes
parent
73add38efc
commit
5e5a45aa22
|
@ -1,218 +0,0 @@
|
||||||
<window>
|
|
||||||
<coordinates>
|
|
||||||
<system>1</system>
|
|
||||||
<posx>240</posx>
|
|
||||||
<posy>20</posy>
|
|
||||||
</coordinates>
|
|
||||||
<include>dialogeffect</include>
|
|
||||||
<controls>
|
|
||||||
<control type="group">
|
|
||||||
<animation effect="fade" time="250">WindowOpen</animation>
|
|
||||||
<animation effect="fade" time="250">WindowClose</animation>
|
|
||||||
<control type="image">
|
|
||||||
<description>background image</description>
|
|
||||||
<posx>0</posx>
|
|
||||||
<posy>0</posy>
|
|
||||||
<width>800</width>
|
|
||||||
<height>680</height>
|
|
||||||
<texture border="40">ConfluenceDialogBack.png</texture>
|
|
||||||
</control>
|
|
||||||
<control type="image">
|
|
||||||
<description>Dialog Header image</description>
|
|
||||||
<posx>40</posx>
|
|
||||||
<posy>16</posy>
|
|
||||||
<width>720</width>
|
|
||||||
<height>40</height>
|
|
||||||
<texture>Confluencedialogheader.png</texture>
|
|
||||||
</control>
|
|
||||||
<control type="label" id="1">
|
|
||||||
<description>header label</description>
|
|
||||||
<posx>40</posx>
|
|
||||||
<posy>20</posy>
|
|
||||||
<width>720</width>
|
|
||||||
<height>30</height>
|
|
||||||
<font>font13_title</font>
|
|
||||||
<label>Информация о фильме</label>
|
|
||||||
<align>center</align>
|
|
||||||
<aligny>center</aligny>
|
|
||||||
<textcolor>selected</textcolor>
|
|
||||||
<shadowcolor>black</shadowcolor>
|
|
||||||
</control>
|
|
||||||
|
|
||||||
<control type="button" id="2">
|
|
||||||
<description>Close Window button</description>
|
|
||||||
<posx>710</posx>
|
|
||||||
<posy>15</posy>
|
|
||||||
<width>64</width>
|
|
||||||
<height>32</height>
|
|
||||||
<label>-</label>
|
|
||||||
<font>-</font>
|
|
||||||
<onclick>PreviousMenu</onclick>
|
|
||||||
<texturefocus>ConfluenceDialogCloseButton-focus.png</texturefocus>
|
|
||||||
<texturenofocus>ConfluenceDialogCloseButton.png</texturenofocus>
|
|
||||||
<onleft>10</onleft>
|
|
||||||
<onright>10</onright>
|
|
||||||
<onup>10</onup>
|
|
||||||
<ondown>10</ondown>
|
|
||||||
<visible>system.getbool(input.enablemouse)</visible>
|
|
||||||
</control>
|
|
||||||
|
|
||||||
<control type="scrollbar" id="60">
|
|
||||||
<posx>760</posx>
|
|
||||||
<posy>100</posy>
|
|
||||||
<width>25</width>
|
|
||||||
<height>495</height>
|
|
||||||
<texturesliderbackground border="0,14,0,14">ScrollBarV.png</texturesliderbackground>
|
|
||||||
<texturesliderbar border="0,14,0,14">ScrollBarV_bar.png</texturesliderbar>
|
|
||||||
<texturesliderbarfocus border="0,14,0,14">ScrollBarV_bar_focus.png</texturesliderbarfocus>
|
|
||||||
<textureslidernib>ScrollBarNib.png</textureslidernib>
|
|
||||||
<textureslidernibfocus>ScrollBarNib.png</textureslidernibfocus>
|
|
||||||
<onleft>30</onleft>
|
|
||||||
<onright>131</onright>
|
|
||||||
<showonepage>true</showonepage>
|
|
||||||
<visible>IntegerGreaterThan(Container(32).NumPages,1)</visible>
|
|
||||||
<orientation>vertical</orientation>
|
|
||||||
</control>
|
|
||||||
|
|
||||||
<control type="image" id="31">
|
|
||||||
<description>Dialog Header image</description>
|
|
||||||
<posx>33</posx>
|
|
||||||
<posy>85</posy>
|
|
||||||
<width>104</width>
|
|
||||||
<height>149</height>
|
|
||||||
<texture></texture>
|
|
||||||
</control>
|
|
||||||
|
|
||||||
<control type="label" id="34">
|
|
||||||
<description>rating</description>
|
|
||||||
<posx>34</posx>
|
|
||||||
<posy>240</posy>
|
|
||||||
<width>102</width>
|
|
||||||
<height>20</height>
|
|
||||||
<visible>true</visible>
|
|
||||||
<align>left</align>
|
|
||||||
<aligny>center</aligny>
|
|
||||||
<scroll>false</scroll>
|
|
||||||
<label></label>
|
|
||||||
<haspath>false</haspath>
|
|
||||||
<font>font10</font>
|
|
||||||
<textcolor>white</textcolor>
|
|
||||||
<shadowcolor>black</shadowcolor>
|
|
||||||
<wrapmultiline>false</wrapmultiline>
|
|
||||||
</control>
|
|
||||||
|
|
||||||
<control type="label" id="35">
|
|
||||||
<description>rating</description>
|
|
||||||
<posx>34</posx>
|
|
||||||
<posy>260</posy>
|
|
||||||
<width>102</width>
|
|
||||||
<height>20</height>
|
|
||||||
<visible>true</visible>
|
|
||||||
<align>left</align>
|
|
||||||
<aligny>center</aligny>
|
|
||||||
<scroll>false</scroll>
|
|
||||||
<label>[COLOR blue]Рейтинг:[/COLOR] [COLOR red]-200[/COLOR]</label>
|
|
||||||
<haspath>false</haspath>
|
|
||||||
<font>font10</font>
|
|
||||||
<textcolor>white</textcolor>
|
|
||||||
<shadowcolor>black</shadowcolor>
|
|
||||||
<wrapmultiline>false</wrapmultiline>
|
|
||||||
</control>
|
|
||||||
|
|
||||||
<control type="image" id="36">
|
|
||||||
<description>kinopoisk</description>
|
|
||||||
<posx>34</posx>
|
|
||||||
<posy>292</posy>
|
|
||||||
<width>102</width>
|
|
||||||
<height>38</height>
|
|
||||||
<texture></texture>
|
|
||||||
</control>
|
|
||||||
|
|
||||||
<control type="textbox" id="32">
|
|
||||||
<description>filepath</description>
|
|
||||||
<posx>180</posx>
|
|
||||||
<posy>70</posy>
|
|
||||||
<width>550</width>
|
|
||||||
<pagecontrol>60</pagecontrol>
|
|
||||||
<height max="470">470</height>
|
|
||||||
<align>left</align>
|
|
||||||
<aligny>top</aligny>
|
|
||||||
<font>font18</font>
|
|
||||||
<text>Нет описания</text>
|
|
||||||
<align>center</align>
|
|
||||||
<aligny>center</aligny>
|
|
||||||
<textcolor>white</textcolor>
|
|
||||||
<shadowcolor>black</shadowcolor>
|
|
||||||
<wrapmultiline>true</wrapmultiline>
|
|
||||||
</control>
|
|
||||||
<control type="group" id="9001">
|
|
||||||
<posy>615</posy>
|
|
||||||
<posx>50</posx>
|
|
||||||
|
|
||||||
<control type="button" id="22">
|
|
||||||
<description>close</description>
|
|
||||||
<posx>350</posx>
|
|
||||||
<posy>0</posy>
|
|
||||||
<width>320</width>
|
|
||||||
<height>40</height>
|
|
||||||
<align>center</align>
|
|
||||||
<aligny>center</aligny>
|
|
||||||
<font>font12_title</font>
|
|
||||||
<label></label>
|
|
||||||
<onleft>33</onleft>
|
|
||||||
<onright>60</onright>
|
|
||||||
<onup>30</onup>
|
|
||||||
<ondown>30</ondown>
|
|
||||||
</control>
|
|
||||||
|
|
||||||
<control type="button" id="131">
|
|
||||||
<description>play</description>
|
|
||||||
<posx>20</posx>
|
|
||||||
<posy>-50</posy>
|
|
||||||
<width>320</width>
|
|
||||||
<height>40</height>
|
|
||||||
<align>center</align>
|
|
||||||
<aligny>center</aligny>
|
|
||||||
<font>font12_title</font>
|
|
||||||
<label></label>
|
|
||||||
<onleft>60</onleft>
|
|
||||||
<onright>30</onright>
|
|
||||||
<onup>33</onup>
|
|
||||||
<ondown>33</ondown>
|
|
||||||
</control>
|
|
||||||
|
|
||||||
<control type="button" id="30">
|
|
||||||
<description>libtorrent</description>
|
|
||||||
<posx>350</posx>
|
|
||||||
<posy>-50</posy>
|
|
||||||
<width>320</width>
|
|
||||||
<height>40</height>
|
|
||||||
<align>center</align>
|
|
||||||
<aligny>center</aligny>
|
|
||||||
<font>font12_title</font>
|
|
||||||
<label></label>
|
|
||||||
<onleft>131</onleft>
|
|
||||||
<onright>60</onright>
|
|
||||||
<onup>22</onup>
|
|
||||||
<ondown>22</ondown>
|
|
||||||
</control>
|
|
||||||
|
|
||||||
<control type="button" id="33">
|
|
||||||
<description>tclient</description>
|
|
||||||
<posx>20</posx>
|
|
||||||
<posy>0</posy>
|
|
||||||
<width>320</width>
|
|
||||||
<height>40</height>
|
|
||||||
<align>center</align>
|
|
||||||
<aligny>center</aligny>
|
|
||||||
<font>font12_title</font>
|
|
||||||
<label>T-client</label>
|
|
||||||
<onleft>22</onleft>
|
|
||||||
<onright>22</onright>
|
|
||||||
<onup>131</onup>
|
|
||||||
<ondown>131</ondown>
|
|
||||||
</control>
|
|
||||||
</control>
|
|
||||||
</control>
|
|
||||||
</controls>
|
|
||||||
</window>
|
|
|
@ -1,127 +0,0 @@
|
||||||
<window>
|
|
||||||
<coordinates>
|
|
||||||
<system>1</system>
|
|
||||||
<posx>240</posx>
|
|
||||||
<posy>20</posy>
|
|
||||||
</coordinates>
|
|
||||||
<include>dialogeffect</include>
|
|
||||||
<controls>
|
|
||||||
<control type="group">
|
|
||||||
<animation effect="fade" time="250">WindowOpen</animation>
|
|
||||||
<animation effect="fade" time="250">WindowClose</animation>
|
|
||||||
<control type="image">
|
|
||||||
<description>background image</description>
|
|
||||||
<posx>0</posx>
|
|
||||||
<posy>0</posy>
|
|
||||||
<width>800</width>
|
|
||||||
<height>680</height>
|
|
||||||
<texture border="40">DialogBack.png</texture>
|
|
||||||
</control>
|
|
||||||
<control type="image">
|
|
||||||
<description>Dialog Header image</description>
|
|
||||||
<posx>40</posx>
|
|
||||||
<posy>16</posy>
|
|
||||||
<width>720</width>
|
|
||||||
<height>40</height>
|
|
||||||
<texture>dialogheader.png</texture>
|
|
||||||
</control>
|
|
||||||
<control type="label" id="1">
|
|
||||||
<description>header label</description>
|
|
||||||
<posx>40</posx>
|
|
||||||
<posy>20</posy>
|
|
||||||
<width>720</width>
|
|
||||||
<height>30</height>
|
|
||||||
<font>font13_title</font>
|
|
||||||
<label>Отзывы о фильме</label>
|
|
||||||
<align>center</align>
|
|
||||||
<aligny>center</aligny>
|
|
||||||
<textcolor>selected</textcolor>
|
|
||||||
<shadowcolor>black</shadowcolor>
|
|
||||||
</control>
|
|
||||||
|
|
||||||
<control type="button" id="2">
|
|
||||||
<description>Close Window button</description>
|
|
||||||
<posx>710</posx>
|
|
||||||
<posy>15</posy>
|
|
||||||
<width>64</width>
|
|
||||||
<height>32</height>
|
|
||||||
<label>-</label>
|
|
||||||
<font>-</font>
|
|
||||||
<onclick>PreviousMenu</onclick>
|
|
||||||
<texturefocus>DialogCloseButton-focus.png</texturefocus>
|
|
||||||
<texturenofocus>DialogCloseButton.png</texturenofocus>
|
|
||||||
<onleft>10</onleft>
|
|
||||||
<onright>10</onright>
|
|
||||||
<onup>10</onup>
|
|
||||||
<ondown>10</ondown>
|
|
||||||
<visible>system.getbool(input.enablemouse)</visible>
|
|
||||||
</control>
|
|
||||||
|
|
||||||
<control type="scrollbar" id="60">
|
|
||||||
<posx>760</posx>
|
|
||||||
<posy>100</posy>
|
|
||||||
<width>25</width>
|
|
||||||
<height>495</height>
|
|
||||||
<texturesliderbackground border="0,14,0,14">ScrollBarV.png</texturesliderbackground>
|
|
||||||
<texturesliderbar border="0,14,0,14">ScrollBarV_bar.png</texturesliderbar>
|
|
||||||
<texturesliderbarfocus border="0,14,0,14">ScrollBarV_bar_focus.png</texturesliderbarfocus>
|
|
||||||
<textureslidernib>ScrollBarNib.png</textureslidernib>
|
|
||||||
<textureslidernibfocus>ScrollBarNib.png</textureslidernibfocus>
|
|
||||||
<onleft>22</onleft>
|
|
||||||
<onright>22</onright>
|
|
||||||
<showonepage>true</showonepage>
|
|
||||||
<visible>IntegerGreaterThan(Container(32).NumPages,1)</visible>
|
|
||||||
<orientation>vertical</orientation>
|
|
||||||
</control>
|
|
||||||
|
|
||||||
<control type="image" id="31">
|
|
||||||
<description>Dialog Header image</description>
|
|
||||||
<posx>33</posx>
|
|
||||||
<posy>85</posy>
|
|
||||||
<width>104</width>
|
|
||||||
<height>149</height>
|
|
||||||
<texture></texture>
|
|
||||||
</control>
|
|
||||||
|
|
||||||
|
|
||||||
<control type="textbox" id="32">
|
|
||||||
<description>filepath</description>
|
|
||||||
<posx>60</posx>
|
|
||||||
<posy>70</posy>
|
|
||||||
<width>690</width>
|
|
||||||
<pagecontrol>60</pagecontrol>
|
|
||||||
<height max="530">530</height>
|
|
||||||
<align>left</align>
|
|
||||||
<aligny>top</aligny>
|
|
||||||
<font>font12</font>
|
|
||||||
<text>Нет отзывов</text>
|
|
||||||
<align>center</align>
|
|
||||||
<aligny>center</aligny>
|
|
||||||
<textcolor>white</textcolor>
|
|
||||||
<shadowcolor>black</shadowcolor>
|
|
||||||
<wrapmultiline>true</wrapmultiline>
|
|
||||||
</control>
|
|
||||||
<control type="group" id="9001">
|
|
||||||
<posy>615</posy>
|
|
||||||
<posx>50</posx>
|
|
||||||
|
|
||||||
<control type="button" id="22">
|
|
||||||
<description>close</description>
|
|
||||||
<posx>20</posx>
|
|
||||||
<posy>0</posy>
|
|
||||||
<width>650</width>
|
|
||||||
<height>40</height>
|
|
||||||
<align>center</align>
|
|
||||||
<aligny>center</aligny>
|
|
||||||
<font>font12_title</font>
|
|
||||||
<label>Закрыть окно</label>
|
|
||||||
<onleft>60</onleft>
|
|
||||||
<onright>60</onright>
|
|
||||||
<onup>60</onup>
|
|
||||||
<ondown>60</ondown>
|
|
||||||
</control>
|
|
||||||
|
|
||||||
</control>
|
|
||||||
</control>
|
|
||||||
</controls>
|
|
||||||
</window>
|
|
Binary file not shown.
Before Width: | Height: | Size: 8.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.8 KiB |
|
@ -1,63 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import re
|
|
||||||
import htmlentitydefs
|
|
||||||
|
|
||||||
import xbmcgui
|
|
||||||
|
|
||||||
pattern = re.compile("&(\w+?);")
|
|
||||||
|
|
||||||
def html_entity_decode_char(m, defs=htmlentitydefs.entitydefs):
|
|
||||||
try:
|
|
||||||
return defs[m.group(1)]
|
|
||||||
except KeyError:
|
|
||||||
return m.group(0)
|
|
||||||
|
|
||||||
def html_entity_decode(string):
|
|
||||||
return pattern.sub(html_entity_decode_char, string)
|
|
||||||
|
|
||||||
KEY_BUTTON_BACK = 275
|
|
||||||
KEY_KEYBOARD_ESC = 61467
|
|
||||||
ACTION_PREVIOUS_MENU = 10
|
|
||||||
ACTION_NAV_BACK = 92
|
|
||||||
class DialogReviews(xbmcgui.WindowXMLDialog):
|
|
||||||
def onInit(self):
|
|
||||||
print "DialogReviews(): Window Initialized"
|
|
||||||
self.reviews_box = self.getControl(32)
|
|
||||||
self.reviews_box.setText(self.get_reviews())
|
|
||||||
|
|
||||||
self.setFocus(self.getControl(22))
|
|
||||||
|
|
||||||
def onAction(self, action):
|
|
||||||
buttonCode = action.getButtonCode()
|
|
||||||
if (action == ACTION_NAV_BACK or action == ACTION_PREVIOUS_MENU):
|
|
||||||
self.close()
|
|
||||||
if (buttonCode == KEY_BUTTON_BACK or buttonCode == KEY_KEYBOARD_ESC):
|
|
||||||
self.close()
|
|
||||||
|
|
||||||
def onClick(self, controlID):
|
|
||||||
if (controlID == 2 or controlID == 22):
|
|
||||||
self.close()
|
|
||||||
|
|
||||||
|
|
||||||
def onFocus(self, controlID):
|
|
||||||
#print "onFocus(): control %i" % controlID
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def doModal(self, movieHtml):
|
|
||||||
self.movieHtml = movieHtml
|
|
||||||
xbmcgui.WindowXMLDialog.doModal(self)
|
|
||||||
|
|
||||||
|
|
||||||
def get_reviews(self):
|
|
||||||
reviews_texts = re.compile('<div class="comment" id="[^"]+">([^<]+)</div>',re.S).findall(self.movieHtml)
|
|
||||||
reviews_autors = re.compile('<div class="member"><a href="[^"]+"><strong>([^<]+)</strong></a></div>',re.S).findall(self.movieHtml)
|
|
||||||
reviews_dates = re.compile('<div class="date">([^<]+)</div>',re.S).findall(self.movieHtml)
|
|
||||||
texts = ''
|
|
||||||
i = 0
|
|
||||||
for text in reviews_texts:
|
|
||||||
texts = texts+"\n[B][COLOR purple]"+reviews_autors[i]+"[/COLOR][/B] [I]"+reviews_dates[i]+"[/I]\n"
|
|
||||||
texts = texts+html_entity_decode(text)+"\n"
|
|
||||||
i = i + 1
|
|
||||||
return texts
|
|
|
@ -1,83 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import sys
|
|
||||||
|
|
||||||
import xbmcgui
|
|
||||||
import Localization
|
|
||||||
import xbmc
|
|
||||||
|
|
||||||
KEY_BUTTON_BACK = 275
|
|
||||||
KEY_KEYBOARD_ESC = 61467
|
|
||||||
ACTION_PREVIOUS_MENU = 10
|
|
||||||
ACTION_NAV_BACK = 92
|
|
||||||
|
|
||||||
|
|
||||||
class DialogXml(xbmcgui.WindowXMLDialog):
|
|
||||||
def onInit(self):
|
|
||||||
print "onInit(): Window Initialized"
|
|
||||||
localize = Localization.localize
|
|
||||||
color = '[COLOR %s]%s[/COLOR]'
|
|
||||||
self.movie_label = self.getControl(32)
|
|
||||||
self.movie_label.setText(self.movieInfo['desc'])
|
|
||||||
|
|
||||||
if self.movieInfo.get('views'):
|
|
||||||
self.view_label = self.getControl(34)
|
|
||||||
self.view_label.setLabel(color % ('blue', localize('Views:')) + self.movieInfo['views'])
|
|
||||||
|
|
||||||
self.view_label = self.getControl(35)
|
|
||||||
self.ratingcolor = 'green'
|
|
||||||
self.ratingint = int(self.movieInfo['rating'])
|
|
||||||
if (self.ratingint < 70):
|
|
||||||
self.ratingcolor = 'red'
|
|
||||||
self.view_label.setLabel(
|
|
||||||
color % ('blue', localize('Rating:')) + color % (self.ratingcolor, self.movieInfo['rating']))
|
|
||||||
|
|
||||||
self.movie_label = self.getControl(1)
|
|
||||||
self.movie_label.setLabel(self.movieInfo['title'])
|
|
||||||
|
|
||||||
self.movie_label = self.getControl(32)
|
|
||||||
self.movie_label.setText(self.movieInfo['desc'])
|
|
||||||
|
|
||||||
self.poster = self.getControl(31)
|
|
||||||
self.poster.setImage(self.movieInfo['poster'])
|
|
||||||
|
|
||||||
self.poster = self.getControl(36)
|
|
||||||
self.poster.setImage(self.movieInfo['kinopoisk'])
|
|
||||||
self.getControl(22).setLabel(localize('Close'))
|
|
||||||
self.getControl(33).setLabel(localize('Download via T-client'))
|
|
||||||
self.getControl(30).setLabel(localize('Download via Libtorrent'))
|
|
||||||
self.getControl(131).setLabel(localize('Play'))
|
|
||||||
|
|
||||||
self.setFocus(self.getControl(22))
|
|
||||||
|
|
||||||
def onAction(self, action):
|
|
||||||
buttonCode = action.getButtonCode()
|
|
||||||
if (action == ACTION_NAV_BACK or action == ACTION_PREVIOUS_MENU):
|
|
||||||
self.close()
|
|
||||||
if (buttonCode == KEY_BUTTON_BACK or buttonCode == KEY_KEYBOARD_ESC):
|
|
||||||
self.close()
|
|
||||||
|
|
||||||
def onClick(self, controlID):
|
|
||||||
if (controlID == 2 or controlID == 22):
|
|
||||||
self.close()
|
|
||||||
if (controlID == 30):
|
|
||||||
self.RunPlugin('downloadLibtorrent')
|
|
||||||
if (controlID == 33):
|
|
||||||
self.RunPlugin('downloadFilesList')
|
|
||||||
if (controlID == 131):
|
|
||||||
self.RunPlugin('openTorrent&external=1')
|
|
||||||
|
|
||||||
def RunPlugin(self, action):
|
|
||||||
if self.link:
|
|
||||||
exec_str = 'XBMC.RunPlugin(%s)' % \
|
|
||||||
('%s?action=%s&url=%s') % \
|
|
||||||
(sys.argv[0], action, self.link)
|
|
||||||
xbmc.executebuiltin(exec_str)
|
|
||||||
|
|
||||||
def onFocus(self, controlID):
|
|
||||||
# print "onFocus(): control %i" % controlID
|
|
||||||
pass
|
|
||||||
|
|
||||||
def doModal(self, movieInfo, url):
|
|
||||||
self.movieInfo = movieInfo
|
|
||||||
self.link = url
|
|
||||||
xbmcgui.WindowXMLDialog.doModal(self)
|
|
|
@ -99,7 +99,8 @@ class SearchWindow(pyxbmct.AddonDialogWindow):
|
||||||
'last_query': None,
|
'last_query': None,
|
||||||
'last_link': None,
|
'last_link': None,
|
||||||
'last_filename': None,
|
'last_filename': None,
|
||||||
'route': [{'mode': 'close', 'params': {}, 'last_listing_item': 0}]
|
'route': [{'mode': 'close', 'params': {}, 'last_listing_item': 0},
|
||||||
|
{"last_listing_item": 0, "params": {}, "mode": "history"}]
|
||||||
}
|
}
|
||||||
|
|
||||||
def set_controls(self):
|
def set_controls(self):
|
||||||
|
|
Loading…
Reference in New Issue