Skip to content

Commit

Permalink
Addressed comment:
Browse files Browse the repository at this point in the history
  • Loading branch information
Krish Patel committed Jun 20, 2023
1 parent 84a5162 commit f43cdef
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions openadapt/scripts/scrub.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,29 +61,5 @@ def scrub_mp4(mp4_file: str) -> str:
return scrubbed_file


def scrub_media_file(media_file_path: str) -> str:
"""
Scrub a media file based on its extension.
Args:
media_file_path: Path to the media file.
Returns:
Path to the scrubbed media file.
"""

file_extension = os.path.splitext(media_file_path)[1].lower()
scrub_functions = {
".mp4": scrub_mp4,
# Add more extensions and corresponding functions as needed
}

if file_extension in scrub_functions:
scrub_function = scrub_functions[file_extension]
return scrub_function(media_file_path)
logger.info(f"Unsupported media file format: {file_extension}")
return ""


if __name__ == "__main__":
fire.Fire(utils.get_functions(__name__))

0 comments on commit f43cdef

Please sign in to comment.