Skip to content

Commit

Permalink
renamed file to make imports better
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmohr committed Mar 27, 2018
1 parent e668585 commit 715273d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
# and be sure to test it firstly using "python setup.py register sdist upload -r pypitest"
setup(name='sonyapilib',
packages = ['sonyapilib'], # this must be the same as the name above
version = '0.1',
version = '0.1.1',
description = 'Lib to control sony devices with theier soap api',
author = 'Alexander Mohr',
author_email = '[email protected]',
url = 'https://github.com/alexmohr/sonyapilib', # use the URL to the github repo
download_url = 'https://codeload.github.com/alexmohr/sonyapilib/tar.gz/0.1',
download_url = 'https://codeload.github.com/alexmohr/sonyapilib/tar.gz/0.1.1',
keywords = ['soap', 'sony', 'api'], # arbitrary keywords
classifiers = [],
)
10 changes: 6 additions & 4 deletions sonyapilib/sonyApiLib.py → sonyapilib/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import jsonpickle

import ssdp
import sonyapilib.ssdp
_LOGGER = logging.getLogger(__name__)

TIMEOUT = 10
Expand Down Expand Up @@ -81,6 +81,9 @@ def __init__(self, host, port=50001, dmr_port=52323, ircc_location=None):
self.ircc_url = "http://{0}:{1}/Ircc.xml".format(host, port)
self.dmr_port = dmr_port

if len(self.actions) == 0:
self.update_service_urls()

@staticmethod
def discover():
"""
Expand Down Expand Up @@ -130,9 +133,9 @@ def wakeonlan(self):

def update_service_urls(self):
""" Initalizes the device by reading the necessary resources from it """

lirc_url = urllib.parse.urlparse(self.ircc_url)



response = self.send_http(self.ircc_url, method=HttpMethod.GET)
raw_data = response.text
xml_data = xml.etree.ElementTree.fromstring(raw_data)
Expand Down Expand Up @@ -613,4 +616,3 @@ def browserBookmarkList(self):

def list(self):
self.send_req_ircc(self.commands['List'].value)

0 comments on commit 715273d

Please sign in to comment.