Skip to content

Commit a520a4e

Browse files
authored
Merge pull request #288 from jitwxs/release/7_2
Release v7.2
2 parents ed936fa + 507637c commit a520a4e

35 files changed

+1223
-519
lines changed

README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
55
[![Email](https://img.shields.io/badge/Email-jitwxs%40foxmail.com-brightgreen)](#)
66

7-
### Important Announcement
8-
9-
为了满足后续功能需要,我们将更换技术栈以支持跨平台等其他现代化特性。[v6.5](https://github.com/jitwxs/163MusicLyrics/releases/tag/v6.5) 为基于 Winform 架构的最后一个版本。
10-
11-
如果您在使用新版本的过程中遇到任何问题,请提交 [Issues](https://github.com/jitwxs/163MusicLyrics/issues) 进行反馈,在此期间可回退到老版本进行兼容。
12-
137
### How To Use
148

159
[👉163MusicLyrics User Guide](https://github.com/jitwxs/163MusicLyrics/wiki)
@@ -36,10 +30,6 @@
3630
Enter the [Github Release](https://github.com/jitwxs/163musiclyrics/releses) page to download the latest version, you can
3731
click on [Changelog](https://github.com/jitwxs/163musiclyrics/wiki/changelog) to view the changes in different versions.
3832

39-
**注意:** 为了减少应用的体积,部分非必须功能采用插件形式,具体请参阅 User Guide。
40-
41-
**Attention:** To reduce the application's size,some non-essential features require plugins, please refer to the User Guide for more information.
42-
4333
![screenshot](./images/latest_version.png)
4434

4535
### Contribution
@@ -69,12 +59,10 @@ the project, if you are willing to contribute, you can:
6959
- https://github.com/ElliottSilence/LyricCapture
7060
- https://github.com/xmcp/QRCD
7161
- https://github.com/ivanakcheurov/ntextcat
72-
- https://github.com/Cutano/Kawazu
7362

7463
第三方使用介绍视频 Third party use guide videos
7564

7665
- https://www.bilibili.com/video/BV19R4y197on
77-
- https://www.xiaohongshu.com/discovery/item/6399a6aa000000001f00987b
7866

7967
### Donate
8068

@@ -85,6 +73,13 @@ maintained personally, all features are free. If you would like to treat the cre
8573

8674
| username | donate | platform | date |
8775
|:-------------|:----------|:-------|:-----------|
76+
| 晓风雅月 | 6.66 CNY | wechat | 2025-06-18 |
77+
| *🧙 | 9 CNY | wechat | 2025-06-17 |
78+
| C*n | 5 CNY | wechat | 2025-06-12 |
79+
| 星幻丶碎梦 | 39 CNY | wechat | 2025-06-07 |
80+
| 四眼崩牙仔 | 10 CNY | alipay | 2025-06-07 |
81+
| ringo | 5 CNY | wechat | 2025-06-06 |
82+
| 芹菜 | 10 CNY | alipay | 2025-06-05 |
8883
| *| 5 CNY | wechat | 2025-03-02 |
8984
| 进击的咕哒子 | 10 CNY | wechat | 2025-02-22 |
9085
| 张大师 | 3 CNY | wechat | 2024-12-26 |
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
using JetBrains.Annotations;
2+
using MusicLyricApp.Core.Utils;
3+
using MusicLyricApp.Models;
4+
5+
namespace MusicLyricAppTest.Core.Utils;
6+
7+
[TestSubject(typeof(GlobalUtils))]
8+
public class GlobalUtilsTest
9+
{
10+
[Fact]
11+
public void TestConvertSearchWithShareLink_SongId()
12+
{
13+
var origin = "https://i.y.qq.com/v8/playsong.html?songid=107762031&songtype=0#webchat_redirect";
14+
var target = "https://i.y.qq.com/v8/songDetail/107762031";
15+
16+
Assert.Equal(target, GlobalUtils.ConvertSearchWithShareLink(SearchSourceEnum.QQ_MUSIC, origin));
17+
Assert.Equal(origin, GlobalUtils.ConvertSearchWithShareLink(SearchSourceEnum.NET_EASE_MUSIC, origin));
18+
}
19+
20+
[Fact]
21+
public void TestConvertSearchWithShareLink_AlbumId()
22+
{
23+
var origin = "https://i.y.qq.com/n2/m/share/details/album.html?albummid=003RL1Hk0lf62Q";
24+
var target = "https://i.y.qq.com/n2/m/share/details/albumDetail/003RL1Hk0lf62Q";
25+
26+
Assert.Equal(target, GlobalUtils.ConvertSearchWithShareLink(SearchSourceEnum.QQ_MUSIC, origin));
27+
Assert.Equal(origin, GlobalUtils.ConvertSearchWithShareLink(SearchSourceEnum.NET_EASE_MUSIC, origin));
28+
}
29+
30+
[Fact]
31+
public void TestConvertSearchWithShareLink_AlbumId2()
32+
{
33+
var origin = "https://i.y.qq.com/n2/m/share/details/album.html?ADTAG=pc_v17&albumId=36316266&channelId=10036163&openinqqmusic=1";
34+
var target = "https://i.y.qq.com/n2/m/share/details/albumDetail/36316266&channelId=10036163&openinqqmusic=1";
35+
36+
Assert.Equal(target, GlobalUtils.ConvertSearchWithShareLink(SearchSourceEnum.QQ_MUSIC, origin));
37+
Assert.Equal(origin, GlobalUtils.ConvertSearchWithShareLink(SearchSourceEnum.NET_EASE_MUSIC, origin));
38+
}
39+
40+
[Fact]
41+
public void TestConvertSearchWithShareLink_PlaylistId()
42+
{
43+
var origin = "https://i.y.qq.com/n2/m/share/details/taoge.html?id=7581901981&hosteuin=";
44+
var target = "https://i.y.qq.com/n2/m/share/details/playlist/7581901981";
45+
46+
Assert.Equal(target, GlobalUtils.ConvertSearchWithShareLink(SearchSourceEnum.QQ_MUSIC, origin));
47+
Assert.Equal(origin, GlobalUtils.ConvertSearchWithShareLink(SearchSourceEnum.NET_EASE_MUSIC, origin));
48+
}
49+
50+
[Fact]
51+
public void TestConvertSearchWithShareLink_NonQQMusic()
52+
{
53+
// Arrange
54+
var searchSource = SearchSourceEnum.NET_EASE_MUSIC;
55+
var input = "https://i.y.qq.com/v8/playsong.html?songid=107762031&songtype=0#webchat_redirect";
56+
var expected = input; // Should remain unchanged for non-QQ music
57+
58+
// Act
59+
var actual = GlobalUtils.ConvertSearchWithShareLink(searchSource, input);
60+
61+
// Assert
62+
Assert.Equal(expected, actual);
63+
}
64+
65+
[Fact]
66+
public void TestConvertSearchWithShareLink_OtherQQMusicLink()
67+
{
68+
// Arrange
69+
var searchSource = SearchSourceEnum.QQ_MUSIC;
70+
var input = "https://y.qq.com/n/ryqq/songDetail/003ODsL83GwKj4";
71+
var expected = input; // Should remain unchanged if it doesn't match any patterns
72+
73+
// Act
74+
var actual = GlobalUtils.ConvertSearchWithShareLink(searchSource, input);
75+
76+
// Assert
77+
Assert.Equal(expected, actual);
78+
}
79+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
using JetBrains.Annotations;
2+
using MusicLyricApp.Core.Utils;
3+
4+
namespace MusicLyricAppTest.Core.Utils;
5+
6+
[TestSubject(typeof(VerbatimLyricUtils))]
7+
public class VerbatimLyricUtilsTest
8+
{
9+
10+
[Fact]
11+
public void Convert_BasicLine_WithThreeTimeStamps()
12+
{
13+
string input = "[00:04.260]遠[00:04.940]い[00:05.150]夏";
14+
string expected = "[00:04.260]<00:04.260>遠<00:04.940>い<00:05.150>夏";
15+
16+
string result = VerbatimLyricUtils.ConvertVerbatimLyricFromBasicToA2Mode(input);
17+
18+
Assert.Equal(expected, result);
19+
}
20+
21+
[Fact]
22+
public void Convert_TwoDecimalPrecision_ShouldKeepFormat()
23+
{
24+
string input = "[00:04.26]遠[00:04.94]い[00:05.15]夏";
25+
string expected = "[00:04.26]<00:04.26>遠<00:04.94>い<00:05.15>夏";
26+
27+
string result = VerbatimLyricUtils.ConvertVerbatimLyricFromBasicToA2Mode(input);
28+
29+
Assert.Equal(expected, result);
30+
}
31+
32+
[Fact]
33+
public void Convert_SingleTimeStampLine()
34+
{
35+
string input = "[00:10.50]夏";
36+
string expected = "[00:10.50]<00:10.50>夏";
37+
38+
string result = VerbatimLyricUtils.ConvertVerbatimLyricFromBasicToA2Mode(input);
39+
40+
Assert.Equal(expected, result);
41+
}
42+
43+
[Fact]
44+
public void Convert_NoMillisecond_ShouldWork()
45+
{
46+
string input = "[00:10]夏";
47+
string expected = "[00:10]<00:10>夏";
48+
49+
string result = VerbatimLyricUtils.ConvertVerbatimLyricFromBasicToA2Mode(input);
50+
51+
Assert.Equal(expected, result);
52+
}
53+
54+
[Fact]
55+
public void Convert_MixedTimeFormats_ShouldWork()
56+
{
57+
string input = "[00:10]夏[00:15.5]の[00:20.50]日";
58+
string expected = "[00:10]<00:10>夏<00:15.5>の<00:20.50>日";
59+
60+
string result = VerbatimLyricUtils.ConvertVerbatimLyricFromBasicToA2Mode(input);
61+
62+
Assert.Equal(expected, result);
63+
}
64+
65+
[Fact]
66+
public void Convert_EmptyLine_ReturnsEmpty()
67+
{
68+
string input = "";
69+
string expected = "";
70+
71+
string result = VerbatimLyricUtils.ConvertVerbatimLyricFromBasicToA2Mode(input);
72+
73+
Assert.Equal(expected, result);
74+
}
75+
76+
[Fact]
77+
public void Convert_NoTimeStamp_ShouldReturnOriginal()
78+
{
79+
string input = "遠い夏";
80+
string expected = "遠い夏";
81+
82+
string result = VerbatimLyricUtils.ConvertVerbatimLyricFromBasicToA2Mode(input);
83+
84+
Assert.Equal(expected, result);
85+
}
86+
}

0 commit comments

Comments
 (0)