Skip to content

Commit 2ab8803

Browse files
authored
Merge pull request #81 from AlwinEsch/Nexus-change
[Nexus] API related update
2 parents 5fdc527 + 80f08b2 commit 2ab8803

File tree

5 files changed

+53
-52
lines changed

5 files changed

+53
-52
lines changed

src/Main.cpp

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,25 @@ CVisualizationProjectM::CVisualizationProjectM()
5656
m_configPM.windowHeight = Height();
5757
m_configPM.aspectCorrection = true;
5858
m_configPM.easterEgg = 0.0;
59-
m_configPM.titleFontURL = kodi::GetAddonPath("resources/projectM/fonts/Vera.ttf");
60-
m_configPM.menuFontURL = kodi::GetAddonPath("resources/projectM/fonts/VeraMono.ttf");
61-
m_configPM.datadir = kodi::GetAddonPath("resources/projectM");
62-
m_lastPresetIdx = kodi::GetSettingInt("last_preset_idx");
59+
m_configPM.titleFontURL = kodi::addon::GetAddonPath("resources/projectM/fonts/Vera.ttf");
60+
m_configPM.menuFontURL = kodi::addon::GetAddonPath("resources/projectM/fonts/VeraMono.ttf");
61+
m_configPM.datadir = kodi::addon::GetAddonPath("resources/projectM");
62+
m_lastPresetIdx = kodi::addon::GetSettingInt("last_preset_idx");
6363
#ifdef DEBUG
6464
m_lastLoggedPresetIdx = m_lastPresetIdx;
6565
#endif
6666

67-
m_configPM.textureSize = kodi::GetSettingInt("quality");
68-
m_configPM.shuffleEnabled = kodi::GetSettingBoolean("shuffle");
67+
m_configPM.textureSize = kodi::addon::GetSettingInt("quality");
68+
m_configPM.shuffleEnabled = kodi::addon::GetSettingBoolean("shuffle");
6969

70-
m_lastLockStatus = kodi::GetSettingBoolean("last_locked_status");
71-
m_lastPresetDir = kodi::GetSettingString("last_preset_folder");
72-
m_configPM.smoothPresetDuration = kodi::GetSettingInt("smooth_duration");
73-
m_configPM.presetDuration = kodi::GetSettingInt("preset_duration");
70+
m_lastLockStatus = kodi::addon::GetSettingBoolean("last_locked_status");
71+
m_lastPresetDir = kodi::addon::GetSettingString("last_preset_folder");
72+
m_configPM.smoothPresetDuration = kodi::addon::GetSettingInt("smooth_duration");
73+
m_configPM.presetDuration = kodi::addon::GetSettingInt("preset_duration");
7474

75-
ChoosePresetPack(kodi::GetSettingInt("preset_pack"));
76-
ChooseUserPresetFolder(kodi::GetSettingString("user_preset_folder"));
77-
m_configPM.beatSensitivity = kodi::GetSettingInt("beat_sens") * 2;
75+
ChoosePresetPack(kodi::addon::GetSettingInt("preset_pack"));
76+
ChooseUserPresetFolder(kodi::addon::GetSettingString("user_preset_folder"));
77+
m_configPM.beatSensitivity = kodi::addon::GetSettingInt("beat_sens") * 2;
7878

7979
#ifndef _WIN32
8080
InitProjectM();
@@ -86,9 +86,9 @@ CVisualizationProjectM::~CVisualizationProjectM()
8686
unsigned int lastindex = 0;
8787
m_projectM->selectedPresetIndex(lastindex);
8888
m_shutdown = true;
89-
kodi::SetSettingInt("last_preset_idx", lastindex);
90-
kodi::SetSettingString("last_preset_folder", m_projectM->settings().presetURL);
91-
kodi::SetSettingBoolean("last_locked_status", m_projectM->isPresetLocked());
89+
kodi::addon::SetSettingInt("last_preset_idx", lastindex);
90+
kodi::addon::SetSettingString("last_preset_folder", m_projectM->settings().presetURL);
91+
kodi::addon::SetSettingBoolean("last_locked_status", m_projectM->isPresetLocked());
9292

9393
if (m_projectM)
9494
{
@@ -232,7 +232,7 @@ bool CVisualizationProjectM::IsLocked()
232232
//-- UpdateSetting ------------------------------------------------------------
233233
// Handle setting change request from Kodi
234234
//-----------------------------------------------------------------------------
235-
ADDON_STATUS CVisualizationProjectM::SetSetting(const std::string& settingName, const kodi::CSettingValue& settingValue)
235+
ADDON_STATUS CVisualizationProjectM::SetSetting(const std::string& settingName, const kodi::addon::CSettingValue& settingValue)
236236
{
237237
if (settingName.empty() || settingValue.empty())
238238
return ADDON_STATUS_UNKNOWN;
@@ -307,56 +307,56 @@ void CVisualizationProjectM::ChoosePresetPack(int pvalue)
307307

308308
case 0:
309309
m_UserPackFolder = false;
310-
m_configPM.presetURL = kodi::GetAddonPath("resources/projectM/presets/presets_bltc201");
310+
m_configPM.presetURL = kodi::addon::GetAddonPath("resources/projectM/presets/presets_bltc201");
311311
break;
312312

313313
case 1:
314314
m_UserPackFolder = false;
315-
m_configPM.presetURL = kodi::GetAddonPath("resources/projectM/presets/presets_milkdrop");
315+
m_configPM.presetURL = kodi::addon::GetAddonPath("resources/projectM/presets/presets_milkdrop");
316316
break;
317317

318318
case 2:
319319
m_UserPackFolder = false;
320-
m_configPM.presetURL = kodi::GetAddonPath("resources/projectM/presets/presets_milkdrop_104");
320+
m_configPM.presetURL = kodi::addon::GetAddonPath("resources/projectM/presets/presets_milkdrop_104");
321321
break;
322322

323323
case 3:
324324
m_UserPackFolder = false;
325-
m_configPM.presetURL = kodi::GetAddonPath("resources/projectM/presets/presets_milkdrop_200");
325+
m_configPM.presetURL = kodi::addon::GetAddonPath("resources/projectM/presets/presets_milkdrop_200");
326326
break;
327327

328328
case 4:
329329
m_UserPackFolder = false;
330-
m_configPM.presetURL = kodi::GetAddonPath("resources/projectM/presets/presets_mischa_collection");
330+
m_configPM.presetURL = kodi::addon::GetAddonPath("resources/projectM/presets/presets_mischa_collection");
331331
break;
332332

333333
case 5:
334334
m_UserPackFolder = false;
335-
m_configPM.presetURL = kodi::GetAddonPath("resources/projectM/presets/presets_projectM");
335+
m_configPM.presetURL = kodi::addon::GetAddonPath("resources/projectM/presets/presets_projectM");
336336

337337
case 6:
338338
m_UserPackFolder = false;
339-
m_configPM.presetURL = kodi::GetAddonPath("resources/projectM/presets/presets_stock");
339+
m_configPM.presetURL = kodi::addon::GetAddonPath("resources/projectM/presets/presets_stock");
340340
break;
341341

342342
case 7:
343343
m_UserPackFolder = false;
344-
m_configPM.presetURL = kodi::GetAddonPath("resources/projectM/presets/presets_tryptonaut");
344+
m_configPM.presetURL = kodi::addon::GetAddonPath("resources/projectM/presets/presets_tryptonaut");
345345
break;
346346

347347
case 8:
348348
m_UserPackFolder = false;
349-
m_configPM.presetURL = kodi::GetAddonPath("resources/projectM/presets/presets_yin");
349+
m_configPM.presetURL = kodi::addon::GetAddonPath("resources/projectM/presets/presets_yin");
350350
break;
351351

352352
case 9:
353353
m_UserPackFolder = false;
354-
m_configPM.presetURL = kodi::GetAddonPath("resources/projectM/presets/tests");
354+
m_configPM.presetURL = kodi::addon::GetAddonPath("resources/projectM/presets/tests");
355355
break;
356356

357357
case 10:
358358
m_UserPackFolder = false;
359-
m_configPM.presetURL = kodi::GetAddonPath("resources/projectM/presets/presets_eyetune");
359+
m_configPM.presetURL = kodi::addon::GetAddonPath("resources/projectM/presets/presets_eyetune");
360360
break;
361361

362362
default:

src/Main.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ d4rk@xbmc.org
4747

4848
#include <libprojectM/projectM.hpp>
4949

50-
class ATTRIBUTE_HIDDEN CVisualizationProjectM
50+
class ATTR_DLL_LOCAL CVisualizationProjectM
5151
: public kodi::addon::CAddonBase,
5252
public kodi::addon::CInstanceVisualization
5353
{
@@ -66,7 +66,7 @@ class ATTRIBUTE_HIDDEN CVisualizationProjectM
6666
int GetActivePreset() override;
6767
bool RandomPreset() override;
6868
bool IsLocked() override;
69-
ADDON_STATUS SetSetting(const std::string& settingName, const kodi::CSettingValue& settingValue) override;
69+
ADDON_STATUS SetSetting(const std::string& settingName, const kodi::addon::CSettingValue& settingValue) override;
7070

7171
private:
7272
bool InitProjectM();

visualization.projectm/addon.xml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<addon
33
id="visualization.projectm"
4-
version="20.0.1"
4+
version="20.1.0"
55
name="projectM"
66
provider-name="Team Kodi">
77
<requires>@ADDON_DEPENDS@</requires>

visualization.projectm/resources/language/resource.language.pt_br/strings.po

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55
msgid ""
66
msgstr ""
77
"Project-Id-Version: XBMC Main\n"
8-
"Report-Msgid-Bugs-To: http://trac.xbmc.org/\n"
8+
"Report-Msgid-Bugs-To: translations@kodi.tv\n"
99
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
10-
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11-
"Last-Translator: XBMC Translation Team\n"
12-
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/xbmc-main/language/pt_BR/)\n"
13-
"Language: pt_BR\n"
10+
"PO-Revision-Date: 2021-12-07 08:13+0000\n"
11+
"Last-Translator: Fabio <fabioihle+kodi@alunos.utfpr.edu.br>\n"
12+
"Language-Team: Portuguese (Brazil) <https://kodi.weblate.cloud/projects/kodi-add-ons-look-and-feel/visualization-projectm/pt_br/>\n"
13+
"Language: pt_br\n"
1414
"MIME-Version: 1.0\n"
1515
"Content-Type: text/plain; charset=UTF-8\n"
1616
"Content-Transfer-Encoding: 8bit\n"
17-
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
17+
"Plural-Forms: nplurals=2; plural=n > 1;\n"
18+
"X-Generator: Weblate 4.9.1\n"
1819

1920
msgctxt "Addon Summary"
2021
msgid "projectM takes you flying through the soundwaves you're hearing"
@@ -30,15 +31,15 @@ msgstr "Qualidade do Render"
3031

3132
msgctxt "#30001"
3233
msgid "Low"
33-
msgstr "Mínima"
34+
msgstr "Baixo"
3435

3536
msgctxt "#30002"
3637
msgid "Medium"
3738
msgstr "Médio"
3839

3940
msgctxt "#30003"
4041
msgid "High"
41-
msgstr "Máxima"
42+
msgstr "Alto"
4243

4344
msgctxt "#30004"
4445
msgid "Maximum"
@@ -62,7 +63,7 @@ msgstr "Sensibilidade da batida"
6263

6364
msgctxt "#30009"
6465
msgid "Preset Pack"
65-
msgstr "Pacote de presets"
66+
msgstr "Pacote de Predefinições"
6667

6768
msgctxt "#30010"
6869
msgid "Default Pack"

visualization.projectm/resources/language/resource.language.zh_cn/strings.po

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ msgstr ""
77
"Project-Id-Version: XBMC Main\n"
88
"Report-Msgid-Bugs-To: translations@kodi.tv\n"
99
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
10-
"PO-Revision-Date: 2021-11-09 11:48+0000\n"
11-
"Last-Translator: Christian Gade <gade@kodi.tv>\n"
10+
"PO-Revision-Date: 2021-12-07 08:13+0000\n"
11+
"Last-Translator: taxigps <taxigps@sina.com>\n"
1212
"Language-Team: Chinese (China) <https://kodi.weblate.cloud/projects/kodi-add-ons-look-and-feel/visualization-projectm/zh_cn/>\n"
1313
"Language: zh_cn\n"
1414
"MIME-Version: 1.0\n"
1515
"Content-Type: text/plain; charset=UTF-8\n"
1616
"Content-Transfer-Encoding: 8bit\n"
1717
"Plural-Forms: nplurals=1; plural=0;\n"
18-
"X-Generator: Weblate 4.8.1\n"
18+
"X-Generator: Weblate 4.9.1\n"
1919

2020
msgctxt "Addon Summary"
2121
msgid "projectM takes you flying through the soundwaves you're hearing"
@@ -84,47 +84,47 @@ msgstr "通用"
8484
# empty strings from id 30013 to 30019
8585
msgctxt "#30020"
8686
msgid "bltc201"
87-
msgstr "BLTC201"
87+
msgstr "bltc201"
8888

8989
msgctxt "#30021"
9090
msgid "Milkdrop"
91-
msgstr "牛奶滴"
91+
msgstr "Milkdrop"
9292

9393
msgctxt "#30022"
9494
msgid "Milkdrop 1.04"
95-
msgstr ""
95+
msgstr "Milkdrop 1.04"
9696

9797
msgctxt "#30023"
9898
msgid "Milkdrop 2.00"
99-
msgstr ""
99+
msgstr "Milkdrop 2.00"
100100

101101
msgctxt "#30024"
102102
msgid "Mischa's Collection"
103-
msgstr "米卡的集合"
103+
msgstr "Mischa 的集合"
104104

105105
msgctxt "#30025"
106106
msgid "projectM"
107-
msgstr "M计划"
107+
msgstr "projectM"
108108

109109
msgctxt "#30026"
110110
msgid "Stock"
111111
msgstr "库存"
112112

113113
msgctxt "#30027"
114114
msgid "Tryptonaut"
115-
msgstr ""
115+
msgstr "Tryptonaut"
116116

117117
msgctxt "#30028"
118118
msgid "Yin"
119-
msgstr ""
119+
msgstr "Yin"
120120

121121
msgctxt "#30029"
122122
msgid "Tests"
123123
msgstr "测试"
124124

125125
msgctxt "#30030"
126126
msgid "Eyetune"
127-
msgstr ""
127+
msgstr "Eyetune"
128128

129129
msgctxt "#30050"
130130
msgid "{0:d} sec"

0 commit comments

Comments
 (0)