alexmohr / sonyapilib

Contains a python api to control sony devices.
MIT License
20 stars 11 forks source link

2011 device - _parse_ircc - location definition has full URL #54

Closed PaulWebster closed 4 years ago

PaulWebster commented 4 years ago

On my 2011 device the Ircc definition returned from the TV has a full URL but the code prepends the received data with http etc .... so needs a change to allow for this alternative format. Something like this (although I'm sure there is a tidier way to do it): near the end of _parse_ircc if service_location.startswith('http://'): service_url = '' else: service_url = lirc_url.scheme + "://" + lirc_url.netloc self.control_url = service_url + service_location

alexmohr commented 4 years ago

Thanks for reporting. Maybe using urlparse is better but i'm not sure yet. Your proposal seems reasonable.

alexmohr commented 4 years ago

@PaulWebster I'm going to close this as it was fixed in fe9b122 please reopen if the problem still exists.