diff --git a/app/api/routes/content.py b/app/api/routes/content.py index 302fef7..a362cdc 100644 --- a/app/api/routes/content.py +++ b/app/api/routes/content.py @@ -46,7 +46,7 @@ async def s_api_v1_content_view(request, content_address: str): opts['key_hash'] = known_key.seed_hash opts['have_licenses'] = [] - opts['invoice_url'] = None + opts['invoice'] = None have_access = False if request.ctx.user: @@ -73,15 +73,13 @@ async def s_api_v1_content_view(request, content_address: str): try: opts['invoice'] = { 'url': ( - await Bot(token=CLIENT_TELEGRAM_API_KEY).create_invodeice_link( - description='You will receive NFT with lifetime access to content', - payload=f"access_{invoice_id}", - title='Lifetime access to content', - currency='XTR', - prices=[ + await Bot(token=CLIENT_TELEGRAM_API_KEY).create_invoice_link( + 'Lifetime access to content', + 'You will receive NFT with lifetime access to content', + f"access_{invoice_id}", "", "XTR" + [ types.LabeledPrice(label='Lifetime access', amount=stars_cost), ], - provider_token="", ) ), 'amount': stars_cost, diff --git a/app/core/background/convert_service.py b/app/core/background/convert_service.py index 0112a24..8d544b8 100644 --- a/app/core/background/convert_service.py +++ b/app/core/background/convert_service.py @@ -45,7 +45,9 @@ async def convert_loop(): converted_content = {} # Mapping: option -> sha256 hash of output file # 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" # Logs directory mapping