2018-03-18 01:04:04 +01:00
|
|
|
'''Environment variable management.'''
|
|
|
|
|
|
|
|
from os import getenv
|
|
|
|
|
|
|
|
from dotenv import load_dotenv, find_dotenv
|
|
|
|
|
2018-07-20 17:25:41 +02:00
|
|
|
|
2018-03-18 01:04:04 +01:00
|
|
|
def no_check_certificate():
|
2018-04-03 03:48:56 +02:00
|
|
|
'''Returns whether fediplay should check TLS certificates.'''
|
|
|
|
|
2018-03-18 01:04:04 +01:00
|
|
|
return bool(getenv('FEDIPLAY_NO_CHECK_CERTIFICATE'))
|
|
|
|
|
|
|
|
def play_command():
|
2018-04-03 03:48:56 +02:00
|
|
|
'''Returns the play command fediplay should use to play a file.'''
|
|
|
|
|
2018-03-18 01:04:04 +01:00
|
|
|
return (getenv('FEDIPLAY_PLAY_COMMAND') or
|
|
|
|
'ffplay -v 0 -nostats -hide_banner -autoexit -nodisp {filename}')
|
|
|
|
|
|
|
|
load_dotenv(find_dotenv())
|