Skip to content

Commit

Permalink
fix: Skip videos with a status of "failed"
Browse files Browse the repository at this point in the history
  • Loading branch information
chettoy committed Nov 23, 2022
1 parent 8e08491 commit 78a701d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fxxkstar.py
Original file line number Diff line number Diff line change
Expand Up @@ -1510,6 +1510,10 @@ def _request_status(fxxkstar: FxxkStar, object_id: str) -> dict:
if G_VERBOSE:
print("video", object_id, "response=waiting")
return status_json
elif status_json['status'] == "failed":
print("[WARN] status_json={}".format(status_json))
print("object_id= " + object_id + " ###" + status_rsp.text)
return status_json
else:
if G_VERBOSE:
print("[ERROR] status_json={}".format(status_json))
Expand Down Expand Up @@ -2003,7 +2007,7 @@ class MarkResultItem:
correct_answers.append(OptionItem(
index_list[i], result.correct_answer))
elif result.is_correct == True:
correct_answers.append(result)
correct_answers.append(option_item)
if len(current_answers) > 0:
question.selected = current_answers
if len(correct_answers) > 0:
Expand Down

0 comments on commit 78a701d

Please sign in to comment.