@bebranded/bb-contents 1.0.9-beta → 1.0.10-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bb-contents.js +16 -2
- package/package.json +1 -1
package/bb-contents.js
CHANGED
|
@@ -498,10 +498,24 @@
|
|
|
498
498
|
let videos = data.items;
|
|
499
499
|
if (!allowShorts) {
|
|
500
500
|
videos = videos.filter(item => {
|
|
501
|
-
// Filtrer les shorts (vidéos
|
|
501
|
+
// Filtrer les shorts (vidéos avec #shorts dans le titre ou description)
|
|
502
502
|
const title = item.snippet.title.toLowerCase();
|
|
503
503
|
const description = item.snippet.description.toLowerCase();
|
|
504
|
-
|
|
504
|
+
|
|
505
|
+
// Détecter les shorts par plusieurs critères
|
|
506
|
+
const isShort =
|
|
507
|
+
title.includes('#shorts') ||
|
|
508
|
+
title.includes('#short') ||
|
|
509
|
+
description.includes('#shorts') ||
|
|
510
|
+
description.includes('#short') ||
|
|
511
|
+
title.includes('shorts') ||
|
|
512
|
+
description.includes('shorts');
|
|
513
|
+
|
|
514
|
+
if (isShort) {
|
|
515
|
+
bbContents.utils.log(`Short détecté et filtré: "${item.snippet.title}"`);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
return !isShort;
|
|
505
519
|
});
|
|
506
520
|
bbContents.utils.log(`Filtrage des shorts: ${data.items.length} → ${videos.length} vidéos`);
|
|
507
521
|
}
|