Пример #1
0
 def select_cb(resolved):
     resolved = resolver.filter_by_quality(resolved, self.settings['quality'] or '0')
     if len(resolved) == 1:
         return resolved[0]
     else:
         stream_list = ['[%s]%s'%(s['quality'],s['lang']) for s in resolved]
         idx = client.getListInput(self.session, stream_list, _("Select stream"))
         if idx == -1:
             return None
         return resolved[idx]
Пример #2
0
def manage_filter(pageurl, filterid):
    if filterid is None:
        main_menu(pageurl)
        return

    page = _play_parser.get_page(pageurl)

    filter_list = page.filter_lists[filterid]
    add_id = getListInput(session, map(lambda x: x.title, filter_list.item_list), filter_list.title)
    if add_id < 0:
        main_menu(pageurl)
        return

    main_menu(filter_list.item_list[add_id].link)
Пример #3
0
 def select_cb(resolved):
     #resolved = resolver.filter_by_quality(resolved, self.settings['quality'] or '0')
     if len(resolved) == 1:
         return resolved[0]
     else:
         stream_list = []
         if 'resolveTitle' in resolved[0]:
             stream_list = ['%s'%(s['resolveTitle']) for s in resolved]
         else:
             strem_list = ['%s empty'%(s['quality']) for s in resolved]
         idx = client.getListInput(self.session, stream_list, '')
         if idx == -1:
             return None
         return resolved[idx]
Пример #4
0
 def select_cb(resolved):
     resolved = resolver.filter_by_quality(
         resolved, self.settings['quality'] or '0')
     if len(resolved) == 1:
         return resolved[0]
     else:
         stream_list = [
             '[%s]%s' % (s['quality'], s['lang']) for s in resolved
         ]
         idx = client.getListInput(self.session, stream_list,
                                   _("Select stream"))
         if idx == -1:
             return None
         return resolved[idx]
Пример #5
0
 def select_cb(resolved):
     #resolved = resolver.filter_by_quality(resolved, self.settings['quality'] or '0')
     if len(resolved) == 1:
         return resolved[0]
     else:
         stream_list = []
         if 'resolveTitle' in resolved[0]:
             stream_list = [
                 '%s' % (s['resolveTitle']) for s in resolved
             ]
         else:
             strem_list = [
                 '%s empty' % (s['quality']) for s in resolved
             ]
         idx = client.getListInput(self.session, stream_list, '')
         if idx == -1:
             return None
         return resolved[idx]