summaryrefslogtreecommitdiff
path: root/src/media_library.cpp
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2014-08-31 11:11:40 +0200
committerAndrzej Rybczak <electricityispower@gmail.com>2014-08-31 11:15:36 +0200
commit301de2a4fefa447a7f64d248ec17fac4c511e5bb (patch)
treed843d02d8a341a139d494e5021dffdf3b9f05d15 /src/media_library.cpp
parent44302aee47348c36a853e6f29ad5f80cfd3e333b (diff)
media library: change data fetch delay to 250ms
Diffstat (limited to 'src/media_library.cpp')
-rw-r--r--src/media_library.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/media_library.cpp b/src/media_library.cpp
index de75818d..7d8b8f41 100644
--- a/src/media_library.cpp
+++ b/src/media_library.cpp
@@ -47,7 +47,8 @@ MediaLibrary *myLibrary;
namespace {
-const auto fetch_delay = boost::posix_time::milliseconds(500);
+const auto ml_wtimeout = 250;
+const auto fetch_delay = boost::posix_time::milliseconds(ml_wtimeout);
bool hasTwoColumns;
size_t itsLeftColStartX;
@@ -422,6 +423,14 @@ void MediaLibrary::update()
}
}
+int MediaLibrary::windowTimeout()
+{
+ if (Albums.reallyEmpty() || Songs.reallyEmpty())
+ return ml_wtimeout;
+ else
+ return Screen<WindowType>::windowTimeout();
+}
+
void MediaLibrary::enterPressed()
{
AddToPlaylist(true);