mirror of
https://github.com/jayfunc/BetterLyrics.git
synced 2026-01-12 19:08:33 +08:00
- 歌词原文译文分隔符现可自定义 - 音乐库新增“播放全部”按钮 - 接入 Last.fm 服务(分别为播放源配置是否开启 Last.fm 听歌记录服务) 改动: - 分别为播放源配置歌词源、设置歌词同步阈值、歌词偏移值 修复: - 在启用强制显示在全屏应用上时从停靠模式、桌面模式切回标准模式后窗口仍永远处于顶部的异常行为 - “歌词背景不透明度“选项对桌面模式、停靠模式无效的问题
48 lines
1.9 KiB
C#
48 lines
1.9 KiB
C#
using BetterLyrics.WinUI3.Constants;
|
|
using BetterLyrics.WinUI3.Helper;
|
|
using Microsoft.UI.Xaml.Data;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BetterLyrics.WinUI3.Converter
|
|
{
|
|
public class MediaSourceProviderToDisplayedNameConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, string language)
|
|
{
|
|
if (value is string provider)
|
|
{
|
|
return provider switch
|
|
{
|
|
PlayerID.Spotify => PlayerName.Spotify,
|
|
PlayerID.AppleMusic => PlayerName.AppleMusic,
|
|
PlayerID.iTunes => PlayerName.iTunes,
|
|
PlayerID.KugouMusic => PlayerName.KugouMusic,
|
|
PlayerID.NetEaseCloudMusic => PlayerName.NetEaseCloudMusic,
|
|
PlayerID.QQMusic => PlayerName.QQMusic,
|
|
PlayerID.LXMusic => PlayerName.LXMusic,
|
|
PlayerID.MediaPlayerWindows11 => PlayerName.MediaPlayerWindows11,
|
|
PlayerID.AIMP => PlayerName.AIMP,
|
|
PlayerID.Foobar2000 => PlayerName.Foobar2000,
|
|
PlayerID.MusicBee => PlayerName.MusicBee,
|
|
PlayerID.PotPlayer => PlayerName.PotPlayer,
|
|
PlayerID.Chrome => PlayerName.Chrome,
|
|
PlayerID.Edge => PlayerName.Edge,
|
|
PlayerID.BetterLyrics => PlayerName.BetterLyrics,
|
|
PlayerID.BetterLyricsDebug => PlayerName.BetterLyricsDebug,
|
|
_ => provider,
|
|
};
|
|
}
|
|
return value?.ToString() ?? "";
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|