From c2231ec954c8afc00a7cffba92c958cdbe1a76fa Mon Sep 17 00:00:00 2001 From: DogmaDragon <103123951+DogmaDragon@users.noreply.github.com> Date: Wed, 30 Apr 2025 18:58:09 +0300 Subject: [PATCH] Fix indent --- plugins/timestampTrade/timestampTrade.py | 35 ++++++++++++++---------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/plugins/timestampTrade/timestampTrade.py b/plugins/timestampTrade/timestampTrade.py index d0494e0..e875cf4 100644 --- a/plugins/timestampTrade/timestampTrade.py +++ b/plugins/timestampTrade/timestampTrade.py @@ -693,27 +693,32 @@ def submitScene(query): ) for s in scenes: log.debug("submitting scene: " + str(s)) + if settings["submitFunscriptHash"]: log.debug(s) s["funscriptHashes"] = [] - with db_migrations() as conn: - cur = conn.cursor() - res = cur.execute( - "select id,filename,metadata,scene_id,md5 from script_index where scene_id=?", - (s["id"],), - ) - for row in res.fetchall(): - s["funscriptHashes"].append( - { - "filename": str(Path(row[1]).name), - "metadata": json.loads(row[2]), - "md5": row[4], - } - ) + + with db_migrations() as conn: + cur = conn.cursor() + res = cur.execute( + "select id, filename, metadata, scene_id, md5 from script_index where scene_id=?", + (s["id"],), + ) + + for row in res.fetchall(): + s["funscriptHashes"].append( + { + "filename": str(Path(row[1]).name), + "metadata": json.loads(row[2]), + "md5": row[4], + } + ) + s.pop("id") log.debug(s) request_s.post("https://timestamp.trade/submit-stash", json=s) - i = i + 1 + + i += 1 log.progress((i / count)) time.sleep(0.5)