Jelajahi Sumber

Pr momentum fixes (#1)

* WillyJL  changes

* Readme
coolerUA 7 bulan lalu
induk
melakukan
f54d78521a
5 mengubah file dengan 9 tambahan dan 8 penghapusan
  1. 2 2
      README.md
  2. 2 2
      application.fam
  3. 1 1
      scenes/scene_file_browser.c
  4. 2 1
      scenes/scene_playlist_edit.c
  5. 2 2
      subghz_playlist_creator.c

+ 2 - 2
README.md

@@ -29,11 +29,11 @@ A Flipper Zero application for creating and managing playlists of .sub files.
 
 ## Playlist Format
 
-Playlists are stored as simple text files in the `/ext/subghz/playlists` directory. Each line in the playlist file contains the full path to a .sub file.
+Playlists are stored as simple text files in the `/ext/subghz/playlist` directory. Each line in the playlist file contains the full path to a .sub file.
 
 ## Notes
 
-- Playlists are stored in `/ext/subghz/playlists` directory
+- Playlists are stored in `/ext/subghz/playlist` directory
 - Each playlist is saved as a .txt file
 - The application only works with .sub files
 - Make sure your SD card has enough space for the playlists 

+ 2 - 2
application.fam

@@ -1,10 +1,10 @@
 App(
     appid="subghz_playlist_creator",
-    name="SubGhz Playlist Creator",
+    name="Sub-GHz Playlist Creator",
     apptype=FlipperAppType.EXTERNAL,
     entry_point="subghz_playlist_creator_app",
     stack_size=2 * 1024,
-    fap_category="SubGhz",
+    fap_category="Sub-GHz",
     fap_icon="subghz_playlist_creator.png",
     fap_description="App for creating or editing SubGhz playlists",
     fap_author="coolerUA",

+ 1 - 1
scenes/scene_file_browser.c

@@ -35,7 +35,7 @@ void scene_file_browser_select(
     SceneFileBrowserSelectCallback on_select
 ) {
     app->file_browser_select_cb = on_select;
-    furi_string_reset(app->file_browser_result);
+    furi_string_set(app->file_browser_result, start_dir);
     file_browser_configure(
         app->file_browser,
         extension,

+ 2 - 1
scenes/scene_playlist_edit.c

@@ -18,6 +18,7 @@
 
 #define MAX_PLAYLIST_LINES 128
 #define MAX_FILENAME_LENGTH 128
+#define SUBGHZ_DIRECTORY "/ext/subghz"
 #define TAG "PlaylistEditScene"
 
 // Dialog type for PlaylistEdit
@@ -125,7 +126,7 @@ static void playlist_edit_submenu_callback(void* context, uint32_t index) {
     if(index == app->playlist_entry_count) {
         FURI_LOG_D(TAG, "[+] Add file selected");
         app->return_scene = ReturnScene_PlaylistEdit;
-        scene_file_browser_select(app, "/ext", ".sub", on_add_file_selected);
+        scene_file_browser_select(app, SUBGHZ_DIRECTORY, ".sub", on_add_file_selected);
     } else if(index == app->playlist_entry_count + 1) {
         FURI_LOG_D(TAG, "Save playlist selected, showing dialog");
         scene_dialog_show_custom(

+ 2 - 2
subghz_playlist_creator.c

@@ -21,7 +21,7 @@
 
 #define POPUP_DISPLAY_TIME 2000 // 2 seconds in milliseconds
 #define PLAYLIST_EXTENSION ".txt"
-#define PLAYLIST_DIRECTORY "/ext/subghz/playlists"
+#define PLAYLIST_DIRECTORY "/ext/subghz/playlist"
 #define MAX_TEXT_LENGTH 128
 
 // Forward declarations
@@ -154,7 +154,7 @@ static void subghz_playlist_creator_submenu_callback(void* context, uint32_t ind
         memset(app->text_buffer, 0, MAX_TEXT_LENGTH);
         scene_text_input_show(app);
     } else if(index == 1) { // Edit
-        scene_file_browser_select(app, "/ext", PLAYLIST_EXTENSION, on_edit_file_selected);
+        scene_file_browser_select(app, PLAYLIST_DIRECTORY, PLAYLIST_EXTENSION, on_edit_file_selected);
     }
 }