Compare commits
No commits in common. "87ca707851312c396a8ae47add5b723036c97e0b" and "cc224901e71470342e53f0a004c040e06e5ccf46" have entirely different histories.
87ca707851
...
cc224901e7
3 changed files with 5 additions and 5 deletions
|
@ -19,4 +19,4 @@ COPY . .
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
CMD [ "waitress-serve", "--port=8080", "--threads=16", "--call", "api:create_app"]
|
CMD [ "waitress-serve", "--port=8080", "--call", "api:create_app"]
|
||||||
|
|
|
@ -229,7 +229,7 @@ scheduler.get_job('core_api_sync').modify(next_run_time=datetime.now())
|
||||||
# Start the scheduler
|
# Start the scheduler
|
||||||
scheduler.start()
|
scheduler.start()
|
||||||
|
|
||||||
### Flask ###
|
## Flask
|
||||||
# Frontend
|
# Frontend
|
||||||
@app.route('/', methods=['GET'])
|
@app.route('/', methods=['GET'])
|
||||||
def root_route():
|
def root_route():
|
||||||
|
@ -246,7 +246,7 @@ def root_route():
|
||||||
thumbnails = [file for file in os.listdir(f'{rec_path}/thumb/') if file.endswith('.png')]
|
thumbnails = [file for file in os.listdir(f'{rec_path}/thumb/') if file.endswith('.png')]
|
||||||
return render_template('index.html', now=datetime.utcnow(), video_files=video_files, thumbnails=sorted_thumbnails)
|
return render_template('index.html', now=datetime.utcnow(), video_files=video_files, thumbnails=sorted_thumbnails)
|
||||||
|
|
||||||
# JSON Data
|
# API
|
||||||
@app.route('/playhead', methods=['GET'])
|
@app.route('/playhead', methods=['GET'])
|
||||||
def playhead_route():
|
def playhead_route():
|
||||||
global playhead
|
global playhead
|
||||||
|
|
|
@ -60,9 +60,9 @@ async def hello_error(ctx, error):
|
||||||
if isinstance(error, CheckFailure):
|
if isinstance(error, CheckFailure):
|
||||||
await ctx.channel.send('do I know you?')
|
await ctx.channel.send('do I know you?')
|
||||||
|
|
||||||
@bot.command(name='time', help='Show current time in UTC')
|
@bot.command(name='time', help='Show current time')
|
||||||
async def time(ctx):
|
async def time(ctx):
|
||||||
await ctx.channel.send(f'The Coordinated Universal Time is `{datetime.now(timezone.utc)}`')
|
await ctx.channel.send(f'The time is: `{datetime.now(timezone.utc)} UTC`')
|
||||||
|
|
||||||
@bot.command(name='epg', help='Lists scheduled streams')
|
@bot.command(name='epg', help='Lists scheduled streams')
|
||||||
async def epg(ctx):
|
async def epg(ctx):
|
||||||
|
|
Loading…
Add table
Reference in a new issue