mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 02:41:12 +02:00
ytparser/moviebrowser: add option for selecting prefered quality
Origin commit data
------------------
Branch: ni/coolstream
Commit: e01e96c1ac
Author: martii <m4rtii@gmx.de>
Date: 2013-06-09 (Sun, 09 Jun 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -772,6 +772,7 @@ bool CMovieBrowser::loadSettings(MB_SETTINGS* settings)
|
||||
}
|
||||
settings->ytmode = configfile.getInt32("mb_ytmode", cYTFeedParser::MOST_POPULAR);
|
||||
settings->ytresults = configfile.getInt32("mb_ytresults", 10);
|
||||
settings->ytquality = configfile.getInt32("mb_ytquality", 22); // itag value (MP4, 720p)
|
||||
settings->ytregion = configfile.getString("mb_ytregion", "default");
|
||||
settings->ytsearch = configfile.getString("mb_ytsearch", "");
|
||||
settings->ytvid = configfile.getString("mb_ytvid", "");
|
||||
@@ -826,6 +827,7 @@ bool CMovieBrowser::saveSettings(MB_SETTINGS* settings)
|
||||
}
|
||||
configfile.setInt32("mb_ytmode", settings->ytmode);
|
||||
configfile.setInt32("mb_ytresults", settings->ytresults);
|
||||
configfile.setInt32("mb_ytquality", settings->ytquality);
|
||||
configfile.setString("mb_ytregion", settings->ytregion);
|
||||
configfile.setString("mb_ytsearch", settings->ytsearch);
|
||||
configfile.setString("mb_ytvid", settings->ytvid);
|
||||
@@ -3587,7 +3589,7 @@ void CMovieBrowser::loadYTitles(int mode, std::string search, std::string id)
|
||||
movieInfo.ytid = ylist[i].id;
|
||||
|
||||
movieInfo.file.Name = ylist[i].title;
|
||||
movieInfo.file.Url = ylist[i].GetUrl();
|
||||
movieInfo.file.Url = ylist[i].GetUrl(m_settings.ytquality, false);
|
||||
m_vMovieInfo.push_back(movieInfo);
|
||||
}
|
||||
m_currentBrowserSelection = 0;
|
||||
@@ -3681,6 +3683,19 @@ bool CMovieBrowser::showYTMenu()
|
||||
region->addOption("US");
|
||||
mainMenu.addItem(region);
|
||||
|
||||
#define YT_QUALITY_OPTION_COUNT 3
|
||||
CMenuOptionChooser::keyval_ext YT_QUALITY_OPTIONS[YT_QUALITY_OPTION_COUNT] =
|
||||
{
|
||||
{ 18, NONEXISTANT_LOCALE, "MP4 270p/360p"},
|
||||
{ 22, NONEXISTANT_LOCALE, "MP4 720p" },
|
||||
#if 0
|
||||
{ 34, NONEXISTANT_LOCALE, "FLV 360p" },
|
||||
{ 35, NONEXISTANT_LOCALE, "FLV 480p" },
|
||||
#endif
|
||||
{ 37, NONEXISTANT_LOCALE, "MP4 1080p" }
|
||||
};
|
||||
mainMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_YT_PREF_QUALITY, &m_settings.ytquality, YT_QUALITY_OPTIONS, YT_QUALITY_OPTION_COUNT, true, NULL, CRCInput::RC_nokey, "", true));
|
||||
|
||||
mainMenu.exec(NULL, "");
|
||||
delete selector;
|
||||
|
||||
|
Reference in New Issue
Block a user