Beispiel #1
0
    def set_header_available(self, available):
        self.header_available = available

        from cloudburst.media.player import Player
        Player.instance().set_header_available(available)

        if self.enable_debug_info:
            print 'Header available?', available
            self._print_torrent_debug()
Beispiel #2
0
    def set_header_available(self, available):
        self.header_available = available

        from cloudburst.media.player import Player
        Player.instance().set_header_available(available)

        if self.enable_debug_info:
            print 'Header available?', available
            self._print_torrent_debug()
Beispiel #3
0
    def _set_forward_buffer_available(self):
        self.forward_buffer_available = True

        from cloudburst.media.player import Player
        Player.instance().forward_buffer_available = True

        self.parent.set_download_limit(True)

        if self.enable_debug_info:
            print 'Forward buffer available'
Beispiel #4
0
    def __init__(self):

        seekpoint = 0  # position in video from 0 to 1

        # Create the torrent manager
        self.torrent_manager = TorrentManager.instance()
        path = self.torrent_manager.open_torrent('res/torrents/avi.torrent')     # init torrent, get peers
        self.torrent_manager.start_torrent(seekpoint=seekpoint)   # start the download

        # Start the streaming back end
        self.streamer = Player.instance()             # create it
        self.streamer.await_file(path, seekpoint)       # this starts playing when buffer available
    def __init__(self):

        seekpoint = 0  # position in video from 0 to 1

        # Create the torrent manager
        self.torrent_manager = TorrentManager.instance()
        path = self.torrent_manager.open_torrent(
            'res/torrents/avi.torrent')  # init torrent, get peers
        self.torrent_manager.start_torrent(
            seekpoint=seekpoint)  # start the download

        # Start the streaming back end
        self.streamer = Player.instance()  # create it
        self.streamer.await_file(
            path, seekpoint)  # this starts playing when buffer available
    def __init__(self):

        self.header_available = False
        self.num_total_pieces = 0
        self.num_video_offset_pieces = 0
        self.num_video_pieces = 0
        self.video_file_extension = None
        self.download_speed_limited = False

        if lt.version != '0.16.16.0':
            print 'Wrong version of libtorrent detected, please install version 0.16.16.0, you have', lt.version
            import sys
            sys.exit(-1)

        self.download_directory = appdirs.dirs.user_cache_dir + '\\Download\\'

        # TODO do not remove downloaded torrent but check it instead
        import shutil
        shutil.rmtree(self.download_directory, ignore_errors=True)

        self.running = True

        from cloudburst.media.player import Player
        self.streamer = Player.instance()
Beispiel #7
0
    def __init__(self):

        self.header_available = False
        self.num_total_pieces = 0
        self.num_video_offset_pieces = 0
        self.num_video_pieces = 0
        self.video_file_extension = None
        self.download_speed_limited = False

        if lt.version != '0.16.16.0':
            print 'Wrong version of libtorrent detected, please install version 0.16.16.0, you have', lt.version
            import sys
            sys.exit(-1)

        self.download_directory = appdirs.dirs.user_cache_dir + '\\Download\\'

        # TODO do not remove downloaded torrent but check it instead
        import shutil
        shutil.rmtree(self.download_directory, ignore_errors=True)

        self.running = True

        from cloudburst.media.player import Player
        self.streamer = Player.instance()