kurtextrem / PS2Alerts

Easy overview over PlanetSide2 Alerts in Chrome.
https://chrome.google.com/webstore/detail/planetside-2-alerts/bondapheaemfkkiabfjnhdempfmnikcg
11 stars 0 forks source link

Seeing "Unknown" and "undefined" servers in the list #26

Closed Maelstromeous closed 8 years ago

Maelstromeous commented 8 years ago

Not entirely sure why it's showing up like this:

Example

kurtextrem commented 8 years ago

That is what your API is returning currently. The script only knows server ID 1, Connery. It doesn't know server ID 1000 or 2000. (I don't know about undefined though)

Maelstromeous commented 8 years ago

Oh dear, let me investigate.

Maelstromeous commented 8 years ago

So I've just done a call to the active endpoint, got this back:

[
  {
    "ResultID": 17348,
    "instanceID": 1234,
    "ResultStartTime": 1450760220,
    "ResultEndTime": null,
    "ResultDateTime": null,
    "ResultServer": 1000,
    "ResultTimeType": "PRI",
    "ResultMajority": null,
    "ResultWinner": "",
    "ResultDraw": null,
    "ResultAlertCont": 2,
    "ResultAlertType": 1,
    "ResultDomination": null,
    "Valid": null,
    "InProgress": 1,
    "event": 0
  },
  {
    "ResultID": 17349,
    "instanceID": 1228,
    "ResultStartTime": 1450760453,
    "ResultEndTime": null,
    "ResultDateTime": null,
    "ResultServer": 2000,
    "ResultTimeType": "MOR",
    "ResultMajority": null,
    "ResultWinner": "",
    "ResultDraw": null,
    "ResultAlertCont": 8,
    "ResultAlertType": 2,
    "ResultDomination": null,
    "Valid": null,
    "InProgress": 1,
    "event": 0
  },
  {
    "ResultID": 17350,
    "instanceID": 6554,
    "ResultStartTime": 1450761128,
    "ResultEndTime": null,
    "ResultDateTime": null,
    "ResultServer": 1,
    "ResultTimeType": "PRI",
    "ResultMajority": null,
    "ResultWinner": "",
    "ResultDraw": null,
    "ResultAlertCont": 8,
    "ResultAlertType": 2,
    "ResultDomination": null,
    "Valid": null,
    "InProgress": 1,
    "event": 0
  }
]

Is this in the format you're expecting?

Maelstromeous commented 8 years ago

I was assuming that you'd be populating the server list with a predefined array, and populate based on information received from that endpoint.

It seems you're missing the PS4 servers, from when I looked at it a few months ago. I can provide you with the IDs if you'd like?

kurtextrem commented 8 years ago

Huh, only 3 servers are left active?

Would be great if you could bring me up to date, haven't been following PS2 too much in the past. Am 28.12.2015 16:01 schrieb "Matthew Cavanagh" notifications@github.com:

I was assuming that you'd be populating the server list with a predefined array, and populate based on information received from that endpoint.

It seems you're missing the PS4 servers, from when I looked at it a few months ago. I can provide you with the IDs if you'd like?

— Reply to this email directly or view it on GitHub https://github.com/kurtextrem/PS2Alerts/issues/26#issuecomment-167584717 .

Maelstromeous commented 8 years ago

Ahh I see the misunderstanding, I'm only returning alerts that are actively running.

So, the default is that there is no alert on any server, unless they are shown in that list. Sorry, I should have mentioned that very key point.

Here is a list of the current servers:

PC:

1: Connery
10: Miller
13: Cobalt
17: Emerald
19: Jaeger (event server)
25: Briggs

PS4:

1000: 'Genudine (PS4US)'
1001: 'Palos (PS4US)'
1002: 'Crux (PS4US)'
1003: 'Searhus (PS4US)'
1004: 'Xelas (PS4US)'
2000: 'Ceres (PS4EU)'
2001: 'Lithcorp (PS4EU)'
2002: 'Rashnu (PS4EU)'

Edit: If there are no alerts running anywhere, then the endpoint will return a 204 HTTP code.

Maelstromeous commented 8 years ago

My suggestion would be to list each server by building elements with a loop with the details above, then activating each server based on the information provided by the Active endpoint.

kurtextrem commented 8 years ago

Ahh thank you. Yeah, I will do so. Am 28.12.2015 16:17 schrieb "Matthew Cavanagh" notifications@github.com:

My suggestion would be to list each server by building elements with a loop with the details above, then activating each server based on the information provided by the Active endpoint.

— Reply to this email directly or view it on GitHub https://github.com/kurtextrem/PS2Alerts/issues/26#issuecomment-167586615 .

Maelstromeous commented 8 years ago

Just got an updated list of currently active servers, apparently PS4 has had some merges:

1: 'Connery',
10: 'Miller',
13: 'Cobalt',
17: 'Emerald',
19: 'Jaeger (Event)',
25: 'Briggs',
1000: 'Genudine',
2000: 'Ceres'
kurtextrem commented 8 years ago

Updated!

Maelstromeous commented 8 years ago

Still seeing undefined servers.

http://puu.sh/mgUBC/a73ab84958.png

kurtextrem commented 8 years ago

Hm. I guess the data is faulty now for some people. Can you try a clean install?

Maelstromeous commented 8 years ago

I can give it a go :-)

On 2 Jan 2016, at 15:50, Jacob Groß notifications@github.com wrote:

Reopened #26 https://github.com/kurtextrem/PS2Alerts/issues/26.

— Reply to this email directly or view it on GitHub https://github.com/kurtextrem/PS2Alerts/issues/26#event-503985940.

Maelstromeous commented 8 years ago

Yup, reinstall fixed this. Only showing PC servers though, is that intentional?

kurtextrem commented 8 years ago

Yes, but there is a setting in the options :)

Maelstromeous commented 8 years ago

Ahh I see. Now it's returning all the dead PS4 Servers :-/

And I've just seen it return a undefined server again.

Maelstromeous commented 8 years ago

On v0.993:

http://puu.sh/mgYfS/ad06d49cd1.png

kurtextrem commented 8 years ago

Hm... I guess I have to clear the sync storage. Edit: It does that already. Not sure what's wrong.

Maelstromeous commented 8 years ago

No longer seeing this. Seems to be fixed.