Removes the old music play history surface and drops its table

This commit is contained in:
BinaryAlley committed 2026-10-26 18:06:04 +02:00
1 parent 0b5b65391c
commit bc619679e8
83 files changed
+3955 -4893

No files matched your search

@@ -1,16 +0,0 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.PlayHistory;
/// <summary>
/// Represents a request to report that a play of a track by the current user reached its end.
/// </summary>
/// <param name="PositionInSeconds">The last position reported by the player, in seconds. Required.</param>
/// <param name="ListenedDurationInSeconds">The duration the user listened to, in seconds. Required.</param>
[DebuggerDisplay("PositionInSeconds: {PositionInSeconds}; ListenedDurationInSeconds: {ListenedDurationInSeconds}")]
public sealed record CompletePlayRequest(
double? PositionInSeconds,
double? ListenedDurationInSeconds
);
@@ -1,16 +0,0 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.PlayHistory;
/// <summary>
/// Represents a request for getting a window of the most played tracks of the current user.
/// </summary>
/// <param name="CurrentPage">The one based page of tracks to return. Optional; defaults to 1 when a page size is provided.</param>
/// <param name="PerPage">The number of tracks per page. Optional; defaults to 50 when a page is provided. When both pagination parameters are omitted, every matching track is returned.</param>
[DebuggerDisplay("CurrentPage: {CurrentPage}; PerPage: {PerPage}")]
public record GetMostPlayedRequest(
int? CurrentPage,
int? PerPage
);
@@ -1,16 +0,0 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.PlayHistory;
/// <summary>
/// Represents a request for getting a window of the recently played tracks of the current user.
/// </summary>
/// <param name="CurrentPage">The one based page of tracks to return. Optional; defaults to 1 when a page size is provided.</param>
/// <param name="PerPage">The number of tracks per page. Optional; defaults to 50 when a page is provided. When both pagination parameters are omitted, every matching track is returned.</param>
[DebuggerDisplay("CurrentPage: {CurrentPage}; PerPage: {PerPage}")]
public record GetRecentlyPlayedRequest(
int? CurrentPage,
int? PerPage
);
@@ -1,16 +0,0 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.PlayHistory;
/// <summary>
/// Represents a request to report the progress of a play of a track by the current user.
/// </summary>
/// <param name="PositionInSeconds">The last position reported by the player, in seconds. Required.</param>
/// <param name="ListenedDurationInSeconds">The duration the user has listened to, in seconds. Required.</param>
[DebuggerDisplay("PositionInSeconds: {PositionInSeconds}; ListenedDurationInSeconds: {ListenedDurationInSeconds}")]
public sealed record ReportPlayProgressRequest(
double? PositionInSeconds,
double? ListenedDurationInSeconds
);
@@ -1,16 +0,0 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Requests.MediaLibrary.AudioLibrary.MusicLibrary.PlayHistory;
/// <summary>
/// Represents a request to report that a play of a track by the current user stopped before the track completed.
/// </summary>
/// <param name="PositionInSeconds">The last position reported by the player, in seconds. Required.</param>
/// <param name="ListenedDurationInSeconds">The duration the user listened to, in seconds. Required.</param>
[DebuggerDisplay("PositionInSeconds: {PositionInSeconds}; ListenedDurationInSeconds: {ListenedDurationInSeconds}")]
public sealed record StopPlayRequest(
double? PositionInSeconds,
double? ListenedDurationInSeconds
);
@@ -1,22 +0,0 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.PlayHistory;
/// <summary>
/// Represents the listening statistics of the current user.
/// </summary>
/// <param name="TotalListeningDurationInSeconds">The total duration the user listened to, over every recorded play, in seconds.</param>
/// <param name="TotalPlayCount">The number of recorded plays that count as plays. An in-progress play counts once it reaches the threshold, so this total can exceed the completed and stopped plays together.</param>
/// <param name="CompletedPlayCount">The number of recorded plays that completed.</param>
/// <param name="StoppedPlayCount">The number of recorded plays that stopped before the track completed and count as plays.</param>
/// <param name="CompletionRate">The fraction of the plays that count as plays that completed, between 0 and 1, or 0 when there is no counted play.</param>
[DebuggerDisplay("TotalPlayCount: {TotalPlayCount}; CompletedPlayCount: {CompletedPlayCount}")]
public sealed record MusicPlayStatisticsResponse(
double TotalListeningDurationInSeconds,
int TotalPlayCount,
int CompletedPlayCount,
int StoppedPlayCount,
double CompletionRate
);
@@ -1,36 +0,0 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Domain.SharedKernel.Common.Enums.Playback;
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.PlayHistory;
/// <summary>
/// Represents a recorded play of a track by the current user.
/// </summary>
/// <param name="Id">The Id of the play record.</param>
/// <param name="TrackId">The Id of the track that was played.</param>
/// <param name="LibraryId">The Id of the media library that contains the track.</param>
/// <param name="AlbumId">The Id of the album that contains the track.</param>
/// <param name="ArtistId">The Id of the artist that produced the track.</param>
/// <param name="Status">The state of the recorded play.</param>
/// <param name="LastPositionInSeconds">The last position reported by the player, in seconds.</param>
/// <param name="ListenedDurationInSeconds">The duration the user has listened to, in seconds.</param>
/// <param name="StartedOnUtc">The date and time when the play started.</param>
/// <param name="EndedOnUtc">The date and time when the play completed or stopped, if it has ended.</param>
/// <param name="UpdatedOnUtc">The date and time when the play record was last updated, if applicable.</param>
[DebuggerDisplay("Id: {Id}; TrackId: {TrackId}; Status: {Status}")]
public sealed record PlayRecordResponse(
Guid Id,
Guid TrackId,
Guid LibraryId,
Guid AlbumId,
Guid ArtistId,
PlaybackRecordStatus Status,
double LastPositionInSeconds,
double ListenedDurationInSeconds,
DateTime StartedOnUtc,
DateTime? EndedOnUtc,
DateTime? UpdatedOnUtc
);
@@ -1,37 +0,0 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.PlayHistory;
/// <summary>
/// Represents a track of the listening statistics of the current user, together with its aggregated play counts.
/// </summary>
/// <param name="TrackId">The Id of the track.</param>
/// <param name="LibraryId">The Id of the media library that contains the track.</param>
/// <param name="AlbumId">The Id of the album that contains the track.</param>
/// <param name="ArtistId">The Id of the artist that produced the track.</param>
/// <param name="Title">The title of the track, if it still exists and the user can access its library.</param>
/// <param name="AlbumTitle">The title of the album that contains the track, if it still exists and the user can access its library.</param>
/// <param name="ArtistName">The name of the artist that produced the track, if it still exists and the user can access its library.</param>
/// <param name="CoverPath">The path of the cover art of the album, if available.</param>
/// <param name="LastPlayedOnUtc">The date and time of the last recorded activity of the track's most recent play.</param>
/// <param name="PlayCount">The number of plays of the track that count as plays.</param>
/// <param name="CompletedPlayCount">The number of plays of the track that completed.</param>
/// <param name="ListenedDurationInSeconds">The duration the user listened to the track, over all of its counted plays, in seconds.</param>
[DebuggerDisplay("TrackId: {TrackId}; PlayCount: {PlayCount}")]
public sealed record PlayedTrackResponse(
Guid TrackId,
Guid LibraryId,
Guid AlbumId,
Guid ArtistId,
string? Title,
string? AlbumTitle,
string? ArtistName,
string? CoverPath,
DateTime LastPlayedOnUtc,
int PlayCount,
int CompletedPlayCount,
double ListenedDurationInSeconds
);