mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
webtv: use last dir as default
This commit is contained in:
@@ -70,8 +70,10 @@ int CWebTVSetup::exec(CMenuTarget* parent, const std::string & actionKey)
|
||||
CMenuItem* item = m->getItem(selected);
|
||||
CMenuForwarder *f = static_cast<CMenuForwarder*>(item);
|
||||
std::string dirname(f->getName());
|
||||
if (fileBrowser.exec(dirname.substr(0, dirname.rfind('/')).c_str())) {
|
||||
dirname = dirname.substr(0, dirname.rfind('/'));
|
||||
if (fileBrowser.exec(dirname.c_str())) {
|
||||
f->setName(fileBrowser.getSelectedFile()->Name);
|
||||
g_settings.last_webtv_dir = dirname;
|
||||
changed = true;
|
||||
}
|
||||
return res;
|
||||
@@ -81,9 +83,10 @@ int CWebTVSetup::exec(CMenuTarget* parent, const std::string & actionKey)
|
||||
CFileFilter fileFilter;
|
||||
fileFilter.addFilter("xml");
|
||||
fileBrowser.Filter = &fileFilter;
|
||||
if (fileBrowser.exec("/") == true) {
|
||||
if (fileBrowser.exec(g_settings.last_webtv_dir.c_str()) == true) {
|
||||
std::string s = fileBrowser.getSelectedFile()->Name;
|
||||
m->addItem(new CMenuForwarder(s, true, NULL, this, "c"));
|
||||
g_settings.last_webtv_dir = s.substr(0, s.rfind('/')).c_str();
|
||||
changed = true;
|
||||
}
|
||||
return res;
|
||||
|
@@ -576,6 +576,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
g_settings.network_nfs_recordingdir = configfile.getString( "network_nfs_recordingdir", "/media/sda1/movies" );
|
||||
g_settings.timeshiftdir = configfile.getString( "timeshiftdir", "" );
|
||||
g_settings.downloadcache_dir = configfile.getString( "downloadcache_dir", g_settings.network_nfs_recordingdir.c_str());
|
||||
g_settings.last_webtv_dir = configfile.getString( "last_webtv_dir", "/var/tuxbox/config");
|
||||
|
||||
g_settings.temp_timeshift = configfile.getInt32( "temp_timeshift", 0 );
|
||||
g_settings.auto_timeshift = configfile.getInt32( "auto_timeshift", 0 );
|
||||
@@ -1104,6 +1105,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setString( "network_nfs_recordingdir", g_settings.network_nfs_recordingdir);
|
||||
configfile.setString( "timeshiftdir", g_settings.timeshiftdir);
|
||||
configfile.setString( "downloadcache_dir", g_settings.downloadcache_dir);
|
||||
configfile.setString( "last_webtv_dir", g_settings.last_webtv_dir);
|
||||
configfile.setBool ("filesystem_is_utf8" , g_settings.filesystem_is_utf8 );
|
||||
|
||||
//recording (server + vcr)
|
||||
|
@@ -396,6 +396,7 @@ struct SNeutrinoSettings
|
||||
std::string network_nfs_recordingdir;
|
||||
std::string timeshiftdir;
|
||||
std::string downloadcache_dir;
|
||||
std::string last_webtv_dir;
|
||||
|
||||
//recording
|
||||
int recording_type;
|
||||
|
Reference in New Issue
Block a user