Permalink
Browse files

Fix video page links, put your videos in root/static/videos/<bucket>/…

…<video>/<videofile>
  • Loading branch information...
1 parent 47998e8 commit 437d54626973895ddf3fab4854ac804a46681dda Unknown committed Jun 30, 2012
Showing with 5 additions and 1 deletion.
  1. +3 −1 lib/PresentingPerl/Web/Controller/Root.pm
  2. +2 −0 presentingperl_web.conf
@@ -65,8 +65,10 @@ sub video :Path :Args(2) {
my $video_file = first {
-e join('/', $c->path_to('root/static'), $_)
} map {
- join('/', $videorow->bucket->slug, $videorow->slug, $videorow->file_name.".$_")
+ join('/', 'videos', $videorow->bucket->slug, $videorow->slug, $videorow->file_name.".$_")
} @{ $c->config->{SupportedFormats} };
+
+ $c->log->debug("File: $video_file, row: $videorow");
return $c->forward('default') if(!$videorow || !$video_file);
$video_file = $c->req->base . 'static/' . $video_file;
@@ -2,6 +2,8 @@
# you want to use YAML like in old versions of Catalyst
name PresentingPerl::Web
default_view TT
+SupportedFormats flv
+SupportedFormats avi
<Model::DB>
<connect_info>

0 comments on commit 437d546

Please sign in to comment.