support for user defined base seek time
This commit is contained in:
@@ -98,6 +98,8 @@
|
|||||||
#
|
#
|
||||||
#incremental_seeking = "yes"
|
#incremental_seeking = "yes"
|
||||||
#
|
#
|
||||||
|
#seek_time = "1"
|
||||||
|
#
|
||||||
#autocenter_mode = "no"
|
#autocenter_mode = "no"
|
||||||
#
|
#
|
||||||
#repeat_one_mode = "no"
|
#repeat_one_mode = "no"
|
||||||
|
|||||||
@@ -2329,7 +2329,7 @@ int main(int argc, char *argv[])
|
|||||||
timer = time(NULL);
|
timer = time(NULL);
|
||||||
mPlaylist->ReadKey(input);
|
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))
|
if (songpos < s.GetTotalLength() && Keypressed(input, Key.SeekForward))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -193,6 +193,7 @@ void DefaultConfiguration(ncmpcpp_config &conf)
|
|||||||
conf.set_window_title = true;
|
conf.set_window_title = true;
|
||||||
conf.mpd_connection_timeout = 15;
|
conf.mpd_connection_timeout = 15;
|
||||||
conf.crossfade_time = 5;
|
conf.crossfade_time = 5;
|
||||||
|
conf.seek_time = 1;
|
||||||
conf.playlist_disable_highlight_delay = 5;
|
conf.playlist_disable_highlight_delay = 5;
|
||||||
conf.message_delay_time = 4;
|
conf.message_delay_time = 4;
|
||||||
}
|
}
|
||||||
@@ -469,6 +470,11 @@ void ReadConfiguration(ncmpcpp_config &conf)
|
|||||||
if (StrToInt(v) > 0)
|
if (StrToInt(v) > 0)
|
||||||
conf.crossfade_time = StrToInt(v);
|
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)
|
else if (it->find("playlist_disable_highlight_delay") != string::npos)
|
||||||
{
|
{
|
||||||
if (StrToInt(v) >= 0)
|
if (StrToInt(v) >= 0)
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ struct ncmpcpp_config
|
|||||||
|
|
||||||
int mpd_connection_timeout;
|
int mpd_connection_timeout;
|
||||||
int crossfade_time;
|
int crossfade_time;
|
||||||
|
int seek_time;
|
||||||
int playlist_disable_highlight_delay;
|
int playlist_disable_highlight_delay;
|
||||||
int message_delay_time;
|
int message_delay_time;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user