mirror of
https://github.com/FakeTV/pseudo-channel.git
synced 2025-12-11 13:53:37 +00:00
added database scan function
This commit is contained in:
@@ -148,6 +148,17 @@ def generate_daily_schedules(channelsList):
|
|||||||
print(output.strip())
|
print(output.strip())
|
||||||
rc = process.poll()
|
rc = process.poll()
|
||||||
os.chdir('../')
|
os.chdir('../')
|
||||||
|
|
||||||
|
def global_database_update():
|
||||||
|
import Global_DatabaseUpdate
|
||||||
|
'''process = subprocess.Popen(["python", "-u", "Global_DatabaseUpdate.py"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
|
||||||
|
while True:
|
||||||
|
output = process.stdout.readline()
|
||||||
|
if process.poll() is not None:
|
||||||
|
break
|
||||||
|
if output:
|
||||||
|
print(output.strip())
|
||||||
|
rc = process.poll()'''
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description='Pseudo Channel Controls')
|
parser = argparse.ArgumentParser(description='Pseudo Channel Controls')
|
||||||
channelsList = get_channels()
|
channelsList = get_channels()
|
||||||
@@ -176,6 +187,9 @@ parser.add_argument('-r', '--restart',
|
|||||||
parser.add_argument('-g', '--generateschedules',
|
parser.add_argument('-g', '--generateschedules',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help='Generate Daily Schedules for All Channels')
|
help='Generate Daily Schedules for All Channels')
|
||||||
|
parser.add_argument('-u', '--updatedatabase',
|
||||||
|
action='store_true',
|
||||||
|
help='Generate Pseudo Channel Database')
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@@ -221,4 +235,6 @@ if args.generateschedules:
|
|||||||
start_channel(last)
|
start_channel(last)
|
||||||
except:
|
except:
|
||||||
print("GENERATING DAILY SCHEDULES")
|
print("GENERATING DAILY SCHEDULES")
|
||||||
generate_daily_schedules(channelsList)
|
generate_daily_schedules(channelsList)
|
||||||
|
if args.updatedatabase:
|
||||||
|
global_database_update()
|
||||||
Reference in New Issue
Block a user