diff --git a/src/cogs/auto_responder.py b/src/cogs/auto_responder.py index 6759f4a..e85f439 100644 --- a/src/cogs/auto_responder.py +++ b/src/cogs/auto_responder.py @@ -60,6 +60,13 @@ class AutoResponder(commands.Cog): info = await cog._run_ffprobe(uri, True) if not info: raise ValueError("No info found for %r" % uri) + if float(info["format"].get("duration", 600.1)) > 600.0: + self.log.warning( + "Video %r is %.2f seconds long (more than 10 minutes). Refusing to process further.", + uri, + float(info["format"].get("duration", 600.1)) + ) + return streams = info.get("streams", []) for stream in streams: self.log.info("Found stream: %s", stream.get("codec_name")) @@ -145,6 +152,7 @@ class AutoResponder(commands.Cog): 1229496078726860921, 421698654189912064 }: + # links = self.extract_links(message.content, "static-assets-1.truthsocial.com") links = self.extract_links(message.content, "static-assets-1.truthsocial.com") if links: for link in links: