Skip to content

Commit 95c91d3

Browse files
authored
Enhance file type detection to include video formats and bump version to 0.6.1 (#10)
1 parent f285bf6 commit 95c91d3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

code_buddy/main.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ def get_all_files(repo):
4545
def is_image_file(filename):
4646
"""Check if a file is an image based on its extension."""
4747
image_extensions = {'.jpg', '.jpeg', '.png', '.gif', '.bmp', '.tiff', '.webp', '.svg', '.ico', '.yaml', '.woff'}
48-
return Path(filename).suffix.lower() in image_extensions
48+
video_extensions = {'.webm', '.wmv', '.flv', '.ogv', '.mkv', '.avi', '.mov', '.mp4', '.f4v', '.vob', '.nsv', '.roq'}
49+
extensions = image_extensions.union(video_extensions)
50+
return Path(filename).suffix.lower() in extensions
4951

5052
# is_file_name: takes a path to a file and returns False if file is excluded, file can be a relative path
5153
def is_excluded_file_name(file):

version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# version.py
2-
__version__ = "0.6.0"
2+
__version__ = "0.6.1"

0 commit comments

Comments
 (0)