Selector/Selector.Model/Scrobble/UserScrobble.cs
andy fbbd42f97a working scrobble mapping command
added scrobble mapping repo
2022-02-24 00:27:34 +00:00

22 lines
550 B
C#

using System;
namespace Selector.Model
{
public class UserScrobble: Scrobble
{
public int Id { get; set; }
public string UserId { get; set; }
public ApplicationUser User { get; set; }
public static explicit operator UserScrobble(IF.Lastfm.Core.Objects.LastTrack track) => new()
{
Timestamp = track.TimePlayed?.UtcDateTime ?? DateTime.MinValue,
TrackName = track.Name,
AlbumName = track.AlbumName,
ArtistName = track.ArtistName,
};
}
}