Changing the hardcoded file extension checks with an array of file extensions and using that to determine if the file is a movie or not