1. 沈 晟
  2. splayer

Commits

Tomasen  committed 1fc4875

feature: ads by language

  • Participants
  • Parent commits 85253ee
  • Branches default

Comments (0)

Files changed (1)

File src/apps/mplayerc/PlayerToolBar.cpp

View file
  • Ignore whitespace
 #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:
       {