mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-04-08 20:08:08 +02:00
async function
This commit is contained in:
parent
7ee8c855a7
commit
b2ad96717c
@ -130,7 +130,7 @@ class DVM:
|
||||
if self.dvm_config.LOGLEVEL.value >= LogLevel.INFO.value:
|
||||
print(
|
||||
bcolors.MAGENTA + "[" + self.dvm_config.NIP89.NAME + "] Received new Request: " + task + " from " + user.name + bcolors.ENDC)
|
||||
duration = input_data_file_duration(nip90_event, dvm_config=self.dvm_config, client=self.client)
|
||||
duration = await input_data_file_duration(nip90_event, dvm_config=self.dvm_config, client=self.client)
|
||||
amount = get_amount_per_task(task, self.dvm_config, duration)
|
||||
if amount is None:
|
||||
return
|
||||
|
@ -11,7 +11,7 @@ from nostr_dvm.utils.scrapper.media_scrapper import OvercastDownload, XitterDown
|
||||
InstagramDownload, YouTubeDownload, XDownload
|
||||
|
||||
|
||||
def input_data_file_duration(event, dvm_config, client, start=0, end=0):
|
||||
async def input_data_file_duration(event, dvm_config, client, start=0, end=0):
|
||||
# print("[" + dvm_config.NIP89.NAME + "] Getting Duration of the Media file..")
|
||||
input_value = ""
|
||||
input_type = ""
|
||||
@ -28,7 +28,7 @@ def input_data_file_duration(event, dvm_config, client, start=0, end=0):
|
||||
if input_type == "event": # NIP94 event
|
||||
if count > 1:
|
||||
return 1 # we ignore length for multiple event inputs for now
|
||||
evt = get_event_by_id(input_value, client=client, config=dvm_config)
|
||||
evt = await get_event_by_id(input_value, client=client, config=dvm_config)
|
||||
if evt is not None:
|
||||
input_value, input_type = check_nip94_event_for_media(evt, input_value, input_type)
|
||||
if input_type == "text":
|
||||
|
Loading…
x
Reference in New Issue
Block a user