Esempio n. 1
0
    def __init__(self, bin, host='127.0.0.1', port=6878, timeout=30):
        Observable.__init__(self)

        self.stream = None
        self.params = None
        self.playing = False
        self.available = False
        self.timeout = int(timeout)
        self.server = Server(host=host, port=port)
        self.engine = Engine(bin=bin)
Esempio n. 2
0
  def __init__(self, server):
    Extendable.__init__(self)
    Observable.__init__(self)

    self.stat_url       = None
    self.status         = None
    self.peers          = 0
    self.speed_down     = 0
    self.speed_up       = 0
    self.downloaded     = 0
    self.uploaded       = 0
    self.progress       = 0
    self.total_progress = 0
    self.server         = server
Esempio n. 3
0
    def __init__(self, server, id=None, url=None, infohash=None):
        Extendable.__init__(self)
        Observable.__init__(self)

        self.status = None
        self.is_live = None
        self.playback_session_id = None
        self.command_url = None
        self.playback_url = None
        self.stat_url = None
        self.server = server
        self.stats = Stats(server)

        self._check_required_args(id=id, url=url, infohash=infohash)
        self._parse_stream_params(id=id, url=url, infohash=infohash)
Esempio n. 4
0
    def __init__(self, bin='mpv'):
        Observable.__init__(self)

        self.args = bin.split()
        self.process = None
Esempio n. 5
0
  def __init__(self, bin, **options):
    Observable.__init__(self)

    self.process = None
    self.bin     = bin
    self.options = options