Пример #1
0
 def builder():
     for item in all_images:
         try:
             listitem = make_listitem()
             listitem.setProperty('tikiskins.thumb', item[2])
             listitem.setProperty('tikiskins.path', item[1])
             listitem.setProperty('tikiskins.name', item[0])
             listitem.setProperty('tikiskins.action', image_action)
             yield listitem
         except:
             pass
Пример #2
0
 def builder(rolling_count):
     for item in image_info:
         try:
             listitem = make_listitem()
             rolling_count += 1
             name = '%s_%s_%03d' % (media_title, item['title'],
                                    rolling_count)
             listitem.setProperty('tikiskins.thumb', item['thumb'])
             listitem.setProperty('tikiskins.name', name)
             listitem.setProperty('tikiskins.path', item['image'])
             listitem.setProperty('tikiskins.action', image_action)
             yield listitem
         except:
             pass
Пример #3
0
 def builder():
     for count, item in enumerate(image_info, 1):
         try:
             media = item['media']
             if 'title' in media: name_key = 'title'
             else: name_key = 'name'
             thumb_url = tmdb_image_base % ('w185', item['file_path'])
             image_url = tmdb_image_base % ('original',
                                            item['file_path'])
             name = '%s_%s_%03d' % (actor_name, media[name_key], count)
             listitem = make_listitem()
             listitem.setProperty('tikiskins.thumb', thumb_url)
             listitem.setProperty('tikiskins.path', image_url)
             listitem.setProperty('tikiskins.name', name)
             listitem.setProperty('tikiskins.action', image_action)
             yield listitem
         except:
             pass
Пример #4
0
 def builder():
     for item in files:
         try:
             listitem = make_listitem()
             image_url = os.path.join(folder_path, item)
             try:
                 thumb_url = [i for i in thumbs if i == item][0]
                 thumb_url = os.path.join(thumbs_path, thumb_url)
             except:
                 thumb_url = os.path.join(folder_path, item)
             listitem.setProperty('tikiskins.thumb', thumb_url)
             listitem.setProperty('tikiskins.path', image_url)
             listitem.setProperty('tikiskins.name', item)
             listitem.setProperty('tikiskins.delete', 'true')
             listitem.setProperty('tikiskins.folder_path', folder_path)
             listitem.setProperty('tikiskins.action', image_action)
             yield listitem
         except:
             pass
Пример #5
0
 def builder():
     for item in image_info['results']:
         if item['profile_path']:
             actor_poster = 'http://image.tmdb.org/t/p/w185%s' % item[
                 'profile_path']
             actor_image = 'http://image.tmdb.org/t/p/h632%s' % item[
                 'profile_path']
         else:
             actor_poster = os.path.join(icon_directory,
                                         'genre_family.png')
             actor_image = os.path.join(icon_directory,
                                        'genre_family.png')
         url_params = {
             'mode': 'people_search.person_data_dialog',
             'actor_name': item['name'],
             'actor_id': item['id'],
             'actor_image': actor_image
         }
         listitem = make_listitem()
         listitem.setProperty('tikiskins.thumb', actor_poster)
         listitem.setProperty('tikiskins.name', item['name'])
         listitem.setProperty('tikiskins.action',
                              json.dumps(url_params))
         yield listitem
Пример #6
0
 def make_listitem(self):
     return kodi_utils.make_listitem()