scrobble method

Future<ScrobbleResponse> scrobble({
  1. String? album,
  2. String? albumArtist,
  3. int? trackNumber,
  4. Duration? duration,
  5. DateTime? timestamp,
  6. String? context,
  7. String? streamId,
  8. bool chosenByUser = false,
  9. String? mbid,
})

Implementation

Future<ScrobbleResponse> scrobble({
  String? album,
  String? albumArtist,
  int? trackNumber,
  Duration? duration,
  DateTime? timestamp,
  String? context,
  String? streamId,
  bool chosenByUser = false,
  String? mbid,
}) async {
  timestamp ??= DateTime.now();

  return await _trackMethods.scrobble(
    track: name,
    album: album ?? this.album?.name,
    artist: artist?.name ?? '',
    albumArtist: albumArtist,
    trackNumber: trackNumber,
    duration: duration ?? this.duration,
    timestamp: timestamp,
    context: context,
    streamId: streamId,
    chosenByUser: chosenByUser,
    mbid: mbid ?? this.mbid,
  );
}