Adding comment listing sister sites for non-exclusive Gamma API scenes.

This commit is contained in:
DebaucheryLibrarian 2022-01-07 01:07:41 +01:00
parent 1c24cae3b1
commit baebdbc0bb
1 changed files with 4 additions and 0 deletions

View File

@ -237,6 +237,10 @@ async function scrapeApiReleases(json, site) {
.concat(scene.categories?.map((category) => category.name)) .concat(scene.categories?.map((category) => category.name))
.filter(Boolean); // some categories don't have a 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(', ')}`;
}
const posterPath = scene.pictures.resized || (scene.pictures.nsfw?.top && Object.values(scene.pictures.nsfw.top)[0]); const posterPath = scene.pictures.resized || (scene.pictures.nsfw?.top && Object.values(scene.pictures.nsfw.top)[0]);
if (posterPath) { if (posterPath) {