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>
|
</li>
|
||||||
|
|
||||||
<template v-slot:tooltip>
|
<template #tooltip>
|
||||||
<Search
|
<Search
|
||||||
content="actors"
|
content="actors"
|
||||||
@select="actor => addActor(actor)"
|
@select="actor => addActor(actor)"
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<template v-slot:tooltip>
|
<template #tooltip>
|
||||||
<Search
|
<Search
|
||||||
content="tags"
|
content="tags"
|
||||||
:defaults="['anal', 'blowbang', 'mfm', 'dp', 'gangbang', 'airtight']"
|
:defaults="['anal', 'blowbang', 'mfm', 'dp', 'gangbang', 'airtight']"
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<template v-slot:tooltip>
|
<template #tooltip>
|
||||||
<Search
|
<Search
|
||||||
label="Search channels"
|
label="Search channels"
|
||||||
content="entities"
|
content="entities"
|
||||||
|
@ -181,7 +181,7 @@
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<template v-slot:tooltip>
|
<template #tooltip>
|
||||||
<Search
|
<Search
|
||||||
content="stashes"
|
content="stashes"
|
||||||
@select="stash => addStash(stash)"
|
@select="stash => addStash(stash)"
|
||||||
|
@ -194,6 +194,7 @@
|
||||||
|
|
||||||
<div class="dialog-actions right">
|
<div class="dialog-actions right">
|
||||||
<button
|
<button
|
||||||
|
:disabled="actors.length === 0 && tags.length === 0 && !entity"
|
||||||
type="submit"
|
type="submit"
|
||||||
class="button button-primary"
|
class="button button-primary"
|
||||||
>Add alert</button>
|
>Add alert</button>
|
||||||
|
@ -210,19 +211,19 @@ import Search from './search.vue';
|
||||||
|
|
||||||
async function addAlert() {
|
async function addAlert() {
|
||||||
await this.$store.dispatch('addAlert', {
|
await this.$store.dispatch('addAlert', {
|
||||||
actors: this.actors.map(actor => actor.id),
|
actors: this.actors.map((actor) => actor.id),
|
||||||
tags: this.tags.map(tag => tag.id),
|
tags: this.tags.map((tag) => tag.id),
|
||||||
entity: this.entity?.id,
|
entity: this.entity?.id,
|
||||||
notify: this.notify,
|
notify: this.notify,
|
||||||
email: this.email,
|
email: this.email,
|
||||||
stashes: this.stashes.map(stash => stash.id),
|
stashes: this.stashes.map((stash) => stash.id),
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$emit('close', true);
|
this.$emit('close', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function addActor(actor) {
|
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);
|
this.actors = this.actors.concat(actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,7 +236,7 @@ function addEntity(entity) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function addTag(tag) {
|
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);
|
this.tags = this.tags.concat(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,7 +244,7 @@ function addTag(tag) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeActor(actor) {
|
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() {
|
function removeEntity() {
|
||||||
|
@ -251,11 +252,11 @@ function removeEntity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeTag(tag) {
|
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) {
|
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);
|
this.stashes = this.stashes.concat(stash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,7 +264,7 @@ function addStash(stash) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeStash(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 {
|
export default {
|
||||||
|
@ -273,6 +274,7 @@ export default {
|
||||||
Entity,
|
Entity,
|
||||||
Search,
|
Search,
|
||||||
},
|
},
|
||||||
|
emits: ['close'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
actors: [],
|
actors: [],
|
||||||
|
@ -284,7 +286,6 @@ export default {
|
||||||
availableStashes: this.$store.state.auth.user.stashes,
|
availableStashes: this.$store.state.auth.user.stashes,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
emits: ['close'],
|
|
||||||
methods: {
|
methods: {
|
||||||
addActor,
|
addActor,
|
||||||
addAlert,
|
addAlert,
|
||||||
|
|
|
@ -44,6 +44,11 @@
|
||||||
&:hover {
|
&:hover {
|
||||||
background: var(--primary-strong);
|
background: var(--primary-strong);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
background: var(--shadow-weak);
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-secondary {
|
.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
|
release.tags = scene.master_categories
|
||||||
.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
|
||||||
|
*/
|
||||||
|
|
||||||
|
release.tags = scene.categories?.map((category) => category.name).filter(Boolean); // some categories don't have a name
|
||||||
|
|
||||||
if (scene.availableOnSite.length > 1) {
|
if (scene.availableOnSite.length > 1) {
|
||||||
release.comment = `Also available on ${scene.availableOnSite.filter((sisterSite) => sisterSite !== site.slug).join(', ')}`;
|
release.comment = `Also available on ${scene.availableOnSite.filter((sisterSite) => sisterSite !== site.slug).join(', ')}`;
|
||||||
|
|
Loading…
Reference in New Issue