Only offer video files
This commit is contained in:
parent
789f86de25
commit
d4601a77b9
1 changed files with 5 additions and 1 deletions
|
@ -57,6 +57,7 @@ class MainWindow(Gtk.ApplicationWindow):
|
|||
left_box.set_valign(Gtk.Align.CENTER)
|
||||
left_box.set_halign(Gtk.Align.FILL)
|
||||
self.file_info_label = Gtk.Label(label="")
|
||||
self.file_info_label.set_wrap(True)
|
||||
left_box.append(self.file_info_label)
|
||||
|
||||
# Right two-thirds (2/3 width)
|
||||
|
@ -157,9 +158,12 @@ class MainWindow(Gtk.ApplicationWindow):
|
|||
with os.scandir(".") as it:
|
||||
for entry in it:
|
||||
if entry.name == ".." or not entry.name.startswith("."):
|
||||
parts = entry.name.split(".")
|
||||
suffix = parts[-1] if len(parts) >= 2 else ""
|
||||
|
||||
if entry.is_dir():
|
||||
directories.append(entry.name + "/")
|
||||
else:
|
||||
elif suffix in ("mkv", "mp4", "avi"):
|
||||
files.append(entry.name)
|
||||
|
||||
directories.sort(key=lambda x: x.lower())
|
||||
|
|
Loading…
Reference in a new issue