forked from varia/bots
also changed the roomname to foldername in saving images
This commit is contained in:
parent
38237e9699
commit
52a26d1646
@ -76,8 +76,8 @@ class Logbot(Bot):
|
||||
os.path.basename(parsed_url.path).replace(" ", "_").replace("%20", "_")
|
||||
) # safe url's
|
||||
self.log.info(f"as the file: { filename }")
|
||||
roomname = re.sub(r"@.*", "", message.room)
|
||||
path = os.path.join(self.output, roomname, media_type)
|
||||
folder_name = self.db[message.room]["folder"]
|
||||
path = os.path.join(self.output, folder_name, media_type)
|
||||
if not os.path.isdir(path):
|
||||
os.mkdir(path)
|
||||
file_path = os.path.join(path, filename)
|
||||
|
Loading…
Reference in New Issue
Block a user