mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
webtv: add prefered quality option for use in webtv plugins
Origin commit data
------------------
Commit: 92b69d621b
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2021-09-19 (Sun, 19 Sep 2021)
This commit is contained in:
@@ -3040,6 +3040,7 @@ webradio.xml.auto WebRadio-Dateien automatisch laden
|
||||
webtv.head WebTV
|
||||
webtv.xml WebTV-Dateien
|
||||
webtv.xml.auto WebTV-Dateien automatisch laden
|
||||
webtv.xml.pref_quality Bevorzugte Qualität
|
||||
window_size Fenstergröße in %
|
||||
wizard.initial_settings Grundeinstellungen gefunden
|
||||
wizard.install_settings Kanalliste für Astra 19.2°E installieren?
|
||||
|
@@ -3040,6 +3040,7 @@ webradio.xml.auto Auto-load WebRadio files
|
||||
webtv.head WebTV
|
||||
webtv.xml WebTV files
|
||||
webtv.xml.auto Auto-load WebTV files
|
||||
webtv.xml.pref_quality Prefered quality
|
||||
window_size Window size in %
|
||||
wizard.initial_settings Initial settings found
|
||||
wizard.install_settings Do you want to install channels for Astra 19.2°E?
|
||||
|
@@ -58,6 +58,30 @@ static const struct button_label CWebChannelsSetupFooterButtons[] =
|
||||
};
|
||||
#define CWebChannelsSetupFooterButtonCount (sizeof(CWebChannelsSetupFooterButtons)/sizeof(CWebChannelsSetupFooterButtons[0]))
|
||||
|
||||
#if BOXMODEL_CST_HD1 || BOXMODEL_CST_HD2 || HAVE_SPARK_HARDWARE
|
||||
#define WEBTV_XML_QUALITY_OPTION_COUNT 5
|
||||
CMenuOptionChooser::keyval_ext WEBTV_XML_QUALITY_OPTIONS[WEBTV_XML_QUALITY_OPTION_COUNT] =
|
||||
{
|
||||
{ 1920, NONEXISTANT_LOCALE, "1920x1080" },
|
||||
{ 1280, NONEXISTANT_LOCALE, "1280x720" },
|
||||
{ 854, NONEXISTANT_LOCALE, "854x480" },
|
||||
{ 640, NONEXISTANT_LOCALE, "640x360" },
|
||||
{ 480, NONEXISTANT_LOCALE, "480x270" }
|
||||
};
|
||||
#else
|
||||
#define WEBTV_XML_QUALITY_OPTION_COUNT 7
|
||||
CMenuOptionChooser::keyval_ext WEBTV_XML_QUALITY_OPTIONS[WEBTV_XML_QUALITY_OPTION_COUNT] =
|
||||
{
|
||||
{ 3840, NONEXISTANT_LOCALE, "3840x2160" },
|
||||
{ 2560, NONEXISTANT_LOCALE, "2560x1440" },
|
||||
{ 1920, NONEXISTANT_LOCALE, "1920x1080" },
|
||||
{ 1280, NONEXISTANT_LOCALE, "1280x720" },
|
||||
{ 854, NONEXISTANT_LOCALE, "854x480" },
|
||||
{ 640, NONEXISTANT_LOCALE, "640x360" },
|
||||
{ 480, NONEXISTANT_LOCALE, "480x270" }
|
||||
};
|
||||
#endif
|
||||
|
||||
int CWebChannelsSetup::exec(CMenuTarget *parent, const std::string &actionKey)
|
||||
{
|
||||
int res = menu_return::RETURN_REPAINT;
|
||||
@@ -230,6 +254,10 @@ int CWebChannelsSetup::Show()
|
||||
}
|
||||
oc->setHint("", hint_text);
|
||||
m->addItem(oc);
|
||||
if(!webradio)
|
||||
{
|
||||
m->addItem(new CMenuOptionChooser(LOCALE_WEBTV_XML_PREF_QUALITY, &g_settings.webtv_xml_quality, WEBTV_XML_QUALITY_OPTIONS, WEBTV_XML_QUALITY_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++), "", true));
|
||||
}
|
||||
m->addItem(GenericMenuSeparator);
|
||||
|
||||
item_offset = m->getItemsCount();
|
||||
|
@@ -896,6 +896,7 @@ int CNeutrinoApp::loadSetup(const char *fname)
|
||||
g_settings.widget_fade = configfile.getBool("widget_fade", false);
|
||||
|
||||
// webtv
|
||||
g_settings.webtv_xml_quality = configfile.getInt32("webtv_xml_quality", 1280);
|
||||
g_settings.webtv_xml_auto = configfile.getInt32("webtv_xml_auto", 1);
|
||||
g_settings.webtv_xml.clear();
|
||||
int webtv_count = configfile.getInt32("webtv_xml_count", 0);
|
||||
@@ -1990,6 +1991,7 @@ void CNeutrinoApp::saveSetup(const char *fname)
|
||||
|
||||
// webtv
|
||||
CWebChannelsSetup webchannelssetup;
|
||||
configfile.setInt32("webtv_xml_quality", g_settings.webtv_xml_quality);
|
||||
configfile.setInt32("webtv_xml_auto", g_settings.webtv_xml_auto);
|
||||
int webtv_count = 0;
|
||||
for (std::list<std::string>::iterator it = g_settings.webtv_xml.begin(); it != g_settings.webtv_xml.end(); ++it)
|
||||
|
@@ -3067,6 +3067,7 @@ typedef enum
|
||||
LOCALE_WEBTV_HEAD,
|
||||
LOCALE_WEBTV_XML,
|
||||
LOCALE_WEBTV_XML_AUTO,
|
||||
LOCALE_WEBTV_XML_PREF_QUALITY,
|
||||
LOCALE_WINDOW_SIZE,
|
||||
LOCALE_WIZARD_INITIAL_SETTINGS,
|
||||
LOCALE_WIZARD_INSTALL_SETTINGS,
|
||||
|
@@ -3067,6 +3067,7 @@ const char * locale_real_names[] =
|
||||
"webtv.head",
|
||||
"webtv.xml",
|
||||
"webtv.xml.auto",
|
||||
"webtv.xml.pref_quality",
|
||||
"window_size",
|
||||
"wizard.initial_settings",
|
||||
"wizard.install_settings",
|
||||
|
@@ -741,6 +741,7 @@ struct SNeutrinoSettings
|
||||
int widget_fade;
|
||||
|
||||
// webtv
|
||||
int webtv_xml_quality;
|
||||
int webtv_xml_auto;
|
||||
std::list<std::string> webtv_xml;
|
||||
std::string last_webtv_dir;
|
||||
|
Reference in New Issue
Block a user