summaryrefslogtreecommitdiffstats
path: root/app/lightmediascanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'app/lightmediascanner.cpp')
-rw-r--r--app/lightmediascanner.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/lightmediascanner.cpp b/app/lightmediascanner.cpp
index aa8c362..c17e0dc 100644
--- a/app/lightmediascanner.cpp
+++ b/app/lightmediascanner.cpp
@@ -40,3 +40,18 @@ bool LightMediaScanner::next(QString& item)
return true;
}
+
+QVariantList LightMediaScanner::processLightMediaScanner()
+{
+ QVariantList mediaFiles;
+ QString music;
+ LightMediaScanner scanner(QDir::homePath() + "/.config/lightmediascannerd/db.sqlite3");
+ while (scanner.next(music)) {
+ QFileInfo fileInfo(music);
+ // Possible for stale entries due to removable media
+ if (!fileInfo.exists())
+ continue;
+ mediaFiles.append(QUrl::fromLocalFile(music));
+ }
+ return mediaFiles;
+}