Updating the service search to python-brisa 0.10 version.
[zukebox] / zukebox_server / src / services / search / zukebox_search.py
index c1f0c22..438f86a 100644 (file)
@@ -13,6 +13,11 @@ plugin_section = 'zukebox_server_plugin-audio-library'
 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
@@ -20,23 +25,13 @@ class Search(Service):
 
        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 = []