Skip to content

Commit

Permalink
2.1.0 Released.
Browse files Browse the repository at this point in the history
-Supported playlist with 1000+ music #8
  • Loading branch information
ludoux committed Jul 29, 2019
1 parent 2a1acad commit e831398
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions LrcHelper/LrcDownloader.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions LrcHelper/NeteaseMusic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace ludoux.LrcHelper.NeteaseMusic
{
class HttpRequest
{
public string GetContent(string sURL)
public string GetContent(string sURL, string UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0")
{

string sContent = ""; //Content
Expand All @@ -21,7 +21,7 @@ public string GetContent(string sURL)

wrGETURL.Referer= "https://music.163.com";
//wrGETURL.Headers.Set(HttpRequestHeader.Cookie, "appver=1.4.0; os=uwp; osver=10.0.15063.296"); //返回cheating
wrGETURL.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0";
wrGETURL.UserAgent = UserAgent;
Stream objStream = wrGETURL.GetResponse().GetResponseStream();
StreamReader objReader = new StreamReader(objStream);
while (sLine != null)
Expand Down Expand Up @@ -253,12 +253,12 @@ private void fetchInfo()
{
string sContent;
HttpRequest hr = new HttpRequest();
sContent = hr.GetContent("https://music.163.com/api/playlist/detail?id=" + id);
MatchCollection mc = Regex.Matches(sContent, @"(?<=""id"":)\d*?(?=,""position)");//正则匹配歌曲的ID
sContent = hr.GetContent("https://music.163.com/api/v3/playlist/detail?id=" + id + @"&c=[{""id"":""" + id + @"""}]");
MatchCollection mc = Regex.Matches(sContent, @"(?<={""id"":)\d+(?=,""v"":)");//正则匹配歌曲的ID
for (int i = 0; i < mc.Count; i++)
_songidInPlaylist.Add(Convert.ToInt64(mc[i].Value.ToString()));

_name = Regex.Match(sContent, @"(?<=,""name"":"").*?(?="",""id"")").Value;
_name = Regex.Match(Regex.Match(sContent, @"(?<=trackIds).+?(?=,""shareCount)" ).Value, @"(?<=name"":"").+?(?="",""id)").Value ;
}
public Playlist(long id)
{
Expand Down
2 changes: 1 addition & 1 deletion LrcHelper/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("2.0.13.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: NeutralResourcesLanguage("en-001")]

2 changes: 1 addition & 1 deletion UpdateInfo/UpInfo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
;ATTENTION
;Software will ask for this file and check the lastest version.
;DO NOT change the style of this file.
;+2019-6-17: https://api.ludoux.com/163lrcwin/update switch to new channel.
;+2019-6-17: https://api.ludoux.com/163lrcwin/update switch to new channel. This file has been archived.
;===================

;Software with these version WILL NOT check update.If <All> is existed, Software with ANY version WILL NOT check.
Expand Down

0 comments on commit e831398

Please sign in to comment.