SD plugin update SD, disble YT preview for music room

This commit is contained in:
Hash Borgir 2024-03-03 13:51:41 -07:00
parent 4ef6f3beb7
commit 5d6ad98303
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ async def handle_command(room, message, bot, prefix, config):
r = response.json()
# Slugify the prompt
prompt_slug = (prompt)
prompt_slug = prompt[:120]
# Construct filename
filename = f"{prompt_slug}_{args.steps}_{args.h}x{args.w}_{sampler_name}_{args.cfg}.jpg"

View File

@ -32,7 +32,7 @@ async def fetch_youtube_info(youtube_url):
async def handle_command(room, message, bot, prefix, config):
match = botlib.MessageMatch(room, message, bot, prefix)
if match.is_not_from_this_bot() and re.search(r'youtube\.com/watch\?v=', message.body):
if match.is_not_from_this_bot() and re.search(r'youtube\.com/watch\?v=', message.body) and room.room_id != '!uFhErnfpYhhlauJsNK:matrix.org':
logging.info("YouTube link detected")
video_id_match = re.search(r'youtube\.com/watch\?v=([^\s]+)', message.body)
if video_id_match: