Commits

Anonymous committed 1fc4875

feature: ads by language

Comments (0)

Files changed (1)

src/apps/mplayerc/PlayerToolBar.cpp

 #include "PlayerToolBar.h"
 #include "MainFrm.h"
 #include <fstream>
+#include <Strings.h>
 #include "../../svplib/svplib.h"
 #include "GUIConfigManage.h"
 #include "ButtonManage.h"
 void CPlayerToolBar::OnTimer(UINT nIDEvent){
   switch(nIDEvent){
     case TIMER_ADFETCHING:
-      KillTimer(TIMER_ADFETCHING);
-      m_adctrl.GetAds(L"https://www.shooter.cn/api/v2/prom.php");
+      {
+        KillTimer(TIMER_ADFETCHING);
+        std::wstring ad_uri = Strings::Format(L"https://www.shooter.cn/api/v2/prom.php?lang=%d", AfxGetAppSettings().iLanguage);
+        m_adctrl.GetAds(ad_uri.c_str());
+      }
       break;
     case TIMER_ADPLAY:
       {