str: The Sonos descriptor to use for this service.

        The Sonos descriptor is used as the content of the <desc> tag in
        DIDL metadata, to indicate the relevant music service id and username.
425519
def desc(self):
        
        desc = "SA_RINCON{}_{}".format(
            self.account.service_type, self.account.username
        )
        return desc
295558
def get_file_descriptor(self):
        
        return self._subscription.connection and self._subscription.connection._sock.fileno()
403561
def org_describe(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/describe' % object_id, input_params, always_retry=always_retry, **kwargs)
500532
private String lookupVolume(String volumeIdOrName) {

		String ret = null;
		if(! Utils.isEmptyOrWhitespaces(volumeIdOrName)) {
			// Lookup by volume ID
			DescribeVolumesRequest dvs = new DescribeVolumesRequest(Collections.singletonList(volumeIdOrName));
			DescribeVolumesResult dvsresult = null;

			try {
				dvsresult = this.ec2Api.describeVolumes(dvs);
			} catch(Exception e) {
				dvsresult = null;
			}

			// If not found, lookup by name
			if(dvsresult == null || dvsresult.getVolumes() == null || dvsresult.getVolumes().size() < 1) {
				dvs = new DescribeVolumesRequest().withFilters(new Filter().withName("tag:Name").withValues(volumeIdOrName));
				try {
					dvsresult = this.ec2Api.describeVolumes(dvs);
				} catch(Exception e) {
					dvsresult = null;
				}
			}

			if(dvsresult != null && dvsresult.getVolumes() != null && dvsresult.getVolumes().size() > 0)
				ret = dvsresult.getVolumes().get(0).getVolumeId();
		}

		return ret;
	}
193660
public function sendMusic($toUser, $title, $description, $musicurl, $hqmusicurl, $thumb_media_id)
    {
        $hqmusicurl = $hqmusicurl == '' ? $musicurl : $hqmusicurl;
        $ret = array();
        $ret['touser'] = $toUser;
        $ret['msgtype'] = 'video';
        $ret['music']['title'] = $title;
        $ret['music']['description'] = $description;
        $ret['music']['musicurl'] = $musicurl;
        $ret['music']['hqmusicurl'] = $hqmusicurl;
        $ret['music']['thumb_media_id'] = $thumb_media_id;
        return $this->send($ret);
    }
1022564
final String getConnectionDescription() {

      if(datasource != null) {
         return name;
      }

      String description = connectionString;
      int index = connectionString != null ? connectionString.indexOf('?') : 0;
      if(index > 0) {
         description = connectionString.substring(0, index);
      }

      if(!Strings.isNullOrEmpty(user)) {
         return user + "@" + description;
      } else {
         return description;
      }
   }
124214
public JingleDescription getJingleDescription() {
        JingleDescription result = null;
        PayloadType payloadType = getBestCommonAudioPt();
        if (payloadType != null) {
            result = new JingleDescription.Audio(payloadType);
        } else {
            // If we haven't settled on a best payload type yet then just use the first one in our local list.
            result = new JingleDescription.Audio();
            result.addAudioPayloadTypes(localAudioPts);
        }
        return result;
    }
164441
def get_summary_str(self, sec2d_nt):
        """"""
        data = self.get_summary_data(sec2d_nt)
        return "{M} GO IDs placed into {N} sections; {U} unplaced GO IDs".format(
            N=len(data['sections']), M=len(data['grouped']), U=len(data['ungrouped']))
977372
def parse(self, data):
        # type: (bytes) -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF Implementation Use Volume Descriptor Implementation Use field already initialized')

        (self.char_set, self.log_vol_ident, self.lv_info1, self.lv_info2,
         self.lv_info3, impl_ident,
         self.impl_use) = struct.unpack_from(self.FMT, data, 0)

        self.impl_ident = UDFEntityID()
        self.impl_ident.parse(impl_ident)

        self._initialized = True
950947
def song_detail(ids):
    
    if not isinstance(ids, list):
        raise ParamsError()
    c = []
    for id in ids:
        c.append({'id': id})
    r = NCloudBot()
    r.method = 'SONG_DETAIL'
    r.data = {'c': json.dumps(c), 'ids': c, "csrf_token": ""}
    r.send()

    return r.response
891116
public String toDescriptor() {
        int i;
        StringBuilder result;

        if (isArray()) {
            result = new StringBuilder();
            for (i = 0; i < dimensions; i++) {
                result.append('[');
            }
            result.append(componentType.descriptor);
            if (componentType.id == T_REFERENCE) {
                result.append(name.replace('.', '/'));
                result.append(';');
            }
            return result.toString();
        } else {
            if (componentType.id != T_REFERENCE) {
                throw new RuntimeException("not a reference type: " + this);
            }
            return name.replace('.', '/');
        }
    }
1117059
private static String descriptorToInternalName(String descriptor) {
        switch (descriptor.charAt(0)) {
            case 'B':
            case 'C':
            case 'D':
            case 'F':
            case 'I':
            case 'J':
            case 'S':
            case 'Z':
            case 'V':
            case '[':
                return descriptor;
            case 'L':
                return classDescriptorToInternalName(descriptor);
            default:
                throw new IllegalArgumentException("bad descriptor:" +
                    descriptor);
        }
    }
1200332
def description(self):
        """"""

        name = None
        try:
            name = self._TYPE_NAMES[self.audioObjectType]
        except IndexError:
            pass
        if name is None:
            return
        if self.sbrPresentFlag == 1:
            name += "+SBR"
        if self.psPresentFlag == 1:
            name += "+PS"
        return text_type(name)
281317
function AudioFeature() {
      var _this;

      var ua = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
      var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var cssFlagsPrefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'audio';

      _classCallCheck(this, AudioFeature);

      _this = _possibleConstructorReturn(this, _getPrototypeOf(AudioFeature).call(this, ua, flags, cssFlagsPrefix));

      _this._createTestElements();

      _this.context = _this.getContext();
      _this.formats = {
        mp3: _this.getMp3(),
        webm: _this.getWebm(),
        ogg: _this.getOgg(),
        opus: _this.getOpus(),
        wav: _this.getWav(),
        m4a: _this.getM4a()
      };
      return _this;
    }
702811
def create_sonos_playlist_from_queue(self, title):
        
        # Note: probably same as Queue service method SaveAsSonosPlaylist
        # but this has not been tested.  This method is what the
        # controller uses.
        response = self.avTransport.SaveQueue([
            ('InstanceID', 0),
            ('Title', title),
            ('ObjectID', '')
        ])
        item_id = response['AssignedObjectID']
        obj_id = item_id.split(':', 2)[1]
        uri = "file:///jffs/settings/savedqueues.rsq#{0}".format(obj_id)
        res = [DidlResource(uri=uri, protocol_info="x-rincon-playlist:*:*:*")]
        return DidlPlaylistContainer(
            resources=res, title=title, parent_id='SQ:', item_id=item_id)
217754
function(descriptor, options) {
  var options = options  || {};

  // Extract tagName, defaults to 'div'
  var tagName = /^([a-zA-Z0-9]*)/.exec(descriptor);
  options.tag = tagName && tagName[1] ? tagName[1] : 'div';

  // Any occurence of #some_chars
  var id = /#([a-zA-Z0-9_]*)/.exec(descriptor);
  if (id && id[1]) options.id = id[1];

  // Any occurence of .some-chars
  // if (!options.class) {
  //   var re = new RegExp(/\.([a-zA-Z0-9_-]*)/g);
  //   var classes = [];
  //   var classMatch;
  //   while (classMatch = re.exec(descriptor)) {
  //     classes.push(classMatch[1]);
  //   }
  //   options.class = classes.join(' ');
  // }

  // Any occurence of .some-chars
  var matchClasses = new SRegExp(/\.([a-zA-Z0-9_-]*)/g);
  // options.class = options.class ? options.class+' ' : '';
  if (!options.class) {
    options.class = matchClasses.match(descriptor).map(function(m) {
      return m.match[1];
    }).join(' ');
  }

  return new ElementRenderer(options);
}
1329206
def get_info_mpris2(name):
    
    # qdbus org.mpris.MediaPlayer2.<name> /org/mpris/MediaPlayer2\
    # org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Metadat
    bus_name = 'org.mpris.MediaPlayer2.' + name
    path = '/org/mpris/MediaPlayer2'
    interface = 'org.mpris.MediaPlayer2.Player'
    address = DBusAddress(path, bus_name=bus_name, interface=interface)
    msg = Properties(address).get('Metadata')
    connection = connect_and_authenticate()
    response = connection.send_and_get_reply(msg)
    metadata = dict(response[0][1])
    keys = ['album', 'title', 'artist', 'albumartist']

    info = {}
    metadata = {k: v for k, v in metadata.items() if 'xesam:' in k}
    for key, value in metadata.items():
        name = key.split(':')[1].lower()
        value = value[1]
        if name not in keys or name in info:
            continue
        if isinstance(value, list):
            value = value[0]
        info[name] = value

    if 'albumartist' in info:
        info['artist'] = info['albumartist']
        del info['albumartist']

    return Song(**info)