db_path = manager.get_parameter(plugin_section, 'database_location')
webserver = None
+class SearchOutBoundExcept(Exception):
+ def __init__(self, *args, **kargs):
+ Exception.__init__(self, *args, **kargs)
+
+
class Search(Service):
"""Class Search
Implements a search service of zukebox-server
service_type = "urn:schemas-upnp-org:service:Search:1"
service_name = "Search"
+ facade = ZFacade(db_path, webserver)
def __init__(self, xml_path):
scpd_path = pjoin(xml_path, "zukebox-search-scpd.xml");
- Service.__init__(self, service_name, service_type, '', scpd_path,
- SearchController(service_type))
-
- def get_list_audio(self):
- return self.control_controller.get_list_audio()
-
-class SearchController(ServiceController):
- """Class Search:
- Implements a search service of zukebox-server
- """
- facade = ZFacade(db_path, webserver)
+ Service.__init__(self, service_name, service_type, '', scpd_path)
+ log.info("Search service scpd_path = %s" % scpd_path)
- def __init__(self, service_type):
- ServiceController.__init__(self, service_type)
self.genre_list = []
self.name_music_list = []
self.name_artist_list = []
<?xml version="1.0" encoding="utf-8"?>
-<scpd xmls="urn:schemas-upnp-org:service-1-0">
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>genre_list</name>
- <dataType>list</dataType>
- <defaultValue> </defaultValue>
+ <dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>name_music_list</name>
- <dataType>list</dataType>
- <defaultValue> </defaultValue>
+ <dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>name_artist_list</name>
- <dataType>list</dataType>
- <defaultValue> </defaultValue>
+ <dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>all_audio_list</name>
- <dataType>list</dataType>
- <defaultValue> </defaultValue>
+ <dataType>ui4</dataType>
</stateVariable>
</serviceStateTable>
<actionList>