aboutsummaryrefslogtreecommitdiff
path: root/describe.py
diff options
context:
space:
mode:
Diffstat (limited to 'describe.py')
-rw-r--r--describe.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/describe.py b/describe.py
index 1cce292..5a9621e 100644
--- a/describe.py
+++ b/describe.py
@@ -134,7 +134,7 @@ def split_name(text: str) -> tuple[str, str]:
def rename_media(old: str, name: str) -> str:
- # keeps the extension, adds _2 _3 if the name is taken. media.txt gets the new name too or the bot forgets the file on restart
+ # keeps the extension, adds _2 _3 if the name is taken
suffix = Path(old).suffix
new = f"{name}{suffix}"
n = 2
@@ -144,11 +144,6 @@ def rename_media(old: str, name: str) -> str:
if new == old:
return old
(MEDIA_DIR / old).rename(MEDIA_DIR / new)
- log = MEDIA_DIR / "media.txt"
- if log.exists():
- lines = log.read_text(encoding="utf-8").splitlines()
- lines = [l[:-len(old)] + new if l.endswith(f"saved media: {old}") else l for l in lines]
- log.write_text("\n".join(lines) + "\n", encoding="utf-8")
return new