Fix scene scraping (#3569)

This commit is contained in:
WithoutPants 2023-03-21 12:42:55 +11:00 committed by GitHub
parent 496c36493b
commit f6387c1018
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 2 deletions

View File

@ -256,7 +256,6 @@ export const SceneEditPanel: React.FC<IProps> = ({
}
async function onSave(input: InputValues) {
console.log("onSave", input);
setIsLoading(true);
try {
if (!isNew) {
@ -352,7 +351,17 @@ export const SceneEditPanel: React.FC<IProps> = ({
) {
setIsLoading(true);
try {
const result = await queryScrapeSceneQueryFragment(s, fragment);
const input: GQL.ScrapedSceneInput = {
date: fragment.date,
code: fragment.code,
details: fragment.details,
director: fragment.director,
remote_site_id: fragment.remote_site_id,
title: fragment.title,
url: fragment.url,
};
const result = await queryScrapeSceneQueryFragment(s, input);
if (!result.data || !result.data.scrapeSingleScene?.length) {
Toast.success({
content: "No scenes found",