SD plugin update SD, disble YT preview for music room
This commit is contained in:
parent
4ef6f3beb7
commit
5d6ad98303
@ -65,7 +65,7 @@ async def handle_command(room, message, bot, prefix, config):
|
|||||||
r = response.json()
|
r = response.json()
|
||||||
|
|
||||||
# Slugify the prompt
|
# Slugify the prompt
|
||||||
prompt_slug = (prompt)
|
prompt_slug = prompt[:120]
|
||||||
|
|
||||||
# Construct filename
|
# Construct filename
|
||||||
filename = f"{prompt_slug}_{args.steps}_{args.h}x{args.w}_{sampler_name}_{args.cfg}.jpg"
|
filename = f"{prompt_slug}_{args.steps}_{args.h}x{args.w}_{sampler_name}_{args.cfg}.jpg"
|
||||||
|
@ -32,7 +32,7 @@ async def fetch_youtube_info(youtube_url):
|
|||||||
|
|
||||||
async def handle_command(room, message, bot, prefix, config):
|
async def handle_command(room, message, bot, prefix, config):
|
||||||
match = botlib.MessageMatch(room, message, bot, prefix)
|
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")
|
logging.info("YouTube link detected")
|
||||||
video_id_match = re.search(r'youtube\.com/watch\?v=([^\s]+)', message.body)
|
video_id_match = re.search(r'youtube\.com/watch\?v=([^\s]+)', message.body)
|
||||||
if video_id_match:
|
if video_id_match:
|
||||||
|
Loading…
Reference in New Issue
Block a user