Revert "Ricerca Globale Risultati Verificati raggruppati"
This reverts commit d877f983
This commit is contained in:
@@ -282,18 +282,18 @@ class SearchWindow(xbmcgui.WindowXML):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
self.count += 1
|
self.count += 1
|
||||||
self.update(channel, valid, other if other else results)
|
if self.item.mode == 'all': self.update(channel, results)
|
||||||
|
else: self.update(channel, valid + other)
|
||||||
|
|
||||||
def makeItem(self, url):
|
def makeItem(self, url):
|
||||||
item = Item().fromurl(url)
|
item = Item().fromurl(url)
|
||||||
logger.debug()
|
logger.debug()
|
||||||
channelParams = channeltools.get_channel_parameters(item.channel)
|
|
||||||
thumb = item.thumbnail if item.thumbnail else 'Infoplus/' + item.contentType.replace('show', '') + '.png'
|
thumb = item.thumbnail if item.thumbnail else 'Infoplus/' + item.contentType.replace('show', '') + '.png'
|
||||||
logger.info('THUMB', thumb)
|
logger.info('THUMB', thumb)
|
||||||
it = xbmcgui.ListItem(item.title)
|
it = xbmcgui.ListItem(item.title)
|
||||||
it.setProperties({'thumb': thumb, 'fanart': item.fanart, 'verified': item.verified, 'plot': item.plot,
|
it.setProperties({'thumb': thumb, 'fanart': item.fanart, 'verified': item.verified, 'plot': item.plot,
|
||||||
'year': '[' + str(item.year if item.year else item.infoLabels.get('year', '')) + ']',
|
'year': '[' + str(item.year if item.year else item.infoLabels.get('year', '')) + ']',
|
||||||
'item': url, 'channel':channelParams['title']})
|
'item': url})
|
||||||
if item.server:
|
if item.server:
|
||||||
color = scrapertools.find_single_match(item.alive, r'(FF[^\]]+)')
|
color = scrapertools.find_single_match(item.alive, r'(FF[^\]]+)')
|
||||||
it.setProperties({'channel': channeltools.get_channel_parameters(item.channel).get('title', ''),
|
it.setProperties({'channel': channeltools.get_channel_parameters(item.channel).get('title', ''),
|
||||||
@@ -303,35 +303,10 @@ class SearchWindow(xbmcgui.WindowXML):
|
|||||||
|
|
||||||
return it
|
return it
|
||||||
|
|
||||||
def update(self, channel, valid, results):
|
def update(self, channel, results):
|
||||||
if self.exit:
|
if self.exit:
|
||||||
return
|
return
|
||||||
logger.debug('Search on channel', channel)
|
logger.debug('Search on channel', channel)
|
||||||
if self.item.mode != 'all' and 'valid' not in self.results:
|
|
||||||
self.results['valid'] = 0
|
|
||||||
item = xbmcgui.ListItem('valid')
|
|
||||||
item.setProperties({'thumb': 'valid.png',
|
|
||||||
'position': '0',
|
|
||||||
'results': '0'})
|
|
||||||
self.channels.append(item)
|
|
||||||
pos = self.CHANNELS.getSelectedPosition()
|
|
||||||
self.CHANNELS.reset()
|
|
||||||
self.CHANNELS.addItems(self.channels)
|
|
||||||
self.CHANNELS.selectItem(pos)
|
|
||||||
self.setFocusId(CHANNELS)
|
|
||||||
if valid:
|
|
||||||
item = self.CHANNELS.getListItem(0)
|
|
||||||
resultsList = item.getProperty('items')
|
|
||||||
for result in valid:
|
|
||||||
resultsList += result.tourl() + '|'
|
|
||||||
item.setProperty('items',resultsList)
|
|
||||||
self.channels[0].setProperty('results', str(len(resultsList.split('|')) - 1))
|
|
||||||
channelResults = self.CHANNELS.getListItem(0).getProperty('items').split('|')
|
|
||||||
items = []
|
|
||||||
for result in channelResults:
|
|
||||||
if result: items.append(self.makeItem(result))
|
|
||||||
self.RESULTS.reset()
|
|
||||||
self.RESULTS.addItems(items)
|
|
||||||
if results:
|
if results:
|
||||||
resultsList = ''
|
resultsList = ''
|
||||||
channelParams = channeltools.get_channel_parameters(channel)
|
channelParams = channeltools.get_channel_parameters(channel)
|
||||||
@@ -341,7 +316,8 @@ class SearchWindow(xbmcgui.WindowXML):
|
|||||||
item = xbmcgui.ListItem(name)
|
item = xbmcgui.ListItem(name)
|
||||||
item.setProperties({'thumb': channelParams['thumbnail'],
|
item.setProperties({'thumb': channelParams['thumbnail'],
|
||||||
'position': '0',
|
'position': '0',
|
||||||
'results': str(len(results))
|
'results': str(len(results)),
|
||||||
|
'verified': results[0].verified
|
||||||
})
|
})
|
||||||
for result in results:
|
for result in results:
|
||||||
resultsList += result.tourl() + '|'
|
resultsList += result.tourl() + '|'
|
||||||
@@ -367,7 +343,6 @@ class SearchWindow(xbmcgui.WindowXML):
|
|||||||
if result: items.append(self.makeItem(result))
|
if result: items.append(self.makeItem(result))
|
||||||
self.RESULTS.reset()
|
self.RESULTS.reset()
|
||||||
self.RESULTS.addItems(items)
|
self.RESULTS.addItems(items)
|
||||||
|
|
||||||
percent = (float(self.count) / len(self.searchActions)) * 100
|
percent = (float(self.count) / len(self.searchActions)) * 100
|
||||||
self.LOADING.setVisible(False)
|
self.LOADING.setVisible(False)
|
||||||
self.PROGRESS.setPercent(percent)
|
self.PROGRESS.setPercent(percent)
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
<!-- <font>font30_title</font> -->
|
<!-- <font>font30_title</font> -->
|
||||||
<textcolor>FFFFFFFF</textcolor>
|
<textcolor>FFFFFFFF</textcolor>
|
||||||
<shadowcolor>00000000</shadowcolor>
|
<shadowcolor>00000000</shadowcolor>
|
||||||
<label>$INFO[Container(102).ListItem.Label] [B][COLOR FFAAAAAA]$INFO[Container(102).ListItem.Property(year)] [CR]$INFO[Container(102).ListItem.Property(channel)][/COLOR][/B]</label>
|
<label>$INFO[Container(102).ListItem.Label] [B][COLOR FFAAAAAA]$INFO[Container(102).ListItem.Property(year)] [CR]$INFO[Container(101).ListItem.Label][/COLOR][/B]</label>
|
||||||
<align>left</align>
|
<align>left</align>
|
||||||
<aligny>center</aligny>
|
<aligny>center</aligny>
|
||||||
</control>
|
</control>
|
||||||
@@ -139,6 +139,15 @@
|
|||||||
<bordersize>10</bordersize>
|
<bordersize>10</bordersize>
|
||||||
<aspectratio>scale</aspectratio>
|
<aspectratio>scale</aspectratio>
|
||||||
</control>
|
</control>
|
||||||
|
<control type="image">
|
||||||
|
<description>Item Verified</description>
|
||||||
|
<top>315</top>
|
||||||
|
<left>145</left>
|
||||||
|
<width>20</width>
|
||||||
|
<height>20</height>
|
||||||
|
<texture colordiffuse="FF0082C2">$INFO[ListItem.Property(verified)]</texture>
|
||||||
|
<aspectratio>scale</aspectratio>
|
||||||
|
</control>
|
||||||
</itemlayout>
|
</itemlayout>
|
||||||
<focusedlayout height="570" width="380">
|
<focusedlayout height="570" width="380">
|
||||||
<control type="image">
|
<control type="image">
|
||||||
@@ -163,6 +172,15 @@
|
|||||||
<bordersize>10</bordersize>
|
<bordersize>10</bordersize>
|
||||||
<aspectratio>scale</aspectratio>
|
<aspectratio>scale</aspectratio>
|
||||||
</control>
|
</control>
|
||||||
|
<control type="image">
|
||||||
|
<description>Item Verified</description>
|
||||||
|
<top>15</top>
|
||||||
|
<left>330</left>
|
||||||
|
<width>40</width>
|
||||||
|
<height>40</height>
|
||||||
|
<texture colordiffuse="FF0082C2">$INFO[ListItem.Property(verified)]</texture>
|
||||||
|
<aspectratio>scale</aspectratio>
|
||||||
|
</control>
|
||||||
</focusedlayout>
|
</focusedlayout>
|
||||||
</control>
|
</control>
|
||||||
</control> <!-- END Search Result Group -->
|
</control> <!-- END Search Result Group -->
|
||||||
@@ -241,6 +259,15 @@
|
|||||||
<align>center</align>
|
<align>center</align>
|
||||||
<aligny>center</aligny>
|
<aligny>center</aligny>
|
||||||
</control>
|
</control>
|
||||||
|
<control type="image">
|
||||||
|
<description>Verified</description>
|
||||||
|
<top>5</top>
|
||||||
|
<left>5</left>
|
||||||
|
<width>30</width>
|
||||||
|
<height>30</height>
|
||||||
|
<texture colordiffuse="880082C2">$INFO[ListItem.Property(verified)]</texture>
|
||||||
|
<aspectratio>scale</aspectratio>
|
||||||
|
</control>
|
||||||
</itemlayout>
|
</itemlayout>
|
||||||
<focusedlayout height="150" width="150">
|
<focusedlayout height="150" width="150">
|
||||||
<control type="image">
|
<control type="image">
|
||||||
@@ -261,6 +288,15 @@
|
|||||||
<texture colordiffuse="880082C2">white.png</texture>
|
<texture colordiffuse="880082C2">white.png</texture>
|
||||||
<aspectratio>scale</aspectratio>
|
<aspectratio>scale</aspectratio>
|
||||||
</control>
|
</control>
|
||||||
|
<control type="image">
|
||||||
|
<description>Verified</description>
|
||||||
|
<top>5</top>
|
||||||
|
<left>5</left>
|
||||||
|
<width>30</width>
|
||||||
|
<height>30</height>
|
||||||
|
<texture colordiffuse="FF0082C2">$INFO[ListItem.Property(verified)]</texture>
|
||||||
|
<aspectratio>scale</aspectratio>
|
||||||
|
</control>
|
||||||
<control type="textbox">
|
<control type="textbox">
|
||||||
<description>Results Count</description>
|
<description>Results Count</description>
|
||||||
<left>110</left>
|
<left>110</left>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
Reference in New Issue
Block a user