feat: détection short par orientation vidéo
CI / build-and-test (push) Successful in 14m6s

Règle partagée front/back : flag natif, verticale stricte (ratio ≤ 0.8, ≤ 90 s), verticale sans durée jamais short, repli durée (70 YT / 75 autres). Dimensions alimentées par Dailymotion/Odysee/PeerTube, flag maison Rumble supprimé, condition innertube morte simplifiée. Shorts : langues utilisateur (UI + transcripts) via relevanceLanguage/languageOneOf/Twitch language, son activé par défaut.
This commit is contained in:
2026-09-29 12:17:10 -04:00
parent 3f4cd56f14
commit f443a470f9
22 changed files with 454 additions and 73 deletions
+12 -12
View File
@@ -221,18 +221,18 @@ function parseSearchHtml(html, { limit = 50 } = {}) {
}
const viewsText = $el.find('.video-item--views').first().text().trim();
const views = Number(String(viewsText).replace(/[^\d]/g, '')) || undefined;
items.push({
title: title || url,
id,
url,
thumbnail: normalizeThumb(rawThumbnail),
uploaderName: uploaderName || undefined,
views,
type: 'video',
duration: durationSeconds,
// Pas de flag natif côté Rumble : durée courte (1..75 s) ⇒ Short probable.
isShort: typeof durationSeconds === 'number' && durationSeconds > 0 && durationSeconds <= 75,
});
items.push({
title: title || url,
id,
url,
thumbnail: normalizeThumb(rawThumbnail),
uploaderName: uploaderName || undefined,
views,
type: 'video',
duration: durationSeconds,
// Pas de flag maison ici : le filtre central (isShortItem,
// durée ≤75 s) tranche. Le scraper HTML n'expose pas de dimensions.
});
});
return items;
}