consider length of content in an event for per_unit_cost

This commit is contained in:
Believethehype 2024-06-26 13:55:18 +02:00
parent d765c50ca7
commit 95eb53aa0c
2 changed files with 3 additions and 1 deletions

View File

@ -128,6 +128,8 @@ async def organize_input_media_data(input_value, input_type, start, end, dvm_con
def check_nip94_event_for_media(evt, input_value, input_type):
# Parse NIP94 event for url, if found, use it.
input_type = "text"
input_value = evt.content()
if evt.kind() == 1063:
for tag in evt.tags():
if tag.as_vec()[0] == 'url':

View File

@ -22,7 +22,7 @@ if __name__ == '__main__':
dvm_config = build_default_config(identifier)
dvm_config.USE_OWN_VENV = True
dvm_config.FIX_COST = 0
dvm_config.PER_UNIT_COST = 0
dvm_config.PER_UNIT_COST = 0.2
admin_config_tts.LUD16 = dvm_config.LN_ADDRESS
# use an alternative local wav file you want to use for cloning
options = {'input_file': ""}