def make_stream(cls, settings): stream = cls() stream._settings = settings stream.visible = False stream.input = InputUrls(urls=[InputUrl(id=InputUrl.generate_id())]) stream.output = OutputUrls(urls=[OutputUrl(id=OutputUrl.generate_id(), uri=constants.DEFAULT_TEST_URL)]) return stream
def make_stream(cls, settings): stream = cls() stream._settings = settings stream.input = InputUrls(urls=[InputUrl(id=InputUrl.generate_id())]) stream.output = OutputUrls( urls=[OutputUrl(id=OutputUrl.generate_id())]) return stream
def get_data(self) -> InputUrls: urls = InputUrls() for url in self.data['urls']: input = InputUrl(url['id'], url['uri'], url['user_agent'], url['stream_link'], url['proxy']) urls.urls.append(input) return urls
def make_stream(cls, settings): stream = cls() stream.visible = False stream._settings = settings stream.input = InputUrls(urls=[InputUrl(id=InputUrl.generate_id())]) return stream