public static async Task <Bookmark> ToSubsonicBookmarkAsync(this Marker marker, IMediaLibrary mediaLibrary, CancellationToken cancellationToken) { var userId = marker.User.Id; var track = await mediaLibrary.GetTrackAsync(userId, marker.TrackId, false, cancellationToken).ConfigureAwait(false); var subsonicSong = track.ToSubsonicSong(await mediaLibrary.GetAlbumAsync(userId, track.Media.AlbumId, false, cancellationToken).ConfigureAwait(false)); return(new Bookmark { Position = marker.Position, Comment = marker.Comment ?? string.Empty, Username = marker.User.Name, Changed = marker.DateModified ?? marker.DateAdded, Created = marker.DateAdded, Children = new List <Child> { subsonicSong } }); }