Switched to tabs. Adding missing actor entries when scraping actors, with batch ID.

This commit is contained in:
2020-05-14 04:26:05 +02:00
parent f1eb29c713
commit 11eb66f834
178 changed files with 16594 additions and 16929 deletions

View File

@@ -1,15 +1,15 @@
import { graphql, get } from '../api';
import {
releaseFields,
releaseFields,
} from '../fragments';
import { curateTag } from '../curate';
import getDateRange from '../get-date-range';
function initTagsActions(store, _router) {
async function fetchTagBySlug({ _commit }, { tagSlug, limit = 100, range = 'latest' }) {
const { before, after, orderBy } = getDateRange(range);
async function fetchTagBySlug({ _commit }, { tagSlug, limit = 100, range = 'latest' }) {
const { before, after, orderBy } = getDateRange(range);
const { tagBySlug } = await graphql(`
const { tagBySlug } = await graphql(`
query Tag(
$tagSlug:String!
$limit:Int = 1000,
@@ -85,24 +85,24 @@ function initTagsActions(store, _router) {
}
}
`, {
tagSlug,
limit,
after,
before,
orderBy: orderBy === 'DATE_DESC' ? 'RELEASE_BY_RELEASE_ID__DATE_DESC' : 'RELEASE_BY_RELEASE_ID__DATE_ASC',
exclude: store.state.ui.filter,
});
tagSlug,
limit,
after,
before,
orderBy: orderBy === 'DATE_DESC' ? 'RELEASE_BY_RELEASE_ID__DATE_DESC' : 'RELEASE_BY_RELEASE_ID__DATE_ASC',
exclude: store.state.ui.filter,
});
return curateTag(tagBySlug, store);
}
return curateTag(tagBySlug, store);
}
async function fetchTags({ _commit }, {
limit = 100,
slugs = [],
_group,
_priority,
}) {
const { tags } = await graphql(`
async function fetchTags({ _commit }, {
limit = 100,
slugs = [],
_group,
_priority,
}) {
const { tags } = await graphql(`
query Tags(
$slugs: [String!] = [],
$limit: Int = 100
@@ -133,28 +133,28 @@ function initTagsActions(store, _router) {
}
}
`, {
slugs,
limit,
});
slugs,
limit,
});
return tags.map(tag => curateTag(tag, store.state.ui.sfw));
}
return tags.map(tag => curateTag(tag, store.state.ui.sfw));
}
async function fetchTagReleases({ _commit }, tagId) {
const releases = await get(`/tags/${tagId}/releases`, {
filter: store.state.ui.filter,
after: store.getters.after,
before: store.getters.before,
});
async function fetchTagReleases({ _commit }, tagId) {
const releases = await get(`/tags/${tagId}/releases`, {
filter: store.state.ui.filter,
after: store.getters.after,
before: store.getters.before,
});
return releases;
}
return releases;
}
return {
fetchTagBySlug,
fetchTags,
fetchTagReleases,
};
return {
fetchTagBySlug,
fetchTags,
fetchTagReleases,
};
}
export default initTagsActions;

View File

@@ -3,11 +3,11 @@ import mutations from './mutations';
import actions from './actions';
function initTagsStore(store, router) {
return {
state,
mutations,
actions: actions(store, router),
};
return {
state,
mutations,
actions: actions(store, router),
};
}
export default initTagsStore;