mirror of
https://github.com/fastogt/fastocloud_admin.git
synced 2025-03-09 23:38:52 +00:00
Review
This commit is contained in:
parent
03bf3524a4
commit
75a29043b6
5 changed files with 18 additions and 17 deletions
|
@ -59,28 +59,28 @@ class ServiceView(FlaskView):
|
||||||
stream = server.make_proxy_vod()
|
stream = server.make_proxy_vod()
|
||||||
elif stream_type == constants.StreamType.RELAY:
|
elif stream_type == constants.StreamType.RELAY:
|
||||||
stream = server.make_relay_stream()
|
stream = server.make_relay_stream()
|
||||||
stream.output.urls[0] = stream.generate_http_link(constants.HlsType.HLS_PULL,
|
stream.output = [stream.generate_http_link(constants.HlsType.HLS_PULL,
|
||||||
oid=stream.output.urls[0].id)
|
oid=stream.output[0].id)]
|
||||||
elif stream_type == constants.StreamType.ENCODE:
|
elif stream_type == constants.StreamType.ENCODE:
|
||||||
stream = server.make_encode_stream()
|
stream = server.make_encode_stream()
|
||||||
stream.output.urls[0] = stream.generate_http_link(constants.HlsType.HLS_PULL,
|
stream.output = [stream.generate_http_link(constants.HlsType.HLS_PULL,
|
||||||
oid=stream.output.urls[0].id)
|
oid=stream.output[0].id)]
|
||||||
elif stream_type == constants.StreamType.VOD_RELAY:
|
elif stream_type == constants.StreamType.VOD_RELAY:
|
||||||
stream = server.make_vod_relay_stream()
|
stream = server.make_vod_relay_stream()
|
||||||
stream.output.urls[0] = stream.generate_vod_link(constants.HlsType.HLS_PULL,
|
stream.output = [stream.generate_vod_link(constants.HlsType.HLS_PULL,
|
||||||
oid=stream.output.urls[0].id)
|
oid=stream.output[0].id)]
|
||||||
elif stream_type == constants.StreamType.VOD_ENCODE:
|
elif stream_type == constants.StreamType.VOD_ENCODE:
|
||||||
stream = server.make_vod_encode_stream()
|
stream = server.make_vod_encode_stream()
|
||||||
stream.output.urls[0] = stream.generate_vod_link(constants.HlsType.HLS_PULL,
|
stream.output = [stream.generate_vod_link(constants.HlsType.HLS_PULL,
|
||||||
oid=stream.output.urls[0].id)
|
oid=stream.output[0].id)]
|
||||||
elif stream_type == constants.StreamType.COD_RELAY:
|
elif stream_type == constants.StreamType.COD_RELAY:
|
||||||
stream = server.make_cod_relay_stream()
|
stream = server.make_cod_relay_stream()
|
||||||
stream.output.urls[0] = stream.generate_cod_link(constants.HlsType.HLS_PULL,
|
stream.output = [stream.generate_cod_link(constants.HlsType.HLS_PULL,
|
||||||
oid=stream.output.urls[0].id)
|
oid=stream.output[0].id)]
|
||||||
elif stream_type == constants.StreamType.COD_ENCODE:
|
elif stream_type == constants.StreamType.COD_ENCODE:
|
||||||
stream = server.make_cod_encode_stream()
|
stream = server.make_cod_encode_stream()
|
||||||
stream.output.urls[0] = stream.generate_cod_link(constants.HlsType.HLS_PULL,
|
stream.output = [stream.generate_cod_link(constants.HlsType.HLS_PULL,
|
||||||
oid=stream.output.urls[0].id)
|
oid=stream.output[0].id)]
|
||||||
elif stream_type == constants.StreamType.CATCHUP:
|
elif stream_type == constants.StreamType.CATCHUP:
|
||||||
stream = server.make_catchup_stream()
|
stream = server.make_catchup_stream()
|
||||||
else:
|
else:
|
||||||
|
@ -88,9 +88,9 @@ class ServiceView(FlaskView):
|
||||||
|
|
||||||
input_url = file['link']
|
input_url = file['link']
|
||||||
if stream_type == constants.StreamType.PROXY or stream_type == constants.StreamType.VOD_PROXY:
|
if stream_type == constants.StreamType.PROXY or stream_type == constants.StreamType.VOD_PROXY:
|
||||||
stream.output.urls[0].uri = input_url
|
stream.output[0].uri = input_url
|
||||||
else:
|
else:
|
||||||
stream.input.urls[0].uri = input_url
|
stream.input[0].uri = input_url
|
||||||
|
|
||||||
stream.tvg_logo = default_logo_path
|
stream.tvg_logo = default_logo_path
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
flask>=1.0.0
|
flask>=1.0.0
|
||||||
|
flask_wtf>=0.14
|
||||||
flask_socketio>=1.0
|
flask_socketio>=1.0
|
||||||
flask_pymodm>=0.1.2
|
flask_pymodm>=0.1.2
|
||||||
flask_login>=0.3.0
|
flask_login>=0.3.0
|
||||||
|
|
|
@ -22,7 +22,7 @@ if __name__ == '__main__':
|
||||||
email = argv.email
|
email = argv.email
|
||||||
password = argv.password
|
password = argv.password
|
||||||
|
|
||||||
connect(mongodb_uri=argv.mongo_uri, alias='default')
|
connect(mongodb_uri=argv.mongo_uri)
|
||||||
new_user = ProviderAdminUser.make_provider(email=email.lower(), password=password, country=argv.country,
|
new_user = ProviderAdminUser.make_provider(email=email.lower(), password=password, country=argv.country,
|
||||||
language=argv.language)
|
language=argv.language)
|
||||||
new_user.status = ProviderAdminUser.Status.ACTIVE
|
new_user.status = ProviderAdminUser.Status.ACTIVE
|
||||||
|
|
|
@ -18,7 +18,7 @@ def import_streams_to_server(db, server: ServiceSettings):
|
||||||
if not len(urls):
|
if not len(urls):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
stream.output.urls[0].uri = urls[0]
|
stream.output[0].uri = urls[0]
|
||||||
stream.name = sql_entry['stream_display_name']
|
stream.name = sql_entry['stream_display_name']
|
||||||
tvg_logo = sql_entry['stream_icon']
|
tvg_logo = sql_entry['stream_icon']
|
||||||
if len(tvg_logo) < constants.MAX_URL_LENGTH:
|
if len(tvg_logo) < constants.MAX_URL_LENGTH:
|
||||||
|
|
|
@ -38,7 +38,7 @@ if __name__ == '__main__':
|
||||||
m3u_parser.parse()
|
m3u_parser.parse()
|
||||||
for file in m3u_parser.files:
|
for file in m3u_parser.files:
|
||||||
stream = TestLifeStream.make_stream(service_settings)
|
stream = TestLifeStream.make_stream(service_settings)
|
||||||
stream.input.urls[0].uri = file['link']
|
stream.input[0].uri = file['link']
|
||||||
stream.name = '{0}({1})'.format(file['tvg-group'], file['title'])
|
stream.name = '{0}({1})'.format(file['tvg-group'], file['title'])
|
||||||
service_settings.streams.append(stream)
|
service_settings.streams.append(stream)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue