timberline-secondary / hackerspace-scripts

Scripts for managing the Hackerspace's network
1 stars 2 forks source link

Detect image/video extensions for TVs #11

Open tylerecouture opened 7 years ago

tylerecouture commented 7 years ago

When adding an image or video file (does the add image script work with video files?), check that the file is of an acceptable image.video type by looking at the file's extension.

Perhaps create an array of acceptable file types at the top of the script:

ACCEPTABLE_MEDIA_EXTENSIONS=( "jpg" "png" mp4" ...etc )

Then, before downloading the file, confirm the link/file has an extension that is in the array. If not, Quit with explanation.

PederSkaaravik commented 7 years ago

a very simple task, will be done by tomorow at the latest.