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
|
Loading…
Add table
Add a link
Reference in a new issue