diff --git a/doc/ncmpcpprc b/doc/ncmpcpprc index 51220c15..0146cc95 100644 --- a/doc/ncmpcpprc +++ b/doc/ncmpcpprc @@ -98,6 +98,8 @@ # #incremental_seeking = "yes" # +#seek_time = "1" +# #autocenter_mode = "no" # #repeat_one_mode = "no" diff --git a/src/ncmpcpp.cpp b/src/ncmpcpp.cpp index 803b1342..a3d13e6b 100644 --- a/src/ncmpcpp.cpp +++ b/src/ncmpcpp.cpp @@ -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)) { diff --git a/src/settings.cpp b/src/settings.cpp index 694fffe3..d16242eb 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -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) diff --git a/src/settings.h b/src/settings.h index 94a73653..f6e022fb 100644 --- a/src/settings.h +++ b/src/settings.h @@ -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; };