27 lines
448 B
Python
27 lines
448 B
Python
#!/usr/bin/env python
|
|
import sys
|
|
|
|
from Jiffy import Jiffy
|
|
|
|
jiffy = Jiffy(
|
|
host='dashpi-g1',
|
|
api_url_v1_0='api/v1',
|
|
api_url_v1_2='api/v1.2',
|
|
credentials=(
|
|
'admin',
|
|
'hacklab'
|
|
)
|
|
)
|
|
|
|
if not len(sys.argv):
|
|
raise Exception('You forgot the file url. Moron.')
|
|
|
|
file_url = sys.argv[1]
|
|
|
|
if len(sys.argv) >= 3:
|
|
duration = sys.argv[2]
|
|
else:
|
|
duration = 10
|
|
|
|
jiffy.display_media_from_url(file_url, duration)
|