Skip to content

Commit

Permalink
Merge pull request #69 from gentslava/main
Browse files Browse the repository at this point in the history
[pull] master from main
  • Loading branch information
pull[bot] authored Jan 9, 2025
2 parents c303476 + 630d285 commit 721d6b8
Show file tree
Hide file tree
Showing 10 changed files with 114 additions and 5 deletions.
57 changes: 53 additions & 4 deletions app.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -13185,6 +13185,11 @@
subtitle: Lang.translate('player_normalization_step_' + Storage.get('player_normalization_smooth', 'medium')),
method: 'normalization_smooth'
});
items.push({
title: Lang.translate('player_normalization_type_title'),
subtitle: Lang.translate('player_normalization_type_' + Storage.get('player_normalization_type', 'all')),
method: 'normalization_type'
});
}

if (last_settings_action) {
Expand All @@ -13203,6 +13208,7 @@
if (a.method == 'speed') selectSpeed();
if (a.method == 'normalization_power') selectNormalizationStep('power', 'hight');
if (a.method == 'normalization_smooth') selectNormalizationStep('smooth', 'medium');
if (a.method == 'normalization_type') selectNormalizationType();

if (a.method == 'share') {
Controller.toggle(Platform.screen('mobile') ? 'player' : 'player_panel');
Expand All @@ -13215,6 +13221,33 @@
});
}

function selectNormalizationType() {
var select = Storage.get('player_normalization_type', 'all');
var items = [{
title: Lang.translate('player_normalization_type_all'),
value: 'all',
selected: select == 'all'
}, {
title: Lang.translate('player_normalization_type_up'),
value: 'up',
selected: select == 'up'
}, {
title: Lang.translate('player_normalization_type_down'),
value: 'down',
selected: select == 'down'
}];
Select.show({
title: Lang.translate('player_normalization_type_title'),
items: items,
nohide: true,
onBack: settings,
onSelect: function onSelect(a) {
Storage.set('player_normalization_type', a.value);
settings();
}
});
}

function selectNormalizationStep(type, def) {
var select = Storage.get('player_normalization_' + type, def);
var items = [{
Expand Down Expand Up @@ -15751,10 +15784,12 @@
var db_high = toDb(rms_high / 255);
var sm_st = Storage.get('player_normalization_smooth', 'medium');
var pw_st = Storage.get('player_normalization_power', 'hight');
var tp_st = Storage.get('player_normalization_type', 'all');
var pw_am = pw_st == 'hight' ? 1 : pw_st == 'medium' ? 0.7 : 0.35;
var gain = Math.max(0.0, Math.min(2, (db_mid + db_high) / 2 / -24));
analyser.gain_smooth = sm_st == 'none' ? gain : smooth(analyser.gain_smooth, gain, sm_st == 'hight' ? 45 : sm_st == 'medium' ? 20 : 5);
volume.gain.value = pw_st == 'none' ? 1 : 1 + (analyser.gain_smooth - 1) * pw_am;
var vol = pw_st == 'none' ? 1 : 1 + (analyser.gain_smooth - 1) * pw_am;
volume.gain.value = tp_st == 'all' ? vol : tp_st == 'up' ? Math.max(1, vol) : Math.min(1, vol);

if (display) {
draw_context.clearRect(0, 0, draw_canvas.width, draw_canvas.height);
Expand Down Expand Up @@ -33726,7 +33761,11 @@
}

readed$1[name] = value;
} catch (e) {}
} catch (e) {
if (e.name == 'QuotaExceededError') {
Noty.show(Lang.translate('storage_quota_exceeded'));
}
}

if (!nolisten) listener.send('change', {
name: name,
Expand Down Expand Up @@ -34775,6 +34814,10 @@
player_normalization_step_medium: 'Среднее',
player_normalization_step_hight: 'Высокое',
player_normalization: 'Нормализация',
player_normalization_type_title: 'Тип нормализации',
player_normalization_type_all: 'Все',
player_normalization_type_up: 'Только повышение',
player_normalization_type_down: 'Только понижение',
player_youtube_no_played: 'К сожалению, это видео не доступно в вашем регионе, возможно, оно было заблокировано или удалено.',
player_youtube_start_play: 'Для начала проигрывания видео, нажмите кнопку "Плей"',
broadcast_open: 'Открыть карточку на другом устройстве',
Expand Down Expand Up @@ -34991,7 +35034,8 @@
discuss_voited: 'Спасибо за вашу оценку! Ваш голос помогает улучшать контент.',
confirm_open_player: 'Другое устройство запрашивает доступ к плееру. Хотите воспроизвести видео?',
pincode_use_remote: 'Используйте пульт для ввода кода, нажимая стрелки для выбора нужной цифры.',
pincode_use_toggle: 'Нажмите и удерживайте кнопку OK, чтобы сменить раскладку.'
pincode_use_toggle: 'Нажмите и удерживайте кнопку OK, чтобы сменить раскладку.',
storage_quota_exceeded: 'Превышен лимит хранилища. Удалите кеш и повторите попытку.'
};

var en = {
Expand Down Expand Up @@ -36054,7 +36098,12 @@
pincode_use_toggle: 'Press and hold the OK button to change the layout.',
settings_parental_control_where: 'Where to request a PIN code',
title_fire: 'Fire!',
title_top_100: 'Top 100'
title_top_100: 'Top 100',
player_normalization_type_title: 'Normalization Type',
player_normalization_type_all: 'All',
player_normalization_type_up: 'Only Increase',
player_normalization_type_down: 'Only Decrease',
storage_quota_exceeded: 'Storage quota exceeded. Clear cache and try again.'
};

var langs = {};
Expand Down
6 changes: 6 additions & 0 deletions lang/be.js
Original file line number Diff line number Diff line change
Expand Up @@ -1159,4 +1159,10 @@ export default {
settings_parental_control_where: 'Дзе запытваць PIN-код',
title_fire: 'Агонь!',
title_top_100: 'Топ 100',

storage_quota_exceeded: 'Перавышаны ліміт сховішча. Выдаліце кэш і паспрабуйце зноў.',
player_normalization_type_title: 'Тып нармалізацыі',
player_normalization_type_all: 'Усе',
player_normalization_type_up: 'Толькі павышэнне',
player_normalization_type_down: 'Толькі паніжэнне',
}
7 changes: 7 additions & 0 deletions lang/bg.js
Original file line number Diff line number Diff line change
Expand Up @@ -1143,4 +1143,11 @@ export default {
settings_parental_control_where: 'Къде да поискате ПИН код',
title_fire: 'Огън!',
title_top_100: 'Топ 100',

player_normalization_type_title: 'Тип нормализация',
player_normalization_type_all: 'Всички',
player_normalization_type_up: 'Само увеличаване',
player_normalization_type_down: 'Само намаляване',
storage_quota_exceeded: 'Надхвърлен е лимитът за съхранение. Изтрийте кеша и опитайте отново.',

}
7 changes: 7 additions & 0 deletions lang/cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1224,4 +1224,11 @@ export default {
pincode_use_toggle: "Stiskněte a podržte tlačítko OK pro změnu rozložení.",
title_fire: 'Oheň!',
title_top_100: 'Top 100',

player_normalization_type_title: 'Typ normalizace',
player_normalization_type_all: 'Vše',
player_normalization_type_up: 'Pouze zvýšení',
player_normalization_type_down: 'Pouze snížení',
storage_quota_exceeded: 'Překročena kvóta úložiště. Vymažte mezipaměť a zkuste to znovu.',

};
7 changes: 7 additions & 0 deletions lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -1144,4 +1144,11 @@ export default {
settings_parental_control_where: 'Where to request a PIN code',
title_fire: 'Fire!',
title_top_100: 'Top 100',

player_normalization_type_title: 'Normalization Type',
player_normalization_type_all: 'All',
player_normalization_type_up: 'Only Increase',
player_normalization_type_down: 'Only Decrease',
storage_quota_exceeded: 'Storage quota exceeded. Clear cache and try again.',

}
6 changes: 6 additions & 0 deletions lang/he.js
Original file line number Diff line number Diff line change
Expand Up @@ -1042,4 +1042,10 @@ export default {
settings_parental_control_where: 'היכן לבקש קוד PIN',
title_fire: 'אֵשׁ!',
title_top_100: '100 המובילים',

player_normalization_type_title: 'סוג נירמול',
player_normalization_type_all: 'הכל',
player_normalization_type_up: 'רק הגבהה',
player_normalization_type_down: 'רק הנמכה',
storage_quota_exceeded: 'מכסת האחסון חרגה. נקה את המטמון ונסה שוב.',
}
7 changes: 7 additions & 0 deletions lang/pt.js
Original file line number Diff line number Diff line change
Expand Up @@ -1129,4 +1129,11 @@ export default {
settings_parental_control_where: 'Onde solicitar um código PIN',
title_fire: 'Fogo!',
title_top_100: '100 melhores',

player_normalization_type_title: 'Tipo de Normalização',
player_normalization_type_all: 'Todos',
player_normalization_type_up: 'Apenas Aumento',
player_normalization_type_down: 'Apenas Diminuição',
storage_quota_exceeded: 'Limite de armazenamento excedido. Limpe o cache e tente novamente.',

}
8 changes: 7 additions & 1 deletion lang/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,10 @@ export default {
player_normalization_step_medium: 'Среднее',
player_normalization_step_hight: 'Высокое',
player_normalization: 'Нормализация',
player_normalization_type_title: 'Тип нормализации',
player_normalization_type_all: 'Все',
player_normalization_type_up: 'Только повышение',
player_normalization_type_down: 'Только понижение',
player_youtube_no_played: 'К сожалению, это видео не доступно в вашем регионе, возможно, оно было заблокировано или удалено.',
player_youtube_start_play: 'Для начала проигрывания видео, нажмите кнопку "Плей"',

Expand Down Expand Up @@ -1156,5 +1160,7 @@ export default {
confirm_open_player: 'Другое устройство запрашивает доступ к плееру. Хотите воспроизвести видео?',

pincode_use_remote: 'Используйте пульт для ввода кода, нажимая стрелки для выбора нужной цифры.',
pincode_use_toggle: 'Нажмите и удерживайте кнопку OK, чтобы сменить раскладку.'
pincode_use_toggle: 'Нажмите и удерживайте кнопку OK, чтобы сменить раскладку.',

storage_quota_exceeded: 'Превышен лимит хранилища. Удалите кеш и повторите попытку.',
}
7 changes: 7 additions & 0 deletions lang/uk.js
Original file line number Diff line number Diff line change
Expand Up @@ -1119,4 +1119,11 @@ export default {
settings_parental_control_where: 'Де запитати PIN-код',
title_fire: 'Вогонь!',
title_top_100: 'Топ 100',

player_normalization_type_title: 'Тип нормалізації',
player_normalization_type_all: 'Усі',
player_normalization_type_up: 'Тільки підвищення',
player_normalization_type_down: 'Тільки зниження',
storage_quota_exceeded: 'Перевищено ліміт сховища. Очистіть кеш і спробуйте ще раз.',

}
7 changes: 7 additions & 0 deletions lang/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -1094,4 +1094,11 @@ export default {
settings_parental_control_where: '在哪里请求 PIN 码',
title_fire: '火!',
title_top_100: '前100名',

player_normalization_type_title: '标准化类型',
player_normalization_type_all: '全部',
player_normalization_type_up: '仅提升',
player_normalization_type_down: '仅降低',
storage_quota_exceeded: '存储配额已超出。清除缓存后重试。',

}

0 comments on commit 721d6b8

Please sign in to comment.