def maybe_add_thumbnail_chunk(url):
            iframe_url, iframe_width, iframe_height = \
                thumbnails.get_iframe_info(url)
            if iframe_url:
                add_footer_iframe_chunk(
                    iframe_url, iframe_width, iframe_height)
                return

            thumb_url, thumb_width, thumb_height = \
                thumbnails.get_thumbnail_info(url, self._thumbnail_size)
            if thumb_url:
                add_footer_thumbnail_chunk(
                    url, thumb_url, thumb_width, thumb_height)
Exemple #2
0
        def maybe_add_thumbnail_chunk(url):
            # If the caller is OK with large thumbnails, chances are they're
            # OK with actual embedded content too.
            if self._thumbnail_size == thumbnails.LARGE_THUMBNAIL:
                iframe_url, iframe_width, iframe_height = \
                    thumbnails.get_iframe_info(url)
                if iframe_url:
                    add_footer_iframe_chunk(
                        iframe_url, iframe_width, iframe_height)
                    return

            thumb_url, thumb_width, thumb_height = \
                thumbnails.get_thumbnail_info(url, self._thumbnail_size)
            if thumb_url:
                add_footer_thumbnail_chunk(
                    url, thumb_url, thumb_width, thumb_height)
Exemple #3
0
 def maybe_add_thumbnail_chunk(url):
     thumb_url, thumb_width, thumb_height = thumbnails.get_thumbnail_info(url, self._thumbnail_size)
     if thumb_url:
         add_footer_thumbnail_chunk(url, thumb_url, thumb_width, thumb_height)
Exemple #4
0
 def maybe_add_thumbnail_chunk(url):
     thumb_url, thumb_width, thumb_height = \
         thumbnails.get_thumbnail_info(url, self._thumbnail_size)
     if thumb_url:
         add_footer_thumbnail_chunk(url, thumb_url, thumb_width,
                                    thumb_height)