From 258d1675d02d3610cb302514fb5c86ab68ee6571 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期一, 25 五月 2020 17:51:13 +0800 Subject: [PATCH] 2020-05-25-1 --- HDL_ON/UI/Music/SendMethod.cs | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/HDL_ON/UI/Music/SendMethod.cs b/HDL_ON/UI/Music/SendMethod.cs index 7f04067..def4c02 100644 --- a/HDL_ON/UI/Music/SendMethod.cs +++ b/HDL_ON/UI/Music/SendMethod.cs @@ -516,6 +516,37 @@ } /// <summary> + /// 璇诲彇鐢靛彴缁勫垪琛� + /// </summary> + /// <returns>璇诲彇鍒扮殑鐢靛彴缁勫垪琛ㄤ俊鎭紝璇诲彇涓嶅埌鍙嶉涓簄ull</returns> + public static string ReadRadioList(string url) + { + + WebClient webClient = new WebClient(); + webClient.Proxy = null; + webClient.Headers.Add("Content-type", "plain/text; charset=UTF-8"); + if (Language.CurrentLanguage == "Chinese") + { + webClient.Headers.Add("Accept-Language", "zh-cn"); + } + else + { + webClient.Headers.Add("Accept-Language", "en-us"); + } + try + { + byte[] recevieBytes = webClient.DownloadData(new Uri(url)); + return System.Text.Encoding.UTF8.GetString(recevieBytes, 0, recevieBytes.Length); + + } + catch (Exception e) + { + return null; + } + + } + + /// <summary> /// 鑾峰彇褰撳墠鎾斁鐨勫垪琛� /// </summary> public static string GetCurrentPlayList() -- Gitblit v1.8.0