Make sure current activity returned sessions when refreshing

This commit is contained in:
JonnyWong16 2016-05-17 21:10:05 -07:00
commit 33458c1bdb
3 changed files with 12 additions and 8 deletions

View file

@ -107,6 +107,11 @@
$('#dashboard-checking-activity').remove();
var current_activity = $.parseJSON(xhr.responseText);
if (!(current_activity)) {
$('#currentActivity').html('<div id="dashboard-no-activity" class="text-muted">There was an error communicating with your Plex Server.</div>');
return
}
var stream_count = parseInt(current_activity.stream_count);
var sessions = current_activity.sessions;

View file

@ -109,6 +109,5 @@ DOCUMENTATION :: END
</div>
</div>
% else:
<div class="text-muted">There was an error communicating with your Plex Server. Please check your <a href="settings">settings</a>.
</div><br>
<div class="text-muted">There was an error communicating with your Plex Server.</div><br>
% endif