mirror of
https://github.com/fastogt/fastocloud_admin.git
synced 2025-03-09 23:38:52 +00:00
Skip if not urls
This commit is contained in:
parent
8f8612cdb8
commit
273c2468ad
1 changed files with 6 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
|||
import argparse
|
||||
import os
|
||||
import sys
|
||||
from datetime import datetime
|
||||
import json
|
||||
from mongoengine import connect
|
||||
import mysql.connector
|
||||
|
||||
|
@ -57,7 +57,11 @@ if __name__ == '__main__':
|
|||
|
||||
for sql_entry in sql_streams:
|
||||
stream = ProxyStream.make_stream(server)
|
||||
stream.output.urls[0].uri = sql_entry['stream_source']
|
||||
urls = json.loads(sql_entry['stream_source'])
|
||||
if not len(urls):
|
||||
continue
|
||||
|
||||
stream.output.urls[0].uri = urls[0]
|
||||
stream.name = sql_entry['stream_display_name']
|
||||
tvg_logo = sql_entry['stream_icon']
|
||||
if len(tvg_logo) < constants.MAX_URL_LENGTH:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue