This commit is contained in:
user 2025-03-06 18:04:01 +03:00
parent 0b401e721b
commit e059e079aa
2 changed files with 11 additions and 9 deletions

View File

@ -102,10 +102,12 @@ async def t_inline_query_node_content(query: types.InlineQuery, memory=None, use
source_args_ext = query.query
if source_args.startswith('Q'):
license_onchain_address = query.query[1:]
args = db_session.query(UserContent).filter_by(
license_onchain_address = source_args[1:]
licensed_content = db_session.query(UserContent).filter_by(
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:
args = source_args[1:]

View File

@ -32,8 +32,13 @@ async def convert_loop(memory):
if not unprocessed_encrypted_content:
make_log("ConvertProcess", "No content to convert", level="debug")
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(
StoredContent.id == unprocessed_encrypted_content.decrypted_content_id
).first()
@ -41,11 +46,6 @@ async def convert_loop(memory):
make_log("ConvertProcess", "Decrypted content not found", level="error")
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
REQUIRED_CONVERT_OPTIONS = ['high', 'low', 'low_preview']