setCD method

void setCD(
  1. String? cd
)

Implementation

void setCD(String? cd) {
  if (cd != null) {
    for (final comment in _comments) {
      if (comment.name == 'DISCNUMBER') {
        comment.data = utf8.encode(cd);
        return;
      }
    }
    _comments.add(VorbisComment('DISCNUMBER', utf8.encode(cd)));
  } else {
    for (final comment in _comments) {
      if (comment.name == 'DISCNUMBER') {
        _comments.remove(comment);
        return;
      }
    }
  }
}