two fixes
This commit is contained in:
parent
4e40c2f572
commit
ac61ffb36a
|
|
@ -46,7 +46,7 @@ async def s_api_v1_content_view(request, content_address: str):
|
||||||
opts['key_hash'] = known_key.seed_hash
|
opts['key_hash'] = known_key.seed_hash
|
||||||
|
|
||||||
opts['have_licenses'] = []
|
opts['have_licenses'] = []
|
||||||
opts['invoice_url'] = None
|
opts['invoice'] = None
|
||||||
|
|
||||||
have_access = False
|
have_access = False
|
||||||
if request.ctx.user:
|
if request.ctx.user:
|
||||||
|
|
@ -73,15 +73,13 @@ async def s_api_v1_content_view(request, content_address: str):
|
||||||
try:
|
try:
|
||||||
opts['invoice'] = {
|
opts['invoice'] = {
|
||||||
'url': (
|
'url': (
|
||||||
await Bot(token=CLIENT_TELEGRAM_API_KEY).create_invodeice_link(
|
await Bot(token=CLIENT_TELEGRAM_API_KEY).create_invoice_link(
|
||||||
description='You will receive NFT with lifetime access to content',
|
'Lifetime access to content',
|
||||||
payload=f"access_{invoice_id}",
|
'You will receive NFT with lifetime access to content',
|
||||||
title='Lifetime access to content',
|
f"access_{invoice_id}", "", "XTR"
|
||||||
currency='XTR',
|
[
|
||||||
prices=[
|
|
||||||
types.LabeledPrice(label='Lifetime access', amount=stars_cost),
|
types.LabeledPrice(label='Lifetime access', amount=stars_cost),
|
||||||
],
|
],
|
||||||
provider_token="",
|
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'amount': stars_cost,
|
'amount': stars_cost,
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,9 @@ async def convert_loop():
|
||||||
converted_content = {} # Mapping: option -> sha256 hash of output file
|
converted_content = {} # Mapping: option -> sha256 hash of output file
|
||||||
|
|
||||||
# Define input file path and extract its extension from filename
|
# Define input file path and extract its extension from filename
|
||||||
input_file_path = f"/Storage/storedContent/{unprocessed_encrypted_content.hash}"
|
input_file_path = f"/Storage/storedContent/{decrypted_content.hash}"
|
||||||
|
|
||||||
|
|
||||||
input_ext = unprocessed_encrypted_content.filename.split('.')[-1] if '.' in unprocessed_encrypted_content.filename else "mp4"
|
input_ext = unprocessed_encrypted_content.filename.split('.')[-1] if '.' in unprocessed_encrypted_content.filename else "mp4"
|
||||||
|
|
||||||
# Logs directory mapping
|
# Logs directory mapping
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue