Add a playback command.
This commit is contained in:
parent
a7e2f04bde
commit
fe463c273c
2 changed files with 18 additions and 0 deletions
17
dcc/pb.py
Normal file
17
dcc/pb.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
from cliff.command import Command
|
||||
import dcc.config
|
||||
import vlc
|
||||
|
||||
class PB(Command):
|
||||
def get_parser(self, prog_name):
|
||||
parser = super().get_parser(prog_name)
|
||||
parser.add_argument('wad')
|
||||
parser.add_argument('map')
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
v = dcc.config.VideoPath(parsed_args.wad, parsed_args.map)
|
||||
mp = vlc.MediaPlayer(v)
|
||||
mp.play()
|
||||
while True:
|
||||
pass
|
1
setup.py
1
setup.py
|
@ -25,6 +25,7 @@ setup(
|
|||
'record = dcc.record:Record',
|
||||
'fabricate = dcc.fabricate:Fabricate',
|
||||
'put = dcc.put:Put',
|
||||
'pb = dcc.pb:PB',
|
||||
],
|
||||
},
|
||||
zip_safe=False,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue