2022-02-16 23:38:45 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Selector.Model
|
|
|
|
|
{
|
2022-10-07 23:33:54 +01:00
|
|
|
|
public class UserScrobble: Scrobble, IUserListen
|
2022-02-16 23:38:45 +00:00
|
|
|
|
{
|
2022-02-20 21:54:01 +00:00
|
|
|
|
public int Id { get; set; }
|
2022-02-16 23:38:45 +00:00
|
|
|
|
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,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|