From 09916cc7feb6763d41501bafcd51176c73988921 Mon Sep 17 00:00:00 2001 From: datawhores Date: Tue, 27 Aug 2024 13:51:57 -0500 Subject: [PATCH] fix filters --- ofscraper/commands/managers/db.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ofscraper/commands/managers/db.py b/ofscraper/commands/managers/db.py index 17830f7f..cf4a305e 100644 --- a/ofscraper/commands/managers/db.py +++ b/ofscraper/commands/managers/db.py @@ -75,10 +75,12 @@ async def get_all_media(self): def filter_media(self) : self.log.info(f"filtering media for {self.username}_{self.model_id}") args=read_args.retriveArgs() + medias=self.media if args.downloaded: - self.media=[media for media in self.media if media["downloaded"]] + medias=[media for media in medias if media["downloaded"]] elif args.not_downloaded: - self.media=[media for media in self.media if not media["downloaded"]] + medias=[media for media in medias if not media["downloaded"]] + self.media=medias