support for user defined base seek time

This commit is contained in:
unK
2008-09-27 23:08:03 +02:00
parent 9b65b39126
commit 0318da84ca
4 changed files with 10 additions and 1 deletions

View File

@@ -98,6 +98,8 @@
#
#incremental_seeking = "yes"
#
#seek_time = "1"
#
#autocenter_mode = "no"
#
#repeat_one_mode = "no"

View File

@@ -2329,7 +2329,7 @@ int main(int argc, char *argv[])
timer = time(NULL);
mPlaylist->ReadKey(input);
int howmuch = Config.incremental_seeking ? (timer-t)/2+1 : 1;
int howmuch = Config.incremental_seeking ? (timer-t)/2+Config.seek_time : Config.seek_time;
if (songpos < s.GetTotalLength() && Keypressed(input, Key.SeekForward))
{

View File

@@ -193,6 +193,7 @@ void DefaultConfiguration(ncmpcpp_config &conf)
conf.set_window_title = true;
conf.mpd_connection_timeout = 15;
conf.crossfade_time = 5;
conf.seek_time = 1;
conf.playlist_disable_highlight_delay = 5;
conf.message_delay_time = 4;
}
@@ -469,6 +470,11 @@ void ReadConfiguration(ncmpcpp_config &conf)
if (StrToInt(v) > 0)
conf.crossfade_time = StrToInt(v);
}
else if (it->find("seek_time") != string::npos)
{
if (StrToInt(v) > 0)
conf.seek_time = StrToInt(v);
}
else if (it->find("playlist_disable_highlight_delay") != string::npos)
{
if (StrToInt(v) >= 0)

View File

@@ -141,6 +141,7 @@ struct ncmpcpp_config
int mpd_connection_timeout;
int crossfade_time;
int seek_time;
int playlist_disable_highlight_delay;
int message_delay_time;
};