Added fix to media preload code to ignore media extensions without filenames