調整遙控器已點歌曲
This commit is contained in:
parent
af1a18550b
commit
4d02d56152
@ -305,7 +305,7 @@ namespace DualScreenDemo
|
||||
|
||||
// 輸入歌曲
|
||||
string songNumber = OverlayForm.ReadSongNumber();
|
||||
Console.WriteLine("輸入A " + songNumber + " readyForSongListInput : " + readyForSongListInput);
|
||||
//Console.WriteLine("輸入A " + songNumber + " readyForSongListInput : " + readyForSongListInput);
|
||||
var song = songListManager.SearchSongByNumber(songNumber);
|
||||
|
||||
|
||||
@ -599,23 +599,38 @@ namespace DualScreenDemo
|
||||
// 錨點 遙控器
|
||||
// 從播放紀錄中取出當前頁面應顯示的歌曲與狀態
|
||||
int completedCount = PrimaryForm.currentSongIndexInHistory;
|
||||
for (int i = startIndex; i < endIndex; i++)
|
||||
// 判斷是否正在播放公播歌單 (若用戶點播歌單為空,則播放公播歌單)
|
||||
bool isPlayingPublicList = PrimaryForm.userRequestedSongs.Count == 0 ||
|
||||
(PrimaryForm.currentSongIndexInHistory >= PrimaryForm.userRequestedSongs.Count - 1 && PrimaryForm.Instance.videoPlayerForm.IsPlayingPublicSong);
|
||||
if (isPlayingPublicList)
|
||||
{
|
||||
|
||||
historySongs.Add(PrimaryForm.playedSongsHistory[i]); // 加入歌曲
|
||||
if (i < completedCount)
|
||||
{
|
||||
playStates.Add(PlayState.Played);
|
||||
}
|
||||
else if (i == completedCount)
|
||||
for (int i = startIndex; i < endIndex; i++)
|
||||
{
|
||||
playStates.Add(PlayState.Playing);
|
||||
}
|
||||
else
|
||||
{
|
||||
playStates.Add(PlayState.NotPlayed);
|
||||
historySongs.Add(PrimaryForm.playedSongsHistory[i]); // 加入歌曲
|
||||
playStates.Add(PlayState.Played);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = startIndex; i < endIndex; i++)
|
||||
{
|
||||
|
||||
historySongs.Add(PrimaryForm.playedSongsHistory[i]); // 加入歌曲
|
||||
if (i < completedCount)
|
||||
{
|
||||
playStates.Add(PlayState.Played);
|
||||
}
|
||||
else if (i == completedCount)
|
||||
{
|
||||
playStates.Add(PlayState.Playing);
|
||||
}
|
||||
else
|
||||
{
|
||||
playStates.Add(PlayState.NotPlayed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -215,10 +215,12 @@ namespace DualScreenDemo
|
||||
OverlayForm.MainForm.UpdateMarqueeText(marqueeMessage, OverlayForm.MarqueeStartPosition.Middle, Color.White);
|
||||
});
|
||||
// 開台時跳至首頁
|
||||
PrimaryForm.Instance.HotPlayButton_Click(null, EventArgs.Empty);
|
||||
|
||||
VideoPlayerForm.publicPlaylist = new List<SongData>();
|
||||
VideoPlayerForm.playingSongList = new List<SongData>();
|
||||
VideoPlayerForm.Instance.PlayPublicPlaylist();
|
||||
PrimaryForm.currentSongIndexInHistory = -1;
|
||||
PrimaryForm.Instance.HotPlayButton_Click(null, EventArgs.Empty);
|
||||
UpdateStateFile(stateFilePath, "OPEN");
|
||||
|
||||
byte[] okResponse = Encoding.UTF8.GetBytes("OK\n");
|
||||
|
Reference in New Issue
Block a user