mirror of
https://github.com/stashapp/CommunityScripts.git
synced 2026-02-04 20:04:27 -06:00
Fix indent
This commit is contained in:
parent
aaa38a3107
commit
c2231ec954
@ -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)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user