try fix
This commit is contained in:
parent
0b401e721b
commit
e059e079aa
|
|
@ -102,10 +102,12 @@ async def t_inline_query_node_content(query: types.InlineQuery, memory=None, use
|
||||||
source_args_ext = query.query
|
source_args_ext = query.query
|
||||||
|
|
||||||
if source_args.startswith('Q'):
|
if source_args.startswith('Q'):
|
||||||
license_onchain_address = query.query[1:]
|
license_onchain_address = source_args[1:]
|
||||||
args = db_session.query(UserContent).filter_by(
|
licensed_content = db_session.query(UserContent).filter_by(
|
||||||
onchain_address=license_onchain_address,
|
onchain_address=license_onchain_address,
|
||||||
).first().content.cid.serialize_v2()
|
).first().content
|
||||||
|
make_log("InlineSearch", f"Query '{query.query}' is a license query for content ID {licensed_content.id}.", level='info')
|
||||||
|
args = content.cid.serialize_v2()
|
||||||
else:
|
else:
|
||||||
args = source_args[1:]
|
args = source_args[1:]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,13 @@ async def convert_loop(memory):
|
||||||
if not unprocessed_encrypted_content:
|
if not unprocessed_encrypted_content:
|
||||||
make_log("ConvertProcess", "No content to convert", level="debug")
|
make_log("ConvertProcess", "No content to convert", level="debug")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Static preview interval in seconds
|
||||||
|
preview_interval = [0, 30]
|
||||||
|
if unprocessed_encrypted_content.onchain_index in [2]:
|
||||||
|
preview_interval = [0, 60]
|
||||||
|
|
||||||
make_log("ConvertProcess", f"Processing content {unprocessed_encrypted_content.id}", level="debug")
|
make_log("ConvertProcess", f"Processing content {unprocessed_encrypted_content.id} with preview interval {preview_interval}", level="info")
|
||||||
decrypted_content = session.query(StoredContent).filter(
|
decrypted_content = session.query(StoredContent).filter(
|
||||||
StoredContent.id == unprocessed_encrypted_content.decrypted_content_id
|
StoredContent.id == unprocessed_encrypted_content.decrypted_content_id
|
||||||
).first()
|
).first()
|
||||||
|
|
@ -41,11 +46,6 @@ async def convert_loop(memory):
|
||||||
make_log("ConvertProcess", "Decrypted content not found", level="error")
|
make_log("ConvertProcess", "Decrypted content not found", level="error")
|
||||||
return
|
return
|
||||||
|
|
||||||
# Static preview interval in seconds
|
|
||||||
preview_interval = [0, 30]
|
|
||||||
if unprocessed_encrypted_content.onchain_index in [2]:
|
|
||||||
preview_interval = [0, 60]
|
|
||||||
|
|
||||||
|
|
||||||
# List of conversion options to process
|
# List of conversion options to process
|
||||||
REQUIRED_CONVERT_OPTIONS = ['high', 'low', 'low_preview']
|
REQUIRED_CONVERT_OPTIONS = ['high', 'low', 'low_preview']
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue