[misc] join videos under current folder
This commit is contained in:
parent
861e266cf7
commit
4b8fae2550
|
@ -174,9 +174,12 @@ class fzf_edit(Command):
|
||||||
|
|
||||||
class mediacut_join(Command):
|
class mediacut_join(Command):
|
||||||
def execute(self):
|
def execute(self):
|
||||||
""" Concatenate selected video """
|
""" Concatenate video inside cursor folder """
|
||||||
cwd = self.fm.thisdir
|
thisfile = self.fm.thisfile
|
||||||
marked_files = cwd.get_selection()
|
if not thisfile.filetype.startswith('inode/directory'):
|
||||||
|
return
|
||||||
|
|
||||||
|
marked_files = [file.path for file in thisfile.files if file.filetype.startswith('video')]
|
||||||
|
|
||||||
if not marked_files:
|
if not marked_files:
|
||||||
return
|
return
|
||||||
|
@ -187,9 +190,9 @@ class mediacut_join(Command):
|
||||||
|
|
||||||
tmppath = '/tmp/concate-recording'
|
tmppath = '/tmp/concate-recording'
|
||||||
with open(tmppath, 'w') as f:
|
with open(tmppath, 'w') as f:
|
||||||
f.writelines("file {}".format(f.path) + '\n' for f in marked_files)
|
f.writelines("file {}".format(v) + '\n' for v in marked_files)
|
||||||
|
|
||||||
original_path = cwd.path
|
original_path = self.fm.thisdir
|
||||||
|
|
||||||
descr = "concatenating"
|
descr = "concatenating"
|
||||||
obj = CommandLoader(
|
obj = CommandLoader(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user