Explorar o código

Squashed 'music_player/' changes from 99bd5098d..d1360060f

d1360060f move base pack here
REVERT: 99bd5098d Picopass, music player version bump (#28)
REVERT: 1cce06cb9 Music player, picopass: assets integration (#23)
REVERT: fca2fdeac Clock, music player, snake game from firmware repo (#19)
REVERT: 19cc23061 Mass storage: deadlock fix (#22)
REVERT: b108d7aae add Auriol-AHFL protocol (#17)
REVERT: 64625d312 Mass storage 1.1 (#18)
REVERT: f3d0a5197 .gitignore add (#16)
REVERT: a012a03f2 Added fap_version field to all apps (#15)
REVERT: 7d7a283b6 [FL-3475] Fix markdown for descriptions  (#14)
REVERT: f3c49edea Add descriptions for all the faps (#13)
REVERT: d8c159314 Added build workflow (#11)
REVERT: f15e0f881 Add codewoners and PR template
REVERT: 4670a8855 Fixes failure to read picopass cards immediately after emulating. (#10)
REVERT: fdb9b1c02 Merge pull request #9 from bettse/custom_key
REVERT: e5b76f827 Picopass: key change to custom elite key
REVERT: d625492a7 Merge pull request #7 from bettse/write_fail
REVERT: 20468a8df Manifest cleanup
REVERT: e4450727f Added app descriptions (#8)
REVERT: 9df58b650 bugfix
REVERT: 2fd255df1 Picopass: Properly indicate write success/failure
REVERT: 6300982b0 Merge pull request #3 from nvx/feature/picopass_emulation
REVERT: 586836b61 Screenshots for app catalog (#6)
REVERT: c20e1106b nfc_magic: fix icon dependency (#5)
REVERT: 5f39e0113 Removed clock, music player, snake game (#4)
REVERT: ed0823c38 [FL-3432] USB storage app (#1)
REVERT: cc70ae924 Add picopass emulation
REVERT: 7d555817f Prepare nfc_rfid for fap catalog (#2)
REVERT: 881d9be39 Move apps from flipperzero firmware into separate repository

git-subtree-dir: music_player
git-subtree-split: d1360060f6c9e2cf912d895e8490c4d8ab8e583c
Willy-JL %!s(int64=2) %!d(string=hai) anos
pai
achega
0bd010b9d6
Modificáronse 6 ficheiros con 4 adicións e 33 borrados
  1. 0 7
      .catalog/README.md
  2. BIN=BIN
      .catalog/screenshots/1.png
  3. BIN=BIN
      .catalog/screenshots/2.png
  4. 1 4
      application.fam
  5. 0 6
      files/Marble_Machine.fmf
  6. 3 16
      music_player.c

+ 0 - 7
.catalog/README.md

@@ -1,7 +0,0 @@
-# Music Player
-
-This is a simple music player that can play music using the Flipper Zero's speaker.
-
-The music player supports the Flipper Music Format (FMF), which is similar to RTTL. You can find a sample song in the /apps_data/music_player folder on your SD card. It is a text file that you can open using any text editor on your computer. You can also find more songs on our [Community Forum](https://forum.flipper.net/t/music-player-songs/2715/35).
-
-The volume can be adjusted using the UP and DOWN buttons on the D-pad.

BIN=BIN
.catalog/screenshots/1.png


BIN=BIN
.catalog/screenshots/2.png


+ 1 - 4
application.fam

@@ -8,12 +8,9 @@ App(
         "dialogs",
     ],
     stack_size=2 * 1024,
-    targets=["f7"],
-    fap_version="1.1",
+    order=20,
     fap_icon="icons/music_10px.png",
     fap_category="Media",
-    fap_description="An app to play RTTL music files",
     fap_icon_assets="icons",
     fap_libs=["music_worker"],
-    fap_file_assets="files"
 )

+ 0 - 6
files/Marble_Machine.fmf

@@ -1,6 +0,0 @@
-Filetype: Flipper Music Format
-Version: 0
-BPM: 130
-Duration: 8
-Octave: 5
-Notes: E6, P, E, B, 4P, E, A, G, A, E, B, P, G, A, D6, 4P, D, B, 4P, D, A, G, A, D, F#, P, G, A, D6, 4P, F#, B, 4P, F#, D6, C6, B, F#, A, P, G, F#, E, P, C, E, B, B4, C, D, D6, C6, B, F#, A, P, G, A, E6, 4P, E, B, 4P, E, A, G, A, E, B, P, G, A, D6, 4P, D, B, 4P, D, A, G, A, D, F#, P, G, A, D6, 4P, F#, B, 4P, F#, D6, C6, B, F#, A, P, G, F#, E, P, C, E, B, B4, C, D, D6, C6, B, F#, A, P, G, A, E6

+ 3 - 16
music_player.c

@@ -10,8 +10,8 @@
 
 #define TAG "MusicPlayer"
 
+#define MUSIC_PLAYER_APP_PATH_FOLDER ANY_PATH("music_player")
 #define MUSIC_PLAYER_APP_EXTENSION "*"
-#define MUSIC_PLAYER_EXAMPLE_FILE "Marble_Machine.fmf"
 
 #define MUSIC_PLAYER_SEMITONE_HISTORY_SIZE 4
 
@@ -306,31 +306,18 @@ int32_t music_player_app(void* p) {
         if(p && strlen(p)) {
             furi_string_set(file_path, (const char*)p);
         } else {
-            Storage* storage = furi_record_open(RECORD_STORAGE);
-            storage_common_migrate(
-                storage, EXT_PATH("music_player"), STORAGE_APP_DATA_PATH_PREFIX);
-
-            if(!storage_common_exists(storage, APP_DATA_PATH(MUSIC_PLAYER_EXAMPLE_FILE))) {
-                storage_common_copy(
-                    storage,
-                    APP_ASSETS_PATH(MUSIC_PLAYER_EXAMPLE_FILE),
-                    APP_DATA_PATH(MUSIC_PLAYER_EXAMPLE_FILE));
-            }
-            furi_record_close(RECORD_STORAGE);
-
-            furi_string_set(file_path, STORAGE_APP_DATA_PATH_PREFIX);
+            furi_string_set(file_path, MUSIC_PLAYER_APP_PATH_FOLDER);
 
             DialogsFileBrowserOptions browser_options;
             dialog_file_browser_set_basic_options(
                 &browser_options, MUSIC_PLAYER_APP_EXTENSION, &I_music_10px);
             browser_options.hide_ext = false;
-            browser_options.base_path = STORAGE_APP_DATA_PATH_PREFIX;
+            browser_options.base_path = MUSIC_PLAYER_APP_PATH_FOLDER;
 
             DialogsApp* dialogs = furi_record_open(RECORD_DIALOGS);
             bool res = dialog_file_browser_show(dialogs, file_path, file_path, &browser_options);
 
             furi_record_close(RECORD_DIALOGS);
-
             if(!res) {
                 FURI_LOG_E(TAG, "No file selected");
                 break;