xref: /MusicPlayer2/MusicPlayer2/LyricDownloadCommon.h (revision 877f5f92b251a01591a4960c885129aa589a8135)
1 //此类用于定义通过网络下载歌词相关的全局函数
2 //歌词的下载调用了网易云音乐的API
3 #pragma once
4 #include "InternetCommon.h"
5 
6 class CLyricDownloadCommon
7 {
8 
9 public:
10 	CLyricDownloadCommon();
11 	~CLyricDownloadCommon();
12 
13 
14 	//根据网易云音乐中歌曲的id下载歌词,结果保存中result中,download_translate参数指定是否下载带翻译的歌词
15 	static bool DownloadLyric(const wstring& song_id, wstring& result, bool download_translate = true);
16 
17 	static bool DisposeLryic(wstring& lyric_str);	//对从网易云音乐下载的歌词进行处理,转换成正确的歌词文本
18 	static void AddLyricTag(wstring& lyric_str, const wstring& song_id, const wstring& title = _T(""), const wstring& artist = _T(""), const wstring& album = _T(""));		//在歌词前面加上标签信息
19 };
20 
21