diff --git a/random_file_picker/core.py b/random_file_picker/core.py index e46aa19..2ad1423 100644 --- a/random_file_picker/core.py +++ b/random_file_picker/core.py @@ -9,15 +9,18 @@ import send2trash WEBHOOK_URL = os.environ.get("RANDOM_FILE_PICKER_WEBHOOK_URL", None) MOVE_FOLDER = os.environ.get("RANDOM_FILE_PICKER_MOVE_FOLDER", None) -SUPPORTED_EXTENSIONS = [ +IMG_EXTENSIONS = [ ".png", ".jpg", ".jpeg", ".webp", ".avif", ".jxl", - + # kind-of, can be opened with image viewer ".gif", +] +SUPPORTED_EXTENSIONS = [ + *IMG_EXTENSIONS, ".mp4", ".m4v", ".mov", diff --git a/random_file_picker/tui.py b/random_file_picker/tui.py index f5d41ce..7364a1d 100644 --- a/random_file_picker/tui.py +++ b/random_file_picker/tui.py @@ -16,7 +16,7 @@ from textual.app import App, ComposeResult from textual.binding import BindingType from textual.widgets import Footer, Header, Label -from random_file_picker.core import collect_files, move_file_to_move_folder, trash_file, upload_file +from random_file_picker.core import IMG_EXTENSIONS, collect_files, move_file_to_move_folder, trash_file, upload_file from random_file_picker.openers import ( is_geeqie_available, open_file_in_dolphin, @@ -24,10 +24,6 @@ from random_file_picker.openers import ( open_file_with_geeqie, ) -IMG_EXTENSIONS = [ - ".jpg", ".jpeg", ".webp", ".png", ".gif", -] - GEEQIE_AVAILABLE = is_geeqie_available() class Args(tap.TypedArgs):