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.
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.