diff --git a/.idea/dvm.iml b/.idea/dvm.iml
index 12cb869..3d6f1fd 100644
--- a/.idea/dvm.iml
+++ b/.idea/dvm.iml
@@ -6,8 +6,9 @@
+
-
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index ddb297d..83b7974 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,5 +3,5 @@
-
+
\ No newline at end of file
diff --git a/nostr_dvm/utils/mediasource_utils.py b/nostr_dvm/utils/mediasource_utils.py
index ffc146d..53adbf7 100644
--- a/nostr_dvm/utils/mediasource_utils.py
+++ b/nostr_dvm/utils/mediasource_utils.py
@@ -3,7 +3,8 @@ import urllib
from datetime import time
from urllib.parse import urlparse
import ffmpegio
-from decord import AudioReader, cpu
+
+
import requests
from nostr_dvm.utils.nostr_utils import get_event_by_id
from nostr_dvm.utils.scrapper.media_scrapper import OvercastDownload, XitterDownload, TiktokDownloadAll, \
@@ -43,8 +44,7 @@ def input_data_file_duration(event, dvm_config, client, start=0, end=0):
if filename == "" or filename is None:
return 0
try:
- file_reader = AudioReader(filename, ctx=cpu(0), mono=False)
- duration = float(file_reader.duration())
+ duration = ffmpegio.probe.format_basic(filename)['duration']
except Exception as e:
print(e)
return 0
@@ -76,8 +76,10 @@ def organize_input_media_data(input_value, input_type, start, end, dvm_config, c
if type != "audio" and type != "video":
return filename
try:
- file_reader = AudioReader(filename, ctx=cpu(0), mono=False)
- duration = float(file_reader.duration())
+ #file_reader = AudioReader(filename, ctx=cpu(0), mono=False)
+ # duration = float(file_reader.duration())
+ duration = ffmpegio.probe.format_basic(filename)['duration']
+
except Exception as e:
print(e)
try:
diff --git a/setup.py b/setup.py
index ec0b0a4..a5bb9af 100644
--- a/setup.py
+++ b/setup.py
@@ -22,8 +22,7 @@ setup(
"pycryptodome==3.20.0",
"python-dotenv==1.0.0",
"emoji==2.8.0",
- "eva-decord==0.6.1",
- "ffmpegio==0.8.5",
+ "ffmpegio==0.9.1",
"lnurl",
"pandas==2.1.3",
"Pillow==10.1.0",
@@ -34,7 +33,6 @@ setup(
"moviepy==2.0.0.dev2",
"zipp==3.17.0",
"urllib3==2.1.0",
- "typing_extensions>=4.9.0"
],
keywords=['nostr', 'nip90', 'dvm', 'data vending machine'],
url="https://github.com/believethehype/nostrdvm",
diff --git a/tests/discovery.py b/tests/discovery.py
index 67e54c9..c98a819 100644
--- a/tests/discovery.py
+++ b/tests/discovery.py
@@ -18,6 +18,7 @@ from nostr_dvm.tasks.content_discovery_currently_popular_topic import DicoverCon
from nostr_dvm.tasks.discovery_trending_notes_nostrband import TrendingNotesNostrBand
from nostr_dvm.utils.admin_utils import AdminConfig
from nostr_dvm.utils.dvmconfig import build_default_config, DVMConfig
+from nostr_dvm.utils.mediasource_utils import organize_input_media_data
from nostr_dvm.utils.nip89_utils import create_amount_tag, NIP89Config, check_and_set_d_tag
from nostr_dvm.utils.nostr_utils import check_and_set_private_key
from nostr_dvm.utils.zap_utils import check_and_set_ln_bits_keys
@@ -46,7 +47,8 @@ AVOID_PAID_OUTBOX_RELAY_LIST = ["wss://nostrelay.yeghro.site", "wss://nostr.wine
"wss://relay.nostriches.org", "wss://happytavern.co", "wss://onlynotes.lol", "wss://offchain.pub", "wss://purplepag.es", "wss://relay.plebstr.com",
"wss://poster.place/relay", "wss://relayable.org", "wss://bbb.santos.lol", "wss://relay.bitheaven.social", "wss://theforest.nostr1.com",
"wss://relay.nostrati.com", "wss://purplerelay.com", "wss://hist.nostr.land", "wss://creatr.nostr.wine", "ws://localhost:4869",
- "wss://pyramid.fiatjaf.com", "wss://relay.nos.social", "wss://nostr.thank.eu", "wss://inbox.nostr.wine"
+ "wss://pyramid.fiatjaf.com", "wss://relay.nos.social", "wss://nostr.thank.eu", "wss://inbox.nostr.wine", "wss://relay.pleb.to", "wss://welcome.nostr.wine",
+ "wss://relay.nostrview.com", "wss://nostr.land", "wss://eu.purplerelay.com", "wss://xmr.usenostr.org", "wss://relay.pleb.to", "wss://nostr-relay.app"
]
RECONCILE_DB_RELAY_LIST = ["wss://relay.damus.io",
@@ -366,6 +368,8 @@ def build_example_top_zapped(name, identifier, admin_config, options, image, cos
def playground():
+
+
#DB Scheduler, do not announce, just use it to update the DB for the other DVMs.
admin_config_db_scheduler= AdminConfig()
options_animal = {