file_path()) . " 2>&1";
$result = `$cmd`;
if (preg_match("/Duration: (\d+):(\d+):(\d+\.\d+)/", $result, $regs)) {
return 3600 * $regs[1] + 60 * $regs[2] + $regs[3];
} else if (preg_match("/duration.*?:.*?(\d+)/", $result, $regs)) {
return $regs[1];
} else {
return '00';
}
}
static function head($theme, $child) {
if ($theme->page_type == "collection") {
$trans = module::get_var("movie_overlay", "trans");
return "\t";
}
}
static function thumb_top($theme, $child) {
if ($child->type == "movie") {
return ("
thumb_width}px;\">\n");
}
}
static function thumb_bottom($theme, $child) {
if ($child->type == "movie") {
$view = new View("movie_thumb_bottom.html");
// pass some variable to the view
$view->url = $child->url();
$view->top = round($child->thumb_height / 2 - 20);
$view->texttime_top = round($child->thumb_height - 25); // position the movie duration from the top as some themes add stuff below the thumb
$view->left = round($child->thumb_width / 2 - 20);
$view->images_url = url::file("modules/movie_overlay/images");
$view->icon = module::get_var("movie_overlay", "icon");
$view->trans = module::get_var("movie_overlay", "trans");
$view->movie_time = number_format(movie_overlay_theme_Core::get_movie_time($child), 2);
return $view;
}
}
}