Browse Source

also changed the roomname to foldername in saving images

master
manetta 4 years ago
parent
commit
52a26d1646
  1. 4
      LogBot/logbot.py

4
LogBot/logbot.py

@ -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…
Cancel
Save