Ignoring Gamma master categories in update scrape as these seem to contain irrelevant tags.
This commit is contained in:
parent
285a65f018
commit
b9f3eb85f9
|
@ -46,7 +46,7 @@
|
|||
/>
|
||||
</li>
|
||||
|
||||
<template v-slot:tooltip>
|
||||
<template #tooltip>
|
||||
<Search
|
||||
content="actors"
|
||||
@select="actor => addActor(actor)"
|
||||
|
@ -88,7 +88,7 @@
|
|||
/>
|
||||
</li>
|
||||
|
||||
<template v-slot:tooltip>
|
||||
<template #tooltip>
|
||||
<Search
|
||||
content="tags"
|
||||
:defaults="['anal', 'blowbang', 'mfm', 'dp', 'gangbang', 'airtight']"
|
||||
|
@ -126,7 +126,7 @@
|
|||
/>
|
||||
</div>
|
||||
|
||||
<template v-slot:tooltip>
|
||||
<template #tooltip>
|
||||
<Search
|
||||
label="Search channels"
|
||||
content="entities"
|
||||
|
@ -181,7 +181,7 @@
|
|||
/>
|
||||
</li>
|
||||
|
||||
<template v-slot:tooltip>
|
||||
<template #tooltip>
|
||||
<Search
|
||||
content="stashes"
|
||||
@select="stash => addStash(stash)"
|
||||
|
@ -194,6 +194,7 @@
|
|||
|
||||
<div class="dialog-actions right">
|
||||
<button
|
||||
:disabled="actors.length === 0 && tags.length === 0 && !entity"
|
||||
type="submit"
|
||||
class="button button-primary"
|
||||
>Add alert</button>
|
||||
|
@ -210,19 +211,19 @@ import Search from './search.vue';
|
|||
|
||||
async function addAlert() {
|
||||
await this.$store.dispatch('addAlert', {
|
||||
actors: this.actors.map(actor => actor.id),
|
||||
tags: this.tags.map(tag => tag.id),
|
||||
actors: this.actors.map((actor) => actor.id),
|
||||
tags: this.tags.map((tag) => tag.id),
|
||||
entity: this.entity?.id,
|
||||
notify: this.notify,
|
||||
email: this.email,
|
||||
stashes: this.stashes.map(stash => stash.id),
|
||||
stashes: this.stashes.map((stash) => stash.id),
|
||||
});
|
||||
|
||||
this.$emit('close', true);
|
||||
}
|
||||
|
||||
function addActor(actor) {
|
||||
if (!this.actors.some(selectedActor => selectedActor.id === actor.id)) {
|
||||
if (!this.actors.some((selectedActor) => selectedActor.id === actor.id)) {
|
||||
this.actors = this.actors.concat(actor);
|
||||
}
|
||||
|
||||
|
@ -235,7 +236,7 @@ function addEntity(entity) {
|
|||
}
|
||||
|
||||
function addTag(tag) {
|
||||
if (!this.tags.some(selectedTag => selectedTag.id === tag.id)) {
|
||||
if (!this.tags.some((selectedTag) => selectedTag.id === tag.id)) {
|
||||
this.tags = this.tags.concat(tag);
|
||||
}
|
||||
|
||||
|
@ -243,7 +244,7 @@ function addTag(tag) {
|
|||
}
|
||||
|
||||
function removeActor(actor) {
|
||||
this.actors = this.actors.filter(listedActor => listedActor.id !== actor.id);
|
||||
this.actors = this.actors.filter((listedActor) => listedActor.id !== actor.id);
|
||||
}
|
||||
|
||||
function removeEntity() {
|
||||
|
@ -251,11 +252,11 @@ function removeEntity() {
|
|||
}
|
||||
|
||||
function removeTag(tag) {
|
||||
this.tags = this.tags.filter(listedTag => listedTag.id !== tag.id);
|
||||
this.tags = this.tags.filter((listedTag) => listedTag.id !== tag.id);
|
||||
}
|
||||
|
||||
function addStash(stash) {
|
||||
if (!this.stashes.some(selectedStash => selectedStash.id === stash.id)) {
|
||||
if (!this.stashes.some((selectedStash) => selectedStash.id === stash.id)) {
|
||||
this.stashes = this.stashes.concat(stash);
|
||||
}
|
||||
|
||||
|
@ -263,7 +264,7 @@ function addStash(stash) {
|
|||
}
|
||||
|
||||
function removeStash(stash) {
|
||||
this.stashes = this.stashes.filter(listedStash => listedStash.id !== stash.id);
|
||||
this.stashes = this.stashes.filter((listedStash) => listedStash.id !== stash.id);
|
||||
}
|
||||
|
||||
export default {
|
||||
|
@ -273,6 +274,7 @@ export default {
|
|||
Entity,
|
||||
Search,
|
||||
},
|
||||
emits: ['close'],
|
||||
data() {
|
||||
return {
|
||||
actors: [],
|
||||
|
@ -284,7 +286,6 @@ export default {
|
|||
availableStashes: this.$store.state.auth.user.stashes,
|
||||
};
|
||||
},
|
||||
emits: ['close'],
|
||||
methods: {
|
||||
addActor,
|
||||
addAlert,
|
||||
|
|
|
@ -44,6 +44,11 @@
|
|||
&:hover {
|
||||
background: var(--primary-strong);
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
background: var(--shadow-weak);
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
.button-secondary {
|
||||
|
|
|
@ -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(', ')}`;
|
||||
|
|
Loading…
Reference in New Issue