zSeriesGuy / Tautulli

A Python based monitoring and tracking tool for Plex Media Server.
http://tautulli.com
GNU General Public License v3.0
27 stars 9 forks source link

int('') causes server listing to fail #5

Closed ddurdle closed 5 years ago

ddurdle commented 5 years ago

by casting int() around an incoming xml variable, you assume it is defined. Apparently, valid values for these returned by plex can be 0, 1 or ''. So the cast fails and causes an unhandled exception.

To ensure there is always a proper value or 0 will ensure that a value of 0 is returned when there is '' defined.