only log when we actually find a corresponding media

This commit is contained in:
Sebastian Spaeth 2023-12-11 14:40:04 +01:00
parent 3b8751c6de
commit 320af39f35

View File

@ -269,8 +269,9 @@ if __name__ == '__main__':
if args.mxid:
# Just clean a single media
file = mr.get_single_media(args.mxid)
if file:
logging.info("Found media with id '%s'", args.mxid)
if file and not args.dryrun:
if not args.dryrun:
file.delete()
else: # main clean out...
# Sanity checks