summaryrefslogtreecommitdiffstats
path: root/app/main.cpp
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-08-07 15:14:58 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2017-08-07 15:15:13 -0700
commit059eb5b736d154e01d2a35fd27ca157d7de51a7a (patch)
tree7faa5e4dfe0c6d90e48ce0ecc2897067db51e79a /app/main.cpp
parent351642ef3d3f57273c7d6d3122235c6c7957162c (diff)
binding: media: scan local users Media directory
Scan ~/Music in addition to the mounted physical media. Bug-AGL: SPEC-810 Change-Id: Ieb76cedc841cf5ea9ae4c260872943b9763ddcb3 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'app/main.cpp')
-rw-r--r--app/main.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/app/main.cpp b/app/main.cpp
index 5ad9577..63e408a 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -31,23 +31,6 @@
#include "playlistwithmetadata.h"
-#ifndef HAVE_LIGHTMEDIASCANNER
-QVariantList readMusicFile(const QString &path)
-{
- QVariantList ret;
- QDir dir(path);
- for (const auto &entry : dir.entryList(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot, QDir::Name)) {
- QFileInfo fileInfo(dir.absoluteFilePath(entry));
- if (fileInfo.isDir()) {
- ret.append(readMusicFile(fileInfo.absoluteFilePath()));
- } else if (fileInfo.isFile()) {
- ret.append(QUrl::fromLocalFile(fileInfo.absoluteFilePath()));
- }
- }
- return ret;
-}
-#endif
-
int main(int argc, char *argv[])
{
#ifdef HAVE_LIBHOMESCREEN
@@ -68,17 +51,6 @@ int main(int argc, char *argv[])
QQmlApplicationEngine engine;
QQmlContext *context = engine.rootContext();
-#ifndef HAVE_LIGHTMEDIASCANNER
- QVariantList mediaFiles;
- QString music;
-
- for (const auto &music : QStandardPaths::standardLocations(QStandardPaths::MusicLocation)) {
- mediaFiles.append(readMusicFile(music));
- }
-
- context->setContextProperty("mediaFiles", mediaFiles);
-#endif
-
QCommandLineParser parser;
parser.addPositionalArgument("port", app.translate("main", "port for binding"));
parser.addPositionalArgument("secret", app.translate("main", "secret for binding"));