diff --git a/blocks/ORB/List.pm b/blocks/ORB/List.pm index dcea024..7e5f61d 100644 --- a/blocks/ORB/List.pm +++ b/blocks/ORB/List.pm @@ -73,7 +73,8 @@ sub _build_recipe { }); } - my $time = ($recipe -> {"preptime"} + $recipe -> {"cooktime"}) * 60; + my $time = (($recipe -> {"preptime"} // 0) + + ($recipe -> {"cooktime"} // 0) ) * 60; return $self -> {"template"} -> load_template("list/recipe.tem", { "%(id)s" => $recipe -> {"id"}, diff --git a/blocks/ORB/Search.pm b/blocks/ORB/Search.pm index f39b467..8cfda89 100644 --- a/blocks/ORB/Search.pm +++ b/blocks/ORB/Search.pm @@ -71,7 +71,8 @@ sub _build_recipe { }); } - my $time = ($recipe -> {"preptime"} + $recipe -> {"cooktime"}) * 60; + my $time = (($recipe -> {"preptime"} // 0) + + ($recipe -> {"cooktime"} // 0) ) * 60; return $self -> {"template"} -> load_template("search/recipe.tem", { "%(id)s" => $recipe -> {"id"}, diff --git a/blocks/ORB/View.pm b/blocks/ORB/View.pm index f954807..ac5fc57 100644 --- a/blocks/ORB/View.pm +++ b/blocks/ORB/View.pm @@ -159,7 +159,7 @@ sub _generate_view { my $cooktime = $recipe -> {"cooktime"} ? $self -> {"template"} -> humanise_seconds($recipe -> {"cooktime"} * 60) : "{L_VIEW_NOTSET}"; - my $totaltime = $recipe -> {"preptime"} + $recipe -> {"cooktime"}; + my $totaltime = ($recipe -> {"preptime"} // 0) + ($recipe -> {"cooktime"} // 0); my $timereq = $totaltime ? $self -> {"template"} -> humanise_seconds($totaltime * 60) : "{L_VIEW_NOTSET}";