diff --git a/DBObj/ArtistManager.cs b/DBObj/ArtistManager.cs index 8b126dd..cf64819 100644 --- a/DBObj/ArtistManager.cs +++ b/DBObj/ArtistManager.cs @@ -25,7 +25,7 @@ namespace DBObj public ArtistManager() { AllArtists = new List(); - LoadArtists(); + //LoadArtists(); } diff --git a/DBObj/SongListManager.cs b/DBObj/SongListManager.cs index 704c787..430ce2d 100644 --- a/DBObj/SongListManager.cs +++ b/DBObj/SongListManager.cs @@ -29,7 +29,7 @@ namespace DBObj // 继续使用可用的数据库(可能是更新后的或原本的本地数据库) InitializeDatabase(); - LoadSongs(); + //LoadSongs(); InitializeNewSongLists(); InitializeHotSongLists(); } diff --git a/PrimaryFormParts/HotSong/PrimaryForm.HotSong.cs b/PrimaryFormParts/HotSong/PrimaryForm.HotSong.cs index 4556349..d1ac97b 100644 --- a/PrimaryFormParts/HotSong/PrimaryForm.HotSong.cs +++ b/PrimaryFormParts/HotSong/PrimaryForm.HotSong.cs @@ -111,14 +111,6 @@ namespace DualScreenDemo activeButton.BackgroundImage = activeBackground; } - private List GetSongsByCategory(string category, int limit) - { - return allSongs.Where(song => song.Category == category) - .OrderByDescending(song => song.Plays) - .Take(limit) - .ToList(); - } - private void UpdateSongList(List songs) { currentPage = 0; diff --git a/PrimaryFormParts/PrimaryForm.VodScreen.cs b/PrimaryFormParts/PrimaryForm.VodScreen.cs index 3611ea9..e2f169b 100644 --- a/PrimaryFormParts/PrimaryForm.VodScreen.cs +++ b/PrimaryFormParts/PrimaryForm.VodScreen.cs @@ -131,10 +131,12 @@ namespace DualScreenDemo private void AlbumButton_Click(object sender, EventArgs e) { - - var selectedSongs = allSongs.Where(song => song.ArtistA == currentSelectedSong.ArtistA) + string name = currentSelectedSong.ArtistA; + string query = $"SELECT * FROM SongLibrary WHERE `歌星 A` = '{name}' ORDER BY `新增日期` DESC"; + var selectedSongs = SearchSongs_Mysql(query); + /*var selectedSongs = allSongs.Where(song => song.ArtistA == currentSelectedSong.ArtistA) .OrderByDescending(song => song.AddedTime) - .ToList(); + .ToList();*/ UpdateSongList(selectedSongs); SetVodScreenPictureBoxAndButtonsVisibility(false); diff --git a/PrimaryFormParts/PrimaryForm.cs b/PrimaryFormParts/PrimaryForm.cs index 1c4a5fd..935d25b 100644 --- a/PrimaryFormParts/PrimaryForm.cs +++ b/PrimaryFormParts/PrimaryForm.cs @@ -173,22 +173,11 @@ namespace DualScreenDemo private static Bitmap normalStateImageForLightControl; private static Bitmap resizedNormalStateImageForLightControl; - public VideoPlayerForm videoPlayerForm; - - - public List allSongs; - public List allArtists; public List currentSongList; public List currentArtistList; public List publicSongList; - //private List guoYuSongs; - //private List guoYuSongs2; - //private List taiYuSongs2; - //private List yueYuSongs2; - //private List yingWenSongs2; - //private List riYuSongs2; - //private List hanYuSongs2; + public static List userRequestedSongs; public static List playedSongsHistory; public static List playStates; diff --git a/Program.cs b/Program.cs index 8fb18c4..cf1a596 100644 --- a/Program.cs +++ b/Program.cs @@ -51,8 +51,8 @@ static void Main() // 創建主窗體 primaryForm = new PrimaryForm(); - primaryForm.allSongs = songListManager.AllSongs; - primaryForm.allArtists = artistManager.AllArtists; + //primaryForm.allSongs = songListManager.AllSongs; + //primaryForm.allArtists = artistManager.AllArtists; primaryForm.StartPosition = FormStartPosition.Manual; primaryForm.Location = new Point(0, 0); primaryForm.Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);