diff --git a/tunictracker/tracker/static/tracker/assets/test.js b/tunictracker/tracker/static/tracker/assets/test.js index 604dacc..5a4b8ce 100644 --- a/tunictracker/tracker/static/tracker/assets/test.js +++ b/tunictracker/tracker/static/tracker/assets/test.js @@ -21,6 +21,7 @@ window.onload = () => { let mapped_line_elem = document .getElementById("current_scene_entrances_mapped") .firstElementChild.cloneNode(true); + const refresh_interval = setInterval( refresh_elements, 300, @@ -47,7 +48,7 @@ async function refresh_elements( const overview_entrances_undiscovered = response_object.Totals.Entrances.Undiscovered; const overview_entrances_total = response_object.Totals.Entrances.Total; - const current_scene_name = response_object.Scene; + const current_scene_name = response_object.Current.Scene; const current_scene_checks_undiscovered = response_object.Scenes[current_scene_name].Totals.Checks.Undiscovered; const current_scene_checks_total = @@ -88,7 +89,7 @@ async function refresh_elements( }); }) .catch((err) => { - console.log(); + console.log(err); }); } diff --git a/tunictracker/tracker/templates/tracker/index.html b/tunictracker/tracker/templates/tracker/index.html index da0e669..63446a8 100644 --- a/tunictracker/tracker/templates/tracker/index.html +++ b/tunictracker/tracker/templates/tracker/index.html @@ -113,6 +113,8 @@ + {% else %} +
{% endif %}
diff --git a/tunictracker/tracker/views.py b/tunictracker/tracker/views.py index 465c689..7650ebb 100644 --- a/tunictracker/tracker/views.py +++ b/tunictracker/tracker/views.py @@ -21,12 +21,12 @@ def index(request): } template = loader.get_template("tracker/index.html") return HttpResponse(template.render(context, request)) - tracker_output = loads() + tracker_output = loads(request_data) # with open('spoiler.json', 'r') as t: # tracker_output = loads(t.read()) tracker_debug = tracker_output["Debug"] tracker_totals = tracker_output["Totals"] - tracker_current_scene = tracker_output["Scene"] + tracker_current_scene = tracker_output["Current"]["Scene"] tracker_current_scene_data = tracker_output["Scenes"][tracker_current_scene] template = loader.get_template("tracker/index.html") for i in tracker_output["Scenes"]: