Minor fixes to greet sounds.

This commit is contained in:
Storm Dragon
2025-11-23 18:13:29 -05:00
parent 7e37570b43
commit d45d666b4e
2 changed files with 25 additions and 4 deletions

View File

@@ -130,6 +130,21 @@ class URLItem(BaseItem):
return True
def _get_info_from_url(self):
# Check if it's a direct audio file URL (common extensions)
direct_audio_extensions = ('.mp3', '.wav', '.ogg', '.opus', '.flac', '.m4a', '.aac')
url_lower = self.url.lower()
is_direct_audio = any(url_lower.endswith(ext) for ext in direct_audio_extensions)
if is_direct_audio:
# For direct audio files, set minimal metadata and skip yt-dlp
self.log.info("url: detected direct audio file, skipping metadata fetch: %s" % self.url)
self.duration = 0 # Unknown duration for direct files
# Extract filename from URL for title
filename = self.url.split('/')[-1].split('?')[0] # Remove query params
self.title = filename
self.keywords = filename
return True
self.log.info("url: fetching metadata of url %s " % self.url)
ydl_opts = {
'noplaylist': True