Don't import files if they don't have the supportted format extension,
[catagits/App-IdiotBox.git] / lib / App / IdiotBox.pm
index b1fc058..081327e 100644 (file)
@@ -1,5 +1,6 @@
 package App::IdiotBox;
 
+use App::IdiotBox::Common qw(@SupportedFormats);
 use Web::Simple __PACKAGE__;
 use FindBin;
 use HTML::Zoom;
@@ -123,7 +124,7 @@ sub show_video {
     -e join('/', $self->config->{base_dir}, $_)
   } map {
     join('/', $video->bucket->slug, $video->slug, $video->file_name.".$_")
-  } qw(flv m4v);
+  } @SupportedFormats;
   $self->html_response(video => sub {
     my $video_url = 
       $self->base_url