jensenkd / plex-api

.NET Core SDK for Plex Media Server
MIT License
86 stars 27 forks source link

Hidden servers makes account.Servers() crash #105

Open LukkiHyde opened 1 year ago

LukkiHyde commented 1 year ago

Is your feature request related to a problem? Please describe. My Plex server has two old servers that I cant delete. They dont show up in plex. But I see them in ApiService. When I run account.Servers() I get all servers in my APIservice. But when Servers() start looping through all the servers to call them, it crashes cause they dont exist.

Describe the solution you'd like I think it would be nice with a Servers() took in AccountServerContainer so that you could use ServerSummaries() to specifie if you want to exclude servers beeing called.

Describe alternatives you've considered Maybe take in just a List of either Name of server or IP to exclude severs

Additional context image 0 and 1 does not exist and makes code crash

image Calling first and second server

image The only servers existing in my plex

CED0001 commented 10 months ago

I may be experiencing a similar issue. Could you please tell me where you found the above mentioned list of servers? (added your image for reference) 264732920-d83ef26b-9b7c-401d-b787-a8e9a6e32a21

LukkiHyde commented 10 months ago

It was a few month ago. So it's hard to remember everything exactly. But i think i misused it from start and tried to build my own APIService. But i got it working, but it's very slow to give response. Maby it still try to reach the non-existing servers and thats why it's slow.

Either way, here you can find the unlisted servers:

image

It's the DeserialiseResponse function in APIServices. Just hover over response and you find the list of Servers.

LukkiHyde commented 10 months ago

Would be nice if you could confirm if you experince the same thing.

Best Regards

CED0001 commented 10 months ago

I'm still not 100% sure but I don't think we're experiencing exactly the same thing. I opened a new issue to detail what I am experiencing, feel free to have a look: issue: https://github.com/jensenkd/plex-api/issues/106