diff --git a/bridges/Arte7Bridge.php b/bridges/Arte7Bridge.php
index fb2aa930..8baa4e6f 100644
--- a/bridges/Arte7Bridge.php
+++ b/bridges/Arte7Bridge.php
@@ -10,6 +10,14 @@ class Arte7Bridge extends BridgeAbstract {
const API_TOKEN = 'Nzc1Yjc1ZjJkYjk1NWFhN2I2MWEwMmRlMzAzNjI5NmU3NWU3ODg4ODJjOWMxNTMxYzEzZGRjYjg2ZGE4MmIwOA';
const PARAMETERS = array(
+ 'global' => [
+ 'video_duration_filter' => [
+ 'name' => 'Exclude short videos',
+ 'type' => 'checkbox',
+ 'title' => 'Exclude videos that are shorter than 3 minutes',
+ 'defaultValue' => '',
+ ],
+ ],
'Catégorie (Français)' => array(
'catfr' => array(
'type' => 'list',
@@ -97,6 +105,11 @@ class Arte7Bridge extends BridgeAbstract {
$input_json = json_decode($input, true);
foreach($input_json['videos'] as $element) {
+ $durationSeconds = $element['durationSeconds'];
+
+ if ($this->getInput('video_duration_filter') && $durationSeconds < 60 * 3) {
+ continue;
+ }
$item = array();
$item['uri'] = $element['url'];
@@ -108,10 +121,10 @@ class Arte7Bridge extends BridgeAbstract {
if(!empty($element['subtitle']))
$item['title'] = $element['title'] . ' | ' . $element['subtitle'];
- $item['duration'] = round((int)$element['durationSeconds'] / 60);
+ $durationMinutes = round((int)$durationSeconds / 60);
$item['content'] = $element['teaserText']
. '
'
- . $item['duration']
+ . $durationMinutes
. 'min
