Ignoring Gamma master categories in update scrape as these seem to contain irrelevant tags.

This commit is contained in:
DebaucheryLibrarian
2022-02-01 21:18:54 +01:00
parent 285a65f018
commit b9f3eb85f9
3 changed files with 24 additions and 14 deletions

View File

@@ -238,9 +238,13 @@ async function scrapeApiReleases(json, site) {
],
}));
/* master categories include e.g. 'transgender' for non-trans Wicked scenes
release.tags = scene.master_categories
.concat(scene.categories?.map((category) => category.name))
.filter(Boolean); // some categories don't have a name
*/
release.tags = scene.categories?.map((category) => category.name).filter(Boolean); // some categories don't have a name
if (scene.availableOnSite.length > 1) {
release.comment = `Also available on ${scene.availableOnSite.filter((sisterSite) => sisterSite !== site.slug).join(', ')}`;