예제 #1
0
파일: default.py 프로젝트: AWilco/iplayerv2
def read_url():
    args = cgi.parse_qs(sys.argv[2][1:])
    feed_channel = args.get('feed_channel', [None])[0]
    feed_atoz    = args.get('feed_atoz', [None])[0]
    listing      = args.get('listing', [None])[0]
    pid          = args.get('pid', [None])[0]
    tvradio      = args.get('tvradio', [None])[0]
    category     = args.get('category', [None])[0]
    series       = args.get('series', [None])[0]    
    url          = args.get('url', [None])[0]
    label        = args.get('label', [None])[0]
    deletesearch = args.get('deletesearch', [None])[0]
    radio        = args.get('radio', [None])[0]

    feed = None
    if feed_channel:
        feed = iplayer.feed('auto', channel=feed_channel, atoz=feed_atoz, radio=radio)
    elif feed_atoz:
        feed = iplayer.feed(tvradio or 'auto', atoz=feed_atoz, radio=radio)

    if not (feed or listing):
        section = addoncompat.get_setting('start_section')
        if   section == '1': tvradio = 'tv'
        elif section == '2': tvradio = 'radio'

    return (feed, listing, pid, tvradio, category, series, url, label, deletesearch, radio)
예제 #2
0
def read_url():
    args = cgi.parse_qs(sys.argv[2][1:])
    feed_channel = args.get('feed_channel', [None])[0]
    feed_atoz = args.get('feed_atoz', [None])[0]
    listing = args.get('listing', [None])[0]
    pid = args.get('pid', [None])[0]
    tvradio = args.get('tvradio', [None])[0]
    category = args.get('category', [None])[0]
    series = args.get('series', [None])[0]
    url = args.get('url', [None])[0]
    label = args.get('label', [None])[0]
    deletesearch = args.get('deletesearch', [None])[0]
    radio = args.get('radio', [None])[0]

    feed = None
    if feed_channel:
        feed = iplayer.feed('auto',
                            channel=feed_channel,
                            atoz=feed_atoz,
                            radio=radio)
    elif feed_atoz:
        feed = iplayer.feed(tvradio or 'auto', atoz=feed_atoz, radio=radio)

    if not (feed or listing):
        section = __addon__.getSetting('start_section')
        if section == '1': tvradio = 'tv'
        elif section == '2': tvradio = 'radio'

    return (feed, listing, pid, tvradio, category, series, url, label,
            deletesearch, radio)
def read_url():
    args = cgi.parse_qs(sys.argv[2][1:])
    feed_channel = args.get('feed_channel', [None])[0]
    listing      = args.get('listing', [None])[0]
    pid          = args.get('pid', [None])[0]
    tvradio      = args.get('tvradio', [None])[0]
    category     = args.get('category', [None])[0]
    atoz         = args.get('atoz', [None])[0]
    date         = args.get('date', [None])[0]
    series       = args.get('series', [None])[0]
    url          = args.get('url', [None])[0]
    label        = args.get('label', [None])[0]
    deletesearch = args.get('deletesearch', [None])[0]
    radio        = args.get('radio', [None])[0]
    content_type = args.get('content_type', [None])[0]

    feed = None
    if listing:
        feed = iplayer.feed(tvradio=tvradio, channel=feed_channel, atoz=atoz, date=date, radio=radio, listing=listing)

    section = __addon__.getSetting('start_section')
    if content_type and section != '3':
        if content_type == 'video':
            tvradio = 'tv'
        elif content_type == 'audio':
            tvradio = 'radio'

    if not (feed or listing):
        if   section == '1': tvradio = 'tv'
        elif section == '2': tvradio = 'radio'

    return (feed, listing, pid, tvradio, category, series, url, label, deletesearch, radio, atoz, date)
def read_url():
    args = cgi.parse_qs(sys.argv[2][1:])
    feed_channel = args.get('feed_channel', [None])[0]
    feed_atoz = args.get('feed_atoz', [None])[0]
    listing = args.get('listing', [None])[0]
    pid = args.get('pid', [None])[0]
    tvradio = args.get('tvradio', [None])[0]
    category = args.get('category', [None])[0]
    series = args.get('series', [None])[0]
    url = args.get('url', [None])[0]
    label = args.get('label', [None])[0]
    deletesearch = args.get('deletesearch', [None])[0]
    radio = args.get('radio', [None])[0]
    deleteresume = args.get('deleteresume', [None])[0]
    force_resume_unlock = args.get('force_resume_unlock', [None])[0]
    playfromstart = args.get('playfromstart', [None])[0]
    playresume = args.get('playresume', [None])[0]
    content_type = args.get('content_type', [None])[0]

    feed = None
    if feed_channel:
        feed = iplayer.feed('auto',
                            channel=feed_channel,
                            atoz=feed_atoz,
                            radio=radio)
    elif feed_atoz:
        feed = iplayer.feed(tvradio or 'auto', atoz=feed_atoz, radio=radio)

    if content_type:
        if content_type == 'video':
            tvradio = 'tv'
        elif content_type == 'audio':
            tvradio = 'radio'

    if not (feed or listing):
        section = __addon__.getSetting('start_section')
        if section == '1': tvradio = 'tv'
        elif section == '2': tvradio = 'radio'

    return (feed, listing, pid, tvradio, category, series, url, label,
            deletesearch, radio, deleteresume, force_resume_unlock,
            playfromstart, playresume)
예제 #5
0
def search(tvradio, searchterm):

    if not searchterm:
        searchterm = iplayer_search.prompt_for_search()
        if searchterm != None and len(searchterm) >= 3:
            iplayer_search.save_search(SEARCH_FILE, tvradio, searchterm)
        else:
            return

    logging.info("searchterm=" + searchterm)
    feed = iplayer.feed(tvradio, searchterm=searchterm)

    list_feed_listings(feed, 'list')
def search(tvradio, searchterm):

    if not searchterm:
        searchterm = iplayer_search.prompt_for_search()
        if searchterm != None and len(searchterm) >= 3:
            iplayer_search.save_search(SEARCH_FILE, tvradio, searchterm)
        else:
            return

    logging.info("searchterm=" + searchterm)
    feed = iplayer.feed(tvradio, searchterm=searchterm)

    list_feed_listings(feed, 'list')
def search(tvradio, searchterm):

    if not searchterm:
        searchterm = iplayer_search.prompt_for_search()
        if searchterm != None and len(searchterm) >= 3:
            iplayer_search.save_search(SEARCH_FILE, tvradio, searchterm)
        else:
            return

    utils.log("searchterm=%s" % searchterm,xbmc.LOGINFO)
    feed = iplayer.feed(tvradio, searchterm=searchterm)

    list_feed_listings(feed, 'list')
예제 #8
0
def search(tvradio, searchterm):

    if not searchterm:
        searchterm = iplayer_search.prompt_for_search()
        if searchterm != None and len(searchterm) >= 3:
            iplayer_search.save_search(SEARCH_FILE, tvradio, searchterm)
        else:
            return

    utils.log("searchterm=%s" % searchterm, xbmc.LOGINFO)
    feed = iplayer.feed(tvradio, searchterm=searchterm)

    list_feed_listings(feed, 'list')
def read_url():
    args = cgi.parse_qs(sys.argv[2][1:])
    feed_channel = args.get('feed_channel', [None])[0]
    feed_atoz    = args.get('feed_atoz', [None])[0]
    listing      = args.get('listing', [None])[0]
    pid          = args.get('pid', [None])[0]
    tvradio      = args.get('tvradio', [None])[0]
    category     = args.get('category', [None])[0]
    series       = args.get('series', [None])[0]
    url          = args.get('url', [None])[0]
    label        = args.get('label', [None])[0]
    deletesearch = args.get('deletesearch', [None])[0]
    radio        = args.get('radio', [None])[0]
    deleteresume = args.get('deleteresume', [None])[0]
    force_resume_unlock = args.get('force_resume_unlock', [None])[0]
    playfromstart = args.get('playfromstart', [None])[0]
    playresume   = args.get('playresume', [None])[0]
    content_type = args.get('content_type', [None])[0]

    feed = None
    if feed_channel:
        feed = iplayer.feed('auto', channel=feed_channel, atoz=feed_atoz, radio=radio)
    elif feed_atoz:
        feed = iplayer.feed(tvradio or 'auto', atoz=feed_atoz, radio=radio)

    if content_type:
        if content_type == 'video':
            tvradio = 'tv'
        elif content_type == 'audio':
            tvradio = 'radio'

    if not (feed or listing):
        section = __addon__.getSetting('start_section')
        if   section == '1': tvradio = 'tv'
        elif section == '2': tvradio = 'radio'

    return (feed, listing, pid, tvradio, category, series, url, label, deletesearch, radio, deleteresume, force_resume_unlock, playfromstart, playresume)
예제 #10
0
	def activate (self, idol_object):
		# Build the interface
		builder = self.load_interface ("iplayer.ui", True, idol_object.get_main_window (), self)
		container = builder.get_object ('iplayer_vbox')

		self.tv_tree_store = builder.get_object ('iplayer_programme_store')
		programme_list = builder.get_object ('iplayer_programme_list')
		programme_list.connect ('row-expanded', self._row_expanded_cb)
		programme_list.connect ('row-activated', self._row_activated_cb)

		self.idol = idol_object
		container.show_all ()

		self.tv = iplayer2.feed ('tv')

		# Add the interface to Idol's sidebar
		self.idol.add_sidebar_page ("iplayer", _("BBC iPlayer"), container)

		# Get the channel category listings
		self.populate_channel_list (self.tv, self.tv_tree_store)
예제 #11
0
파일: iplayer.py 프로젝트: s1ag/Mate-Extra
    def activate(self, totem_object):
        # Build the interface
        builder = self.load_interface("iplayer.ui", True,
                                      totem_object.get_main_window(), self)
        container = builder.get_object('iplayer_vbox')

        self.tv_tree_store = builder.get_object('iplayer_programme_store')
        programme_list = builder.get_object('iplayer_programme_list')
        programme_list.connect('row-expanded', self._row_expanded_cb)
        programme_list.connect('row-activated', self._row_activated_cb)

        self.totem = totem_object
        container.show_all()

        self.tv = iplayer2.feed('tv')

        # Add the interface to Totem's sidebar
        self.totem.add_sidebar_page("iplayer", _("BBC iPlayer"), container)

        # Get the channel category listings
        self.populate_channel_list(self.tv, self.tv_tree_store)
예제 #12
0
def read_url():
    args = cgi.parse_qs(sys.argv[2][1:])
    feed_channel = args.get('feed_channel', [None])[0]
    listing = args.get('listing', [None])[0]
    pid = args.get('pid', [None])[0]
    tvradio = args.get('tvradio', [None])[0]
    category = args.get('category', [None])[0]
    atoz = args.get('atoz', [None])[0]
    date = args.get('date', [None])[0]
    series = args.get('series', [None])[0]
    url = args.get('url', [None])[0]
    label = args.get('label', [None])[0]
    deletesearch = args.get('deletesearch', [None])[0]
    radio = args.get('radio', [None])[0]
    content_type = args.get('content_type', [None])[0]

    feed = None
    if listing:
        feed = iplayer.feed(tvradio=tvradio,
                            channel=feed_channel,
                            atoz=atoz,
                            date=date,
                            radio=radio,
                            listing=listing)

    section = __addon__.getSetting('start_section')
    if content_type and section != '3':
        if content_type == 'video':
            tvradio = 'tv'
        elif content_type == 'audio':
            tvradio = 'radio'

    if not (feed or listing):
        if section == '1': tvradio = 'tv'
        elif section == '2': tvradio = 'radio'

    return (feed, listing, pid, tvradio, category, series, url, label,
            deletesearch, radio, atoz, date)
예제 #13
0
파일: default.py 프로젝트: AWilco/iplayerv2
def search(tvradio, searchterm):
   
    if not searchterm:
        searchterm = iplayer_search.prompt_for_search()
        iplayer_search.save_search(SEARCH_FILE, tvradio, searchterm)
    
    logging.info("searchterm=" + searchterm)
    feed = iplayer.feed(tvradio, searchterm=searchterm)
    
    listitem = xbmcgui.ListItem(label=' Delete this search - ' + searchterm)
    listitem.setIconImage(get_plugin_thumbnail('search'))
    listitem.setThumbnailImage(get_plugin_thumbnail('search'))
    listitem.setProperty('tracknumber', '0')
    
    url = "%s?deletesearch=%s&tvradio=%s" % (sys.argv[0], urllib.quote_plus(searchterm), urllib.quote_plus(tvradio))
    ok = xbmcplugin.addDirectoryItem(
                handle=PLUGIN_HANDLE,
                url=url,             
                listitem=listitem,
                isFolder=False,
    )
    
    list_feed_listings(feed, 'list')
예제 #14
0
            feed.category = category

        # state engine
        if pid:
            watch(feed, pid)
        elif deletesearch:
            search_delete(tvradio or 'tv', deletesearch)
        elif not (feed or listing):
            if not tvradio:
                list_tvradio()
            elif tvradio == 'Settings':
                __addon__.openSettings()
            elif (tvradio == 'radio' and radio == None):
                list_radio_types()
            elif tvradio:
                feed = iplayer.feed(tvradio, radio=radio).channels_feed()
                list_feeds(feed, tvradio, radio)
        elif listing == 'categories':
            list_categories(tvradio, feed)
        elif listing == 'atoz' and atoz is None:
            list_atoz(tvradio)
        elif listing == 'bydate' and date is None:
            list_bydate(tvradio, feed.channel)
        elif listing == 'searchlist':
            search_list(tvradio or 'tv')
        elif listing == 'search':
            search(tvradio or 'tv', label)
        elif listing == 'livefeeds':
            tvradio = tvradio or 'tv'
            channels = iplayer.feed(tvradio or 'tv', radio=radio,
                                    live=True).channels_feed()
예제 #15
0
파일: default.py 프로젝트: AWilco/iplayerv2
         pref = get_setting_videostream()
         bitrate = pref.split(' ')[1]
         live_tv.play_stream(label, bitrate, showDialog)
 elif url:
     listen_live(label, url)
 elif deletesearch:
     search_delete(tvradio or 'tv', deletesearch)        
 elif not (feed or listing):
     if not tvradio:
         list_tvradio()
     elif tvradio == 'Settings':
         addoncompat.open_settings()
     elif (tvradio == 'radio' and radio == None):
         list_radio_types()
     elif tvradio:
         feed = iplayer.feed(tvradio, radio=radio).channels_feed()
         list_feeds(feed, tvradio, radio)
 elif listing == 'categories':
     channels = None
     feed = feed or iplayer.feed(tvradio or 'tv',  searchcategory=True, category=category, radio=radio)
     list_categories(tvradio, feed)
 elif listing == 'searchlist':
     search_list(tvradio or 'tv')
 elif listing == 'search':
     search(tvradio or 'tv', label)   
 elif listing == 'livefeeds':
     tvradio = tvradio or 'tv'
     if tvradio == 'radio':
         channels = iplayer.feed(tvradio or 'tv', radio=radio).channels_feed()
         list_live_feeds(channels, tvradio)
     else:
예제 #16
0
            feed.category = category

        # state engine
        if pid:
            watch(feed, pid)
        elif deletesearch:
            search_delete(tvradio or 'tv', deletesearch)
        elif not (feed or listing):
            if not tvradio:
                list_tvradio()
            elif tvradio == 'Settings':
                __addon__.openSettings()
            elif (tvradio == 'radio' and radio == None):
                list_radio_types()
            elif tvradio:
                feed = iplayer.feed(tvradio, radio=radio).channels_feed()
                list_feeds(feed, tvradio, radio)
        elif listing == 'categories':
            list_categories(tvradio, feed)
        elif listing == 'atoz' and atoz is None:
            list_atoz(tvradio)
        elif listing == 'bydate' and date is None:
            list_bydate(tvradio, feed.channel)
        elif listing == 'searchlist':
            search_list(tvradio or 'tv')
        elif listing == 'search':
            search(tvradio or 'tv', label)
        elif listing == 'livefeeds':
            tvradio = tvradio or 'tv'
            channels = iplayer.feed(tvradio or 'tv', radio=radio, live=True).channels_feed()
            list_live_feeds(channels, tvradio)
예제 #17
0
         pref = get_setting_videostream()
         bitrate = pref.split(' ')[1]
         live_tv.play_stream(label, bitrate, showDialog)
 elif url:
     listen_live(label, url)
 elif deletesearch:
     search_delete(tvradio or 'tv', deletesearch)
 elif not (feed or listing):
     if not tvradio:
         list_tvradio()
     elif tvradio == 'Settings':
         __addon__.openSettings()
     elif (tvradio == 'radio' and radio == None):
         list_radio_types()
     elif tvradio:
         feed = iplayer.feed(tvradio, radio=radio).channels_feed()
         list_feeds(feed, tvradio, radio)
 elif listing == 'categories':
     channels = None
     feed = feed or iplayer.feed(tvradio or 'tv',
                                 searchcategory=True,
                                 category=category,
                                 radio=radio)
     list_categories(tvradio, feed)
 elif listing == 'searchlist':
     search_list(tvradio or 'tv')
 elif listing == 'search':
     search(tvradio or 'tv', label)
 elif listing == 'livefeeds':
     tvradio = tvradio or 'tv'
     if tvradio == 'radio':