01.8.2017, 13:39
zdravím pánové .... co ta chyba dá se nějak opravit? Bádali jste?
Hodnocení tématu:
Estuary Easy
|
def fetchUrl(url, label):
logDbg("fetchUrl " + url + ", label:" + label)
# pDialog = xbmcgui.DialogProgress()
# pDialog.create(_dialogTitle_, label)
httpdata = ''
try:
resp = urllib2.urlopen(url)
size = resp.info().getheader('Content-Length', 9000)
count=0
for line in resp:
# if pDialog.iscanceled():
# resp.close()
# pDialog.close()
# return None
count += len(line)
httpdata += line
percentage = int((float(count)/float(size))*100)
# pDialog.update(percentage)
except:
httpdata = None
showErrorNotification(_lang_(30002))
finally:
resp.close()
# pDialog.close()
return httpdata
<include name="UserRatingCircle">
<definition>
<control type="group">
<visible>String.IsEmpty(ListItem.Rating) + !String.IsEmpty(ListItem.UserRating)</visible>
<animation effect="fade" time="0">VisibleChange</animation>
<control type="image">
<left>3</left>
<top>-3</top>
<width>44</width>
<height>44</height>
<aspectratio>keep</aspectratio>
<texture colordiffuse="button_focus">overlays/badge.png</texture>
</control>
<control type="label">
<left>3</left>
<top>-3</top>
<align>center</align>
<aligny>center</aligny>
<width>44</width>
<height>44</height>
<font>font20_title</font>
<label>$INFO[ListItem.UserRating]</label>
</control>
</control>
<control type="group">
<visible>!String.IsEmpty(ListItem.Rating) + String.IsEmpty(ListItem.UserRating)</visible>
<animation effect="fade" time="0">VisibleChange</animation>
<control type="image">
<left>3</left>
<top>-3</top>
<width>44</width>
<height>44</height>
<aspectratio>keep</aspectratio>
<texture colordiffuse="red">overlays/badge.png</texture>
</control>
<control type="label">
<left>3</left>
<top>-3</top>
<align>center</align>
<aligny>center</aligny>
<width>44</width>
<height>44</height>
<font>font20_title</font>
<label>$INFO[ListItem.Rating]</label>
</control>
</control>
<control type="group">
<visible>!String.IsEmpty(ListItem.UserRating) + !String.IsEmpty(ListItem.Rating)</visible>
<animation effect="fade" time="0">VisibleChange</animation>
<control type="image">
<left>-23</left>
<top>-3</top>
<width>44</width>
<height>44</height>
<aspectratio>keep</aspectratio>
<texture colordiffuse="red">overlays/badge.png</texture>
</control>
<control type="label">
<left>-23</left>
<top>-3</top>
<align>center</align>
<aligny>center</aligny>
<width>44</width>
<height>44</height>
<font>font20_title</font>
<label>$INFO[ListItem.Rating]</label>
</control>
<control type="image">
<left>26</left>
<top>-3</top>
<width>44</width>
<height>44</height>
<aspectratio>keep</aspectratio>
<texture colordiffuse="button_focus">overlays/badge.png</texture>
</control>
<control type="label">
<left>26</left>
<top>-3</top>
<align>center</align>
<aligny>center</aligny>
<width>44</width>
<height>44</height>
<font>font20_title</font>
<label>$INFO[ListItem.UserRating]</label>
</control>
</control>
</definition>
</include>
<include content="InfoDialogButton">
<param name="id" value="6" />
<param name="icon" value="icons/infodialogs/update.png" />
<param name="label" value="$LOCALIZE[184]" />
<param name="visible" value="Control.IsEnabled(6)" />
</include>
<include content="InfoDialogButton">
<param name="id" value="999" />
<param name="icon" value="icons/infodialogs/info.png" />
<param name="label" value="Items" />
</include>
<control type="label">
<right>80</right>
<top>970</top>
<align>right</align>
<width>1400</width>
<height>44</height>
<font>font20_title</font>
<textcolor>99FFFFFF</textcolor>
<shadowcolor>text_shadow</shadowcolor>
<haspath>true</haspath>
<label>$INFO[ListItem.FileNameANdPath]</label>
<visible>Control.HasFocus(6)</visible>
<animation effect="fade" start="0" end="100" time="300" delay="300">WindowOpen</animation>
<animation effect="fade" start="100" end="0" time="200">WindowClose</animation>
<animation effect="fade" start="0" end="100" time="300">Visible</animation>
<animation effect="fade" start="100" end="0" time="200">Hidden</animation>
</control>
<control type="group">
<top>158</top>
<left>640</left>
<visible>Control.HasFocus(999)</visible>
<control type="image">
<width>1206</width>
<height>678</height>
<texture>colors/black.png</texture>
</control>
<control type="grouplist">
<top>0</top>
<left>10</left>
<width>auto</width>
<shadowcolor>text_shadow</shadowcolor>
<orientation>vertical</orientation>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]Content: [/COLOR]$INFO[Container.Content]</label>
</control>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]Title: [/COLOR]$INFO[ListItem.Title] [COLOR button_focus]Year: [/COLOR]$INFO[ListItem.Year]</label>
</control>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]IMDBNumber: [/COLOR]$INFO[ListItem.IMDBNumber] [COLOR button_focus]DBID: [/COLOR]$INFO[ListItem.DBID]</label>
</control>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]OriginalTitle: [/COLOR]$INFO[Original.Title]</label>
</control>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]Label: [/COLOR]$INFO[ListItem.Label]</label>
</control>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]Label2: [/COLOR]$INFO[ListItem.Label2]</label>
</control>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]Tag: [/COLOR]$INFO[ListItem.Tag]</label>
</control>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]FileName: [/COLOR]$INFO[ListItem.FileName]</label>
</control>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]Path: [/COLOR]$INFO[ListItem.Path]</label>
</control>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]Duration: [/COLOR]$INFO[ListItem.Duration] [COLOR button_focus]Size: [/COLOR]$INFO[ListItem.Size]</label>
</control>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]Trailer: [/COLOR]$INFO[ListItem.Trailer]</label>
</control>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]Set: [/COLOR]$INFO[ListItem.Set] [COLOR button_focus]SetId: [/COLOR]$INFO[ListItem.SetId]</label>
</control>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]Rating: [/COLOR]$INFO[ListItem.Rating] [COLOR button_focus]UserRating: [/COLOR]$INFO[ListItem.UserRating]</label>
</control>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]Votes: [/COLOR]$INFO[ListItem.Votes] [COLOR button_focus]RatingAndVotes: [/COLOR]$INFO[ListItem.RatingAndVotes] [COLOR button_focus]Mpaa: [/COLOR]$INFO[ListItem.ListItem.Mpaa]</label>
</control>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]DateAdded: [/COLOR]$INFO[ListItem.DateAdded] [COLOR button_focus]Date: [/COLOR]$INFO[ListItem.Date]</label>
</control>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]PercentPlayed: [/COLOR]$INFO[ListItem.PercentPlayed] [COLOR button_focus]LastPlayed: [/COLOR]$INFO[ListItem.LastPlayed] [COLOR button_focus]PlayCount: [/COLOR]$INFO[ListItem.PlayCount]</label>
</control>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]VideoCodec: [/COLOR]$INFO[ListItem.VideoCodec] [COLOR button_focus]VideoResolution: [/COLOR]$INFO[ListItem.VideoResolution] [COLOR button_focus]VideoAspect: [/COLOR]$INFO[ListItem.VideoAspect]</label>
</control>
<control type="label">
<height>35</height>
<label>[COLOR button_focus]AudioCodec: [/COLOR]$INFO[ListItem.AudioCodec] [COLOR button_focus]AudioChannels: [/COLOR]$INFO[ListItem.AudioChannels] [COLOR button_focus]AudioLanguage: [/COLOR]$INFO[ListItem.AudioLanguage] [COLOR button_focus]SubtitleLanguage: [/COLOR]$INFO[ListItem.SubtitleLanguage]</label>
</control>
</control>
</control>
<include content="InfoDialogButton">
<param name="id" value="8" />
<param name="icon" value="icons/infodialogs/play.png" />
<param name="label" value="$LOCALIZE[208]" />
</include>
<include content="InfoDialogButton">
<param name="id" value="998" />
<param name="icon" value="defaultaddonwebskin.png" />
<param name="label" value="IMDB" />
<param name="onclick_1" value="RunAddon(browser.chromium,http://www.imdb.com/title/$INFO[ListItem.IMDBNumber])/" />
<param name="visible" value="System.hasAddon(browser.chromium) + String.IsEqual(Container.Content,movies) + !String.IsEmpty(ListItem.IMDBNumber) + String.StartsWith(ListItem.IMDBNumber,tt)" />
</include>