def __init__(self, url, icon, video_id, thumb, title, **kw): self.vid_id = video_id self.thumb = thumb self._uri = None VideoItem.__init__(self, title, uri=self.get_uri, thumbnail=thumb, **kw) return None
class YouTubeItem(VideoItem): player = None choosen_format = 0 available_formats = [] def __init__(self, name, parent, **kw): if YouTubeItem.player is None: try: from pygui.menu.players.video_player import YoutubePlayer YouTubeItem.player = YoutubePlayer() except Exception, e: log.error('Unable to spawn YouTubeVideoPlayer: %s', str(e)) VideoItem.__init__(self, name, type_='youtubevideo', **kw) self.parent = parent return None
def __init__(self, name, parent, **kw): VideoItem.__init__(self, name, type_='video', **kw) self.parent = parent return None