From e21d6bd5be80ee9432379dc54dd7be9a73f03539 Mon Sep 17 00:00:00 2001 From: Gaimoydev <106746080+Gaimoydev@users.noreply.github.com> Date: Mon, 12 Oct 2026 19:28:38 +0800 Subject: [PATCH 1/4] =?UTF-8?q?add:=20=E6=92=AD=E6=94=BE=E6=97=B6=E4=BC=A0?= =?UTF-8?q?=E9=80=92=E6=89=80=E9=80=89=E9=9F=B3=E8=B4=A8=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=92=AD=E6=94=BE=E8=B5=84=E6=BA=90=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E9=92=A9=E5=AD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Playback/IPlaybackQualitySelector.cs | 9 +++++++++ .../Playback/IPlaybackResourceResolver.cs | 14 ++++++++++++++ .../PlayCore.PlayerModification.cs | 8 +++++++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 HyPlayer.PlayCore.Abstraction/Interfaces/Playback/IPlaybackQualitySelector.cs create mode 100644 HyPlayer.PlayCore.Abstraction/Interfaces/Playback/IPlaybackResourceResolver.cs diff --git a/HyPlayer.PlayCore.Abstraction/Interfaces/Playback/IPlaybackQualitySelector.cs b/HyPlayer.PlayCore.Abstraction/Interfaces/Playback/IPlaybackQualitySelector.cs new file mode 100644 index 0000000..c20c167 --- /dev/null +++ b/HyPlayer.PlayCore.Abstraction/Interfaces/Playback/IPlaybackQualitySelector.cs @@ -0,0 +1,9 @@ +using HyPlayer.PlayCore.Abstraction.Models.Resources; +using HyPlayer.PlayCore.Abstraction.Models.SingleItems; + +namespace HyPlayer.PlayCore.Abstraction.Interfaces.Playback; + +public interface IPlaybackQualitySelector +{ + ResourceQualityTag? GetPlaybackQualityTag(SingleSongBase song); +} diff --git a/HyPlayer.PlayCore.Abstraction/Interfaces/Playback/IPlaybackResourceResolver.cs b/HyPlayer.PlayCore.Abstraction/Interfaces/Playback/IPlaybackResourceResolver.cs new file mode 100644 index 0000000..5ab6f28 --- /dev/null +++ b/HyPlayer.PlayCore.Abstraction/Interfaces/Playback/IPlaybackResourceResolver.cs @@ -0,0 +1,14 @@ +using HyPlayer.PlayCore.Abstraction.Interfaces.Provider; +using HyPlayer.PlayCore.Abstraction.Models.Resources; +using HyPlayer.PlayCore.Abstraction.Models.SingleItems; + +namespace HyPlayer.PlayCore.Abstraction.Interfaces.Playback; + +public interface IPlaybackResourceResolver +{ + Task ResolvePlaybackResourceAsync( + SingleSongBase song, + IMusicResourceProvidable provider, + ResourceQualityTag? qualityTag, + CancellationToken ctk = default); +} diff --git a/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.PlayerModification.cs b/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.PlayerModification.cs index 27c57c7..2337623 100644 --- a/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.PlayerModification.cs +++ b/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.PlayerModification.cs @@ -1,5 +1,6 @@ using Depository.Abstraction.Interfaces; using HyPlayer.PlayCore.Abstraction.Interfaces.AudioServices; +using HyPlayer.PlayCore.Abstraction.Interfaces.Playback; using HyPlayer.PlayCore.Abstraction.Interfaces.Provider; using HyPlayer.PlayCore.Abstraction; using HyPlayer.PlayCore.Abstraction.Models.AudioServiceComponents; @@ -112,7 +113,12 @@ private async Task DisposeCurrentPlayingTicketAsync(bool stopTicket, Cancellatio if (provider is null) return null; - return await provider.GetMusicResourceAsync(song, null, ctk).ConfigureAwait(false); + var qualityTag = ResolveOptional(typeof(IPlaybackQualitySelector)) + ?.GetPlaybackQualityTag(song); + if (ResolveOptional(typeof(IPlaybackResourceResolver)) is { } resolver) + return await resolver.ResolvePlaybackResourceAsync(song, provider, qualityTag, ctk).ConfigureAwait(false); + + return await provider.GetMusicResourceAsync(song, qualityTag, ctk).ConfigureAwait(false); } private Task PublishPlaybackFailureAsync(SingleSongBase? song, string reason, Exception? exception, CancellationToken ctk) From ee43b605e4d49672d23447c9b1824481d570d525 Mon Sep 17 00:00:00 2001 From: Gaimoydev <106746080+Gaimoydev@users.noreply.github.com> Date: Tue, 13 Oct 2026 00:22:29 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20=E6=B8=90=E8=BF=9B=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E5=AE=B9=E5=99=A8=E6=8C=89=E5=AE=9E=E9=99=85=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E7=9A=84=E6=9D=A1=E6=95=B0=E6=8E=A8=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PlayListControllers/DefaultPlayListManager.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/HyPlayer.PlayCore/PlayListControllers/DefaultPlayListManager.cs b/HyPlayer.PlayCore/PlayListControllers/DefaultPlayListManager.cs index 7894fe1..a73e539 100644 --- a/HyPlayer.PlayCore/PlayListControllers/DefaultPlayListManager.cs +++ b/HyPlayer.PlayCore/PlayListControllers/DefaultPlayListManager.cs @@ -51,10 +51,13 @@ private async Task AppendSongContainerToList( (hasMore, var progressiveList) = await progressiveLoadingContainer.GetProgressiveItemsListAsync( start, progressiveLoadingContainer.MaxProgressiveCount, ctk); + if (progressiveList.Count == 0) + break; + var resultList = progressiveList.OfType().ToList(); list.AddRange(resultList); _list.AddRange(resultList); - start += progressiveLoadingContainer.MaxProgressiveCount; + start += progressiveList.Count; await _notificationHub.PublishNotificationAsync(new InnerPlayListProgressiveAddedNotification { AddedSongs = resultList From 3c7e1ac388a038ade52a2347ee8bed03c1527efe Mon Sep 17 00:00:00 2001 From: Gaimoydev <106746080+Gaimoydev@users.noreply.github.com> Date: Tue, 13 Oct 2026 00:23:16 +0800 Subject: [PATCH 3/4] =?UTF-8?q?add:=20Provider=20=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E6=96=B0=E5=A2=9E=E4=B8=8D=E9=80=8F=E6=98=8E?= =?UTF-8?q?=E7=9A=84=E7=BB=AD=E9=A1=B5=E4=BB=A4=E7=89=8C=EF=BC=8C=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E5=88=86=E9=A1=B5=E6=94=AF=E6=8C=81=E7=BB=AD=E9=A1=B5?= =?UTF-8?q?=E4=BB=A4=E7=89=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IProvidableItemCommentPageTokenProvidable.cs | 11 +++++++++++ .../Models/ProviderPageResult.cs | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IProvidableItemCommentPageTokenProvidable.cs diff --git a/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IProvidableItemCommentPageTokenProvidable.cs b/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IProvidableItemCommentPageTokenProvidable.cs new file mode 100644 index 0000000..343e3d5 --- /dev/null +++ b/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IProvidableItemCommentPageTokenProvidable.cs @@ -0,0 +1,11 @@ +using HyPlayer.PlayCore.Abstraction.Models; +using HyPlayer.PlayCore.Abstraction.Models.SingleItems; + +namespace HyPlayer.PlayCore.Abstraction.Interfaces.Provider; + +public interface IProvidableItemCommentPageTokenProvidable : IProvider +{ + public Task> GetCommentsPageAsync(string itemId, string typeId, string? pageToken, int count, int sortType = 1, CancellationToken ctk = new()); + + public Task> GetThreadedCommentsPageAsync(string itemId, string typeId, string commentId, string? pageToken, int count, CancellationToken ctk = new()); +} diff --git a/HyPlayer.PlayCore.Abstraction/Models/ProviderPageResult.cs b/HyPlayer.PlayCore.Abstraction/Models/ProviderPageResult.cs index 0d2df6c..0138904 100644 --- a/HyPlayer.PlayCore.Abstraction/Models/ProviderPageResult.cs +++ b/HyPlayer.PlayCore.Abstraction/Models/ProviderPageResult.cs @@ -21,6 +21,8 @@ public sealed class ProviderPageResult /// public int? NextOffset { get; set; } + public string? NextPageToken { get; set; } + /// /// Gets or sets the total item count when the provider exposes one. /// From f2f28fc8022cc06ca27323cb3733094db5382222 Mon Sep 17 00:00:00 2001 From: Gaimoydev <106746080+Gaimoydev@users.noreply.github.com> Date: Tue, 13 Oct 2026 00:23:28 +0800 Subject: [PATCH 4/4] =?UTF-8?q?add:=20=E6=96=B0=E5=A2=9E=E9=9F=B3=E4=B9=90?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E7=9A=84=E8=AF=95=E5=90=AC=E5=85=83=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Models/Resources/IAudioTrialMetadata.cs | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 HyPlayer.PlayCore.Abstraction/Models/Resources/IAudioTrialMetadata.cs diff --git a/HyPlayer.PlayCore.Abstraction/Models/Resources/IAudioTrialMetadata.cs b/HyPlayer.PlayCore.Abstraction/Models/Resources/IAudioTrialMetadata.cs new file mode 100644 index 0000000..166f1bd --- /dev/null +++ b/HyPlayer.PlayCore.Abstraction/Models/Resources/IAudioTrialMetadata.cs @@ -0,0 +1,6 @@ +namespace HyPlayer.PlayCore.Abstraction.Models.Resources; + +public interface IAudioTrialMetadata +{ + bool IsTrial { get; } +}