mirror of
https://github.com/jayfunc/BetterLyrics.git
synced 2026-01-12 19:24:55 +08:00
将 SongInfo 中的 SourceAppUserModelId 属性替换为 PlayerId,新增可选属性 SongId 以支持更精确的歌曲标识。 更新了相关服务和方法的参数签名,增加对 SongId 的支持,包括 SearchSmartlyAsync 和 SearchSingleAsync 方法。 调整了 MediaSessionsService 的逻辑,支持不同播放器的 SongId 处理。 优化了代码的灵活性和可扩展性,便于处理多播放器和歌曲标识。
35 lines
851 B
C#
35 lines
851 B
C#
// 2025/6/23 by Zhe Fang
|
|
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using Windows.Graphics.Imaging;
|
|
using Windows.UI;
|
|
|
|
namespace BetterLyrics.WinUI3.Models
|
|
{
|
|
public partial class SongInfo : ObservableObject
|
|
{
|
|
[ObservableProperty]
|
|
public partial string? Album { get; set; }
|
|
|
|
[ObservableProperty]
|
|
public partial string Artist { get; set; }
|
|
|
|
[ObservableProperty]
|
|
public partial int? Duration { get; set; }
|
|
|
|
[ObservableProperty]
|
|
public partial double? DurationMs { get; set; }
|
|
|
|
[ObservableProperty]
|
|
public partial string? PlayerId { get; set; } = null;
|
|
|
|
[ObservableProperty]
|
|
public partial string Title { get; set; }
|
|
|
|
[ObservableProperty]
|
|
public partial string? SongId { get; set; } = null;
|
|
|
|
public SongInfo() { }
|
|
}
|
|
}
|