手機,遙控器點歌歌名作標記
This commit is contained in:
parent
d36ddd9e90
commit
685afb1642
@ -274,6 +274,8 @@ namespace DualScreenDemo
|
||||
ClearDisplay();
|
||||
if (song != null)
|
||||
{
|
||||
song.getBasic().setNameTest(".");
|
||||
|
||||
if (Program.room.IsOpen())
|
||||
{
|
||||
if (input.Equals("a"))
|
||||
|
@ -22,5 +22,6 @@ namespace DBObj
|
||||
public string getName() =>Name;
|
||||
public string getFileName() => FileName;
|
||||
public int getHumanVoice() => HumanVoice;
|
||||
public string setNameTest(string s) => Name = Name+s;
|
||||
}
|
||||
}
|
@ -46,13 +46,16 @@ namespace DualScreenDemo
|
||||
string externalAddress = Utils.Env.Get("PhoneIP", "").Trim();
|
||||
_listener = new HttpListener();
|
||||
_listener.Prefixes.Add($"http://{localAddress}:{port}/");
|
||||
string hostName = System.Net.Dns.GetHostName();
|
||||
string hostName = System.Net.Dns.GetHostName();
|
||||
//string hostName = "pc101";
|
||||
string externalPort = '1' + hostName.Substring(Math.Max(2, hostName.Length - 20));
|
||||
if (!string.IsNullOrEmpty(externalAddress))
|
||||
{
|
||||
string host = externalAddress.Split(':')[0];
|
||||
externalPort = '1' + System.Net.Dns.GetHostName().Substring(Math.Max(2, System.Net.Dns.GetHostName().Length - 20));
|
||||
_listener.Prefixes.Add($"http://{host}:{externalPort}/");
|
||||
//externalPort = '1' + hostName.Substring(Math.Max(2, System.Net.Dns.GetHostName().Length - 20));
|
||||
//_listener.Prefixes.Add($"http://{host}:{externalPort}/");
|
||||
}
|
||||
string localQrContent = String.Format("http://{0}:{1}/{2}/windows.html", localAddress, port, randomFolderName);
|
||||
|
||||
@ -706,8 +709,9 @@ namespace DualScreenDemo
|
||||
|
||||
if (song != null) {
|
||||
Console.WriteLine($"Ordering Song: {song.getName()} by {song.getArtist_A()}");
|
||||
|
||||
|
||||
// 这里可以添加处理逻辑,例如将歌曲加入到播放列表或数据库中
|
||||
song.getBasic().setNameTest("*");
|
||||
SongList.Add(song);
|
||||
|
||||
var response = new { status = "success", message = "Song ordered successfully" };
|
||||
|
Loading…
x
Reference in New Issue
Block a user