更新歌庫查詢方式

This commit is contained in:
jasonchenwork 2025-05-20 16:16:27 +08:00
parent 34b73c3513
commit 656f773ec7
6 changed files with 9 additions and 9 deletions

View File

@ -1074,7 +1074,7 @@ private static void SongDisplayTimer_Elapsed(object sender, EventArgs e)
currentLanguage = "粵語";
break;
case 4:
currentLanguage = "英";
currentLanguage = "英";
break;
case 5:
currentLanguage = "日語";

View File

@ -11,10 +11,10 @@ namespace DualScreenDemo
groupRiYuButton.BackgroundImage = groupRiYuNormalBackground;
groupHanYuButton.BackgroundImage = groupHanYuNormalBackground;
/*yingWenSongs = allSongs.Where(song => song.Category == "英" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
/*yingWenSongs = allSongs.Where(song => song.Category == "英" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
.OrderByDescending(song => song.Plays)
.ToList();*/
string query = "SELECT * FROM song_library_cache WHERE language_name = '英' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_id DESC";
string query = "SELECT * FROM song_library_cache WHERE language_name = '英' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_id DESC";
var yingWenSongs = SearchSongs_Mysql(query);
currentPage = 0;
currentSongList = yingWenSongs;

View File

@ -4,7 +4,7 @@ namespace DualScreenDemo
{
private void YingWenButtonHotSong_Click(object sender, EventArgs e)
{
OnHotSongButtonClick(yingWenButtonHotSong, yingWenHotSongActiveBackground, "英");
OnHotSongButtonClick(yingWenButtonHotSong, yingWenHotSongActiveBackground, "英");
}
}
}

View File

@ -10,7 +10,7 @@ namespace DualScreenDemo
private void YingWenButton_Click(object sender, EventArgs e)
{
OnLanguageButtonClick(yingWenButton, yingWenActiveBackground, "英");
OnLanguageButtonClick(yingWenButton, yingWenActiveBackground, "英");
}
}
}

View File

@ -13,11 +13,11 @@ namespace DualScreenDemo
int songLimit = ReadNewSongLimit();
/*yingWenSongs2 = allSongs.Where(song => song.Category == "英")
/*yingWenSongs2 = allSongs.Where(song => song.Category == "英")
.OrderByDescending(song => song.AddedTime)
.Take(songLimit)
.ToList();*/
string query = setQueryforNewSong("英");
string query = setQueryforNewSong("英");
var yingWenSongs2 = SearchSongs_Mysql(query);
currentPage = 0;

View File

@ -36,8 +36,8 @@ namespace DualScreenDemo{
string artistA = reader["artistA"].ToString();
string artistB = reader["artistB"].ToString();
string fileName = reader["song_filename"].ToString();
string songFilePathHost1 = Path.Combine(@"\\SVR01\DISK05", fileName); // \SVR01\DISK01\
string songFilePathHost2 = Path.Combine(@"\\SVR02\DISK01", fileName); // \SVR02\DISK01\
string songFilePathHost1 = Path.Combine(@"\\SVR01\", fileName);
string songFilePathHost2 = Path.Combine(@"\\SVR02\", fileName);
string artistASimplified = reader["artistA_simplified"].ToString();
string artistBSimplified = reader["artistB_simplified"].ToString();
string songSimplified = reader["song_simplified"].ToString();