Add context menu command for birthday role assignment. Users with allowed roles can now give birthday roles via right-click menu.

This commit is contained in:
pacnpal
2024-11-15 01:36:19 +00:00
parent 826f5e1b3e
commit 8822c85b6f
3 changed files with 10 additions and 8 deletions

View File

@@ -93,7 +93,7 @@ class VideoDownloader:
try:
with yt_dlp.YoutubeDL() as ydl:
for extractor in ydl._ies:
if hasattr(extractor, "_VALID_URL") and extractor._VALID_URL:
if hasattr(extractor, '_VALID_URL') and extractor._VALID_URL:
if not self.enabled_sites or any(
site.lower() in extractor.IE_NAME.lower()
for site in self.enabled_sites
@@ -313,8 +313,8 @@ class VideoDownloader:
for site in self.enabled_sites
):
continue
# Try to match URL
if extractor.suitable(url):
# Try to match URL using the class method
if extractor.suitable(url) and not isinstance(extractor.suitable(url), str):
return True
return False
except Exception as e: