Associate .mp3 files with the Mp3Player application in Files browser
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#include <Tactility/app/imageviewer/ImageViewer.h>
|
||||
#include <Tactility/app/inputdialog/InputDialog.h>
|
||||
#include <Tactility/app/notes/Notes.h>
|
||||
#include <Tactility/app/App.h>
|
||||
#include <Tactility/Bundle.h>
|
||||
#include <Tactility/file/File.h>
|
||||
#include <Tactility/kernel/Platform.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
@@ -233,6 +235,10 @@ void View::viewFile(const std::string& path, const std::string& filename) {
|
||||
// Remove forward slash, because we need a relative path
|
||||
notes::start(processed_filepath.substr(1));
|
||||
}
|
||||
} else if (isSupportedAudioFile(filename)) {
|
||||
auto parameters = std::make_shared<Bundle>();
|
||||
parameters->putString("file", processed_filepath);
|
||||
app::start("one.tactility.mp3player", parameters);
|
||||
} else {
|
||||
LOGGER.warn("Opening files of this type is not supported");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user