Skip to content

Commit c070ac3

Browse files
authored
Enhance file type detection to include audio formats and bump version to 0.6.2 (#11)
1 parent 95c91d3 commit c070ac3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

code_buddy/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ 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'}
4848
video_extensions = {'.webm', '.wmv', '.flv', '.ogv', '.mkv', '.avi', '.mov', '.mp4', '.f4v', '.vob', '.nsv', '.roq'}
49-
extensions = image_extensions.union(video_extensions)
49+
audio_extensions = {'.wav', '.mp3', '.aiff', '.ogg', '.flac', '.m4a', '.aac', '.wma', '.mid', '.ape', '.au', '.mpa', '.shn', '.dts', '.adt', '.m4p', '.rmj', '.rm', '.rvb', '.amr', '.8svx', '.dvf', '.wv', '.kar', '.ics', '.nvf', '.obw', '.cfa'}
50+
other_extensions = {'.json'}
51+
extensions = image_extensions.union(video_extensions).union(audio_extensions).union(other_extensions)
5052
return Path(filename).suffix.lower() in extensions
5153

5254
# is_file_name: takes a path to a file and returns False if file is excluded, file can be a relative path

version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# version.py
2-
__version__ = "0.6.1"
2+
__version__ = "0.6.2"

0 commit comments

Comments
 (0)