add support for 'replay' function (play current song from the beginning)

This commit is contained in:
Andrzej Rybczak
2010-08-13 06:31:58 +02:00
parent 342521459c
commit 35ddbe351a
5 changed files with 23 additions and 1 deletions

View File

@@ -551,7 +551,13 @@ int main(int argc, char *argv[])
design_changed = 1;
resize_screen();
}
else if (Keypressed(input, Key.GoToParentDir))
else if (Keypressed(input, Key.GoToParentDir)
&& (myScreen == myBrowser
# ifdef HAVE_TAGLIB_H
|| myScreen == myTagEditor
# endif // HAVE_TAGLIB_H
)
)
{
if (myScreen == myBrowser && myBrowser->CurrentDir() != "/")
{
@@ -797,6 +803,14 @@ int main(int argc, char *argv[])
}
}
}
else if (Keypressed(input, Key.Replay))
{
if (Mpd.isPlaying())
{
Mpd.Seek(0);
UpdateStatusImmediately = 1;
}
}
else if (Keypressed(input, Key.Prev))
{
Mpd.Prev();