Expose playlist and remote apps paths in headers

This commit is contained in:
Willy-JL
2023-07-02 19:10:51 +02:00
parent 2ca1d2ef0b
commit 1c7eec04dd
5 changed files with 9 additions and 10 deletions

View File

@@ -4,6 +4,8 @@
#include "infrared_remote_button.h" #include "infrared_remote_button.h"
#define IR_REMOTE_PATH EXT_PATH("infrared/remote")
typedef struct InfraredRemote InfraredRemote; typedef struct InfraredRemote InfraredRemote;
InfraredRemote* infrared_remote_alloc(); InfraredRemote* infrared_remote_alloc();

View File

@@ -147,11 +147,11 @@ int32_t infrared_remote_app(void* p) {
DialogsApp* dialogs = furi_record_open(RECORD_DIALOGS); DialogsApp* dialogs = furi_record_open(RECORD_DIALOGS);
DialogsFileBrowserOptions browser_options; DialogsFileBrowserOptions browser_options;
dialog_file_browser_set_basic_options(&browser_options, ".txt", &I_sub1_10px); dialog_file_browser_set_basic_options(&browser_options, ".txt", &I_sub1_10px);
browser_options.base_path = EXT_PATH("infrared/remote"); browser_options.base_path = IR_REMOTE_PATH;
FuriString* map_file = furi_string_alloc(); FuriString* map_file = furi_string_alloc();
furi_string_set(map_file, EXT_PATH("infrared/remote")); furi_string_set(map_file, IR_REMOTE_PATH);
if(!storage_file_exists(storage, EXT_PATH("infrared/remote"))) { if(!storage_file_exists(storage, IR_REMOTE_PATH)) {
storage_common_mkdir(storage, EXT_PATH("infrared/remote")); //Make Folder If dir not exist storage_common_mkdir(storage, IR_REMOTE_PATH); //Make Folder If dir not exist
} }
bool res = dialog_file_browser_show(dialogs, map_file, map_file, &browser_options); bool res = dialog_file_browser_show(dialogs, map_file, map_file, &browser_options);

View File

@@ -22,8 +22,6 @@
#include "playlist_file.h" #include "playlist_file.h"
#include "canvas_helper.h" #include "canvas_helper.h"
#define PLAYLIST_FOLDER EXT_PATH("subghz/playlist")
#define PLAYLIST_EXT ".txt"
#define TAG "Playlist" #define TAG "Playlist"
#define STATE_NONE 0 #define STATE_NONE 0

View File

@@ -4,4 +4,7 @@
#include <storage/storage.h> #include <storage/storage.h>
#define PLAYLIST_FOLDER EXT_PATH("subghz/playlist")
#define PLAYLIST_EXT ".txt"
int playlist_count_playlist_items(Storage* storage, const char* file_path); int playlist_count_playlist_items(Storage* storage, const char* file_path);

View File

@@ -6,11 +6,7 @@
#include "helpers/txrx/subghz_txrx.h" #include "helpers/txrx/subghz_txrx.h"
#ifdef APP_SUBGHZREMOTE
#include <assets_icons.h> #include <assets_icons.h>
#else
#include <subrem_remote_fap_icons.h>
#endif
#include "views/remote.h" #include "views/remote.h"