Ejemplo n.º 1
0
 def build_list_object():
     try:
         cm = []
         url_params = {
             'mode': 'media_play',
             'url': item['url_dl'],
             'media_type': 'music'
         }
         url = build_url(url_params)
         track_name = clean_file_name(
             batch_replace(to_utf8(item['name']), formats)).upper()
         listitem = make_listitem()
         listitem.setLabel(track_name)
         down_file_params = {
             'mode': 'downloader',
             'name': item['name'],
             'url': item['url_dl'],
             'action': 'audio',
             'image': default_furk_icon
         }
         cm.append(
             (ls(32747), 'RunPlugin(%s)' % build_url(down_file_params)))
         listitem.addContextMenuItems(cm)
         listitem.setArt({
             'icon': default_furk_icon,
             'poster': default_furk_icon,
             'thumb': default_furk_icon,
             'fanart': fanart,
             'banner': default_furk_icon
         })
         kodi_utils.add_item(__handle__, url, listitem, True)
     except:
         pass
Ejemplo n.º 2
0
	def _add_misc_dir(url_params, list_name=ls(32799), iconImage='item_next.png', isFolder=True):
		icon = kodi_utils.translate_path('special://home/addons/script.tikiart/resources/media/%s' % iconImage)
		listitem = make_listitem()
		listitem.setLabel(list_name)
		listitem.setArt({'icon': icon, 'poster': icon, 'thumb': icon, 'fanart': fanart, 'banner': icon})
		if url_params['mode'] == 'build_navigate_to_page':
			listitem.setProperty('SpecialSort', 'top')
			listitem.addContextMenuItems([(ls(32784),'RunPlugin(%s)' % build_url({'mode': 'toggle_jump_to'}))])
		else:
			listitem.setProperty('SpecialSort', 'bottom')
		kodi_utils.add_item(__handle__, build_url(url_params), listitem, isFolder)
Ejemplo n.º 3
0
 def _add_dir(self, params, isFolder=False, icon=None):
     __handle__ = int(argv[1])
     icon = icon or default_icon
     list_name = params.get('list_name', '')
     url = self._build_url(params)
     listitem = make_listitem()
     listitem.setLabel(list_name)
     listitem.setArt({
         'icon': icon,
         'poster': icon,
         'thumb': icon,
         'fanart': fanart,
         'banner': icon
     })
     kodi_utils.add_item(__handle__, url, listitem, isFolder)
Ejemplo n.º 4
0
 def add_dir(self,
             url_params,
             list_name=nextpage_str,
             iconImage=item_next,
             isFolder=True):
     url = build_url(url_params)
     listitem = make_listitem()
     listitem.setLabel(list_name)
     set_property = listitem.setProperty
     listitem.setArt({'icon': iconImage, 'fanart': fanart_empty})
     if url_params['mode'] == 'build_navigate_to_page':
         set_property('SpecialSort', 'top')
         listitem.addContextMenuItems([
             (switchjump_str,
              run_plugin % build_url({'mode': 'toggle_jump_to'}))
         ])
     else:
         set_property('SpecialSort', 'bottom')
     kodi_utils.add_item(self.handle, url, listitem, isFolder)