();
- for (int i = 0; i < PrimaryForm.playedSongsHistory.Count; i++)
- {
- if (PrimaryForm.playedSongsHistory[i].Name == songData.Name)
- {
- sameNameIndices.Add(i);
- }
- }
-
- if (wasEmpty)
- {
- // 如果列表为空,直接添加
- PrimaryForm.userRequestedSongs.Add(songData);
- PrimaryForm.playedSongsHistory.Add(songData);
- PrimaryForm.playStates.Add(PlayState.Playing);
- PrimaryForm.currentSongIndexInHistory = PrimaryForm.playedSongsHistory.Count - 1;
-
- // 更新之前相同歌曲的状态
- foreach (int index in sameNameIndices)
- {
- if (index < PrimaryForm.currentSongIndexInHistory)
- {
- PrimaryForm.playStates[index] = PlayState.Played;
- }
- }
-
- VideoPlayerForm.Instance.SetPlayingSongList(PrimaryForm.userRequestedSongs);
- }
- else
- {
- // 插入到当前播放歌曲之后
- int insertIndex = PrimaryForm.currentSongIndexInHistory + 1;
-
- PrimaryForm.userRequestedSongs.Insert(1, songData);
- PrimaryForm.playedSongsHistory.Insert(insertIndex, songData);
- PrimaryForm.playStates.Insert(insertIndex, PlayState.NotPlayed);
-
- // 更新所有相同歌曲的状态
- foreach (int index in sameNameIndices)
- {
- if (index < PrimaryForm.currentSongIndexInHistory)
- {
- // 之前的相同歌曲标记为已播放
- PrimaryForm.playStates[index] = PlayState.Played;
- }
- else if (index == PrimaryForm.currentSongIndexInHistory)
- {
- // 当前播放的歌曲保持Playing状态
- PrimaryForm.playStates[index] = PlayState.Playing;
- }
- else if (index > insertIndex)
- {
- // 后面的相同歌曲标记为未播放
- PrimaryForm.playStates[index] = PlayState.NotPlayed;
- }
- }
- }
-
- VideoPlayerForm.Instance.UpdateNextSongFromPlaylist();
- PrimaryForm.PrintPlayingSongList();
- }
- catch (Exception ex)
- {
- Console.WriteLine("Error occurred: " + ex.Message);
- }
- }
-
-
- public VideoStatus GetCurrentVideoStatus()
- {
- var status = new VideoStatus();
- try
- {
- IMediaSeeking mediaSeekingSecondary = graphBuilderSecondary as IMediaSeeking;
- if (mediaSeekingSecondary != null)
- {
- long position;
- if (mediaSeekingSecondary.GetCurrentPosition(out position) >= 0)
- {
- status.PositionSeconds = position / 10000000.0;
- }
- else
- {
- status.LastError = "無法取得影片播放位置";
- status.PositionSeconds = -1;
- }
- }
- else
- {
- status.LastError = "mediaSeekingSecondary 物件為 null";
- status.PositionSeconds = -1;
- }
-
- if (mediaControlSecondary != null)
- {
- FilterState stateCode;
- int hr = mediaControlSecondary.GetState(100, out stateCode);
- if (hr >= 0)
- {
- var state = (FilterState)stateCode;
- status.PlayState = state.ToString();
- status.LastError = state.ToString();
- status.IsGraphOk = true;
- }
- else
- {
- status.PlayState = "無法取得播放狀態";
- status.LastError = "無法取得播放狀態";
- status.IsGraphOk = false;
- }
- }
- else
- {
- status.PlayState = "mediaControlSecondary 物件為 null";
- status.LastError = "mediaControlSecondary 物件為 null";
- status.IsGraphOk = false;
- }
- }
- catch (Exception ex)
- {
- status.LastError = "取得影片狀態時發生例外:" + ex.Message;
- status.PositionSeconds = -1;
- status.PlayState = "Error";
- status.IsGraphOk = false;
- }
-
- return status;
- }
-
}
}
diff --git a/WindowStyles.cs b/WindowStyles.cs
deleted file mode 100644
index d8daf11..0000000
--- a/WindowStyles.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace DualScreenDemo
-{
- public static class WindowStyles
- {
- public const int WS_CHILD = 0x40000000;
- public const int WS_CLIPSIBLINGS = 0x04000000;
- }
-}
\ No newline at end of file
diff --git a/superstar.csproj b/superstar.csproj
index 56e49f6..f97cac6 100644
--- a/superstar.csproj
+++ b/superstar.csproj
@@ -4,7 +4,7 @@
Exe
net8.0-windows
Images/superstar.ico
- superstar
+ superstar_1.2
superstar
enable
enable
diff --git a/themes/superstar/_www/search-singer.html b/themes/superstar/_www/search-singer.html
index c447a93..9b1c5d4 100644
--- a/themes/superstar/_www/search-singer.html
+++ b/themes/superstar/_www/search-singer.html
@@ -389,8 +389,6 @@
Song: row.cells[0].textContent,
ArtistA: row.cells[1].textContent,
SongNumber: row.cells[2].textContent,
- SongFilePathHost1: row.cells[3].textContent,
- SongFilePathHost2: row.cells[4].textContent
};
window.selectedSong = song;
@@ -543,8 +541,6 @@
${song.Song} |
${song.ArtistA} |
${song.SongNumber} |
- ${song.SongFilePathHost1} |
- ${song.SongFilePathHost2} |
`;
row.addEventListener('click', function(e) {
e.preventDefault();