Skip to content

Commit

Permalink
Fix ControlPlayer, open multiple files
Browse files Browse the repository at this point in the history
  • Loading branch information
UmSenhorQualquer committed Mar 1, 2019
1 parent 1ae2b7e commit d1b0843
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pyforms_gui/controls/control_player/multiple_videocapture.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ def search_files(cls, filepath):
filename = os.path.basename(filepath)
name, ext = os.path.splitext(filename)

names = name.rsplit('_', 1)
search_name = os.path.join(filedir, names[0] + '_*' + ext)
return sorted(glob.glob(search_name))
if name.endswith('_1') or name.endswith('_01'):
names = name.rsplit('_', 1)
search_name = os.path.join(filedir, names[0] + '_*' + ext)
return sorted(glob.glob(search_name))
else:
return []

@property
def capture(self):
Expand Down

0 comments on commit d1b0843

Please sign in to comment.