def open_url(self, url): preview_service = get_preview_service_from_url(url) if preview_service: self.core.get_image_preview(preview_service, url) self.image_view.start_loading() else: self.__open_in_browser(url)
def __link_clicked(self, url): url = str(url) preview_service = get_preview_service_from_url(url) self.base.open_url(url)
def preview_media(self, url): if not is_preview_service_supported(url): raise PreviewServiceNotSupported service = get_preview_service_from_url(url) return service.do_service(url)