diff --git a/.catalog/README.md b/.catalog/README.md deleted file mode 100644 index 05cc0419874..00000000000 --- a/.catalog/README.md +++ /dev/null @@ -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. diff --git a/.catalog/screenshots/1.png b/.catalog/screenshots/1.png deleted file mode 100644 index 543aca92eba..00000000000 Binary files a/.catalog/screenshots/1.png and /dev/null differ diff --git a/.catalog/screenshots/2.png b/.catalog/screenshots/2.png deleted file mode 100644 index 73ee612748a..00000000000 Binary files a/.catalog/screenshots/2.png and /dev/null differ diff --git a/application.fam b/application.fam index f96d7a5baf2..c9cd5e44de7 100644 --- a/application.fam +++ b/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" ) diff --git a/files/Marble_Machine.fmf b/files/Marble_Machine.fmf deleted file mode 100644 index 7403c9a0f15..00000000000 --- a/files/Marble_Machine.fmf +++ /dev/null @@ -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 diff --git a/music_player.c b/music_player.c index 494c0f95de0..c353f207537 100644 --- a/music_player.c +++ b/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;