~ubuntu-branches/ubuntu/precise/coherence/precise

« back to all changes in this revision

Viewing changes to coherence/upnp/devices/control_point.py

  • Committer: Bazaar Package Importer
  • Author(s): Charlie Smotherman
  • Date: 2010-01-02 10:57:15 UTC
  • mfrom: (1.1.7 upstream) (3.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100102105715-sghzl2nw4lr5b1ob
Tags: 0.6.6.2-1
*  New  upstream release, summary of changes:
    - adding all necessary files to MANIFEST.in, to compensate for the
      gone 'auto-include-all-files-under-version-control' setuptools
      feature.
    - rearranging genre and genres attribute in DIDLLite - thx Caleb  
    - fix face_path typo, fixes #275.   

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
        return self.coherence.get_device_by_host(host)
116
116
 
117
117
    def check_device( self, device):
118
 
        self.info("found device %s of type %s - %r" %(device.get_friendly_name(),
 
118
        if device.client == None:
 
119
            self.info("found device %s of type %s - %r" %(device.get_friendly_name(),
119
120
                                                device.get_device_type(), device.client))
120
 
        if device.client == None:
121
 
            short_type = device.get_device_type().split(':')[3]
122
 
            if short_type in self.auto_client:
123
 
                self.info("identified %s %r" % (short_type,device.get_friendly_name()))
 
121
            short_type = device.get_friendly_device_type()
 
122
            if short_type in self.auto_client and short_type is not None:
 
123
                self.info("identified %s %r" %
 
124
                        (short_type, device.get_friendly_name()))
124
125
 
125
126
                if short_type == 'MediaServer':
126
127
                    client = MediaServerClient(device)
131
132
                if short_type == 'DimmableLight':
132
133
                    client = DimmableLightClient(device)
133
134
 
 
135
                client.coherence = self.coherence
134
136
                device.set_client( client)
135
137
 
136
138
        self.process_queries(device)
137
139
 
138
140
    def completed(self, client, udn):
139
 
        self.info('sending signal Coherence.UPnP.ControlPoint.%s.detected ' % client.device_type)
 
141
        self.info('sending signal Coherence.UPnP.ControlPoint.%s.detected %r' % (client.device_type, udn))
140
142
        louie.send('Coherence.UPnP.ControlPoint.%s.detected' % client.device_type, None,
141
143
                               client=client,udn=udn)
142
144