Corrected after_pick() logic
This commit is contained in:
parent
d0ffc76b6d
commit
140c125fcc
19
src/main.py
19
src/main.py
@ -149,10 +149,14 @@ class YandereBot(FediBot.YandereBot):
|
||||
|
||||
# Maybe I should remove this from the backend?
|
||||
def print_header_stats(self, picked):
|
||||
_picked = picked.get_full_string() if picked else None
|
||||
picked_profile = picked.get_post_setting()["name"] if picked else None
|
||||
picked_next = self.listPictures[0].get_full_string() if self.listPictures else None
|
||||
picked_next_profile = self.listPictures[0].get_post_setting()["name"] if self.listPictures else None
|
||||
picked_profile, _picked, picked_next_profile, picked_next = None, None, None, None
|
||||
if picked:
|
||||
_picked = picked.get_full_string()
|
||||
picked_profile = picked.get_post_setting()["name"]
|
||||
|
||||
if self.listPictures:
|
||||
picked_next = self.listPictures[0].get_full_string()
|
||||
picked_next_profile = self.listPictures[0].get_post_setting()["name"]
|
||||
|
||||
print("Profile: {} | Picked: {} | Next_Profile: {} | Next_Pick: {}".format(
|
||||
picked_profile, _picked, picked_next_profile, picked_next
|
||||
@ -171,8 +175,11 @@ class YandereBot(FediBot.YandereBot):
|
||||
}
|
||||
|
||||
def after_pick(self, picked):
|
||||
self.blacklist(picked["picked"])
|
||||
self.print_header_stats(picked["picked"])
|
||||
if picked:
|
||||
self.blacklist(picked["picked"])
|
||||
self.print_header_stats(picked["picked"])
|
||||
else:
|
||||
self.print_header_stats(None)
|
||||
|
||||
def post(self, picked):
|
||||
reinsert_image = False
|
||||
|
Reference in New Issue
Block a user