def clear_users(self, user_ids): if 'all' in user_ids: user_ids = self.users.copy() for id in user_ids: if id not in self.users: print(f'User ID {id} does not exist in config file') else: utils.remove_dir(self.save_dir, str(id))
def clear_artists(self, artist_ids): if "all" in artist_ids: artist_ids = self.artists.copy() for id in artist_ids: if id in self.artists: utils.remove_dir(self.save_dir, str(id)) else: print(f"Artist {id} does not exist in config file")
def clear_users(self, user_ids): if "all" in user_ids: user_ids = self.users.copy() user_ids = [int(id) for id in user_ids] for id in user_ids: if id in self.users: utils.remove_dir(self.save_dir, str(id)) else: print(f"Pixiv ID {id} does not exist in config file")
def delete_bookmarks(self, user_ids): if "all" in user_ids: user_ids = self.bookmarks.copy() user_ids = [int(id) for id in user_ids] for id in user_ids: if id in self.bookmarks: self.bookmarks.remove(id) utils.remove_dir(self.save_dir, str(id) + " bookmarks") else: print(f"Pixiv ID {id} does not exist in config file")
def clear_artists(self, artist_ids): if "all" in artist_ids: artist_ids = self.artists.keys() for id in artist_ids: if id in self.artists.keys(): self.artists[id] = None artist_name = self.api.gallery(id)["artist_name"] utils.remove_dir(self.save_dir, artist_name) else: print(f"Artist {id} does not exist")