From 0bd010b9d686f72687fdb9fd7826b744f107b0d7 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Sun, 12 Nov 2023 08:35:45 +0000 Subject: [PATCH] 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 --- .catalog/README.md | 7 ------- .catalog/screenshots/1.png | Bin 1763 -> 0 bytes .catalog/screenshots/2.png | Bin 1361 -> 0 bytes application.fam | 5 +---- files/Marble_Machine.fmf | 6 ------ music_player.c | 19 +++---------------- 6 files changed, 4 insertions(+), 33 deletions(-) delete mode 100644 .catalog/README.md delete mode 100644 .catalog/screenshots/1.png delete mode 100644 .catalog/screenshots/2.png delete mode 100644 files/Marble_Machine.fmf 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 543aca92ebae29d777d4bc43fa44f8a3bc68b973..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1763 zcmaJ?drVVT96m(>!AG2%t7VhQm_nEvjRdeFG7&+Xf+EnFQeFdUU(~|#~zAG0KmomiUMmK!{L8U;_QP*;h~eo0Bkzrcu=w&Y#9J<*J7jg zCzdfZ6Z6DF-NPSrRNBl7 z=)!g^&Bigm%dchI+Q_t?%J%6T!1qRhjoShEQACh~cj!Wm>ACh3mhwv)Ei3Mp3%IZe zfa5M;+hG8rJV2HI(&E+N)2m>4@+BpYRvS*qdw;ILTl0b<a^8$R=NVn{2KTXF)md;nK{MA1NgPQF!dXlguvCn^|U& zalC8u#0(ifs@CS`%kIG3a!*xS?wq=RKEoZVC)fHVz7~p_a?N%#nl)YyIa?P|KKl;rRi| zZQ+az@V6{Eab4)%Su$gxoikJfsuqs8{%5Ac9}IY^Pnh&ZkX&J)38bG5y6H`Mx@%RHtGe+wxtiWdD1F2@fPjQ8cjQ5+39pKu?Vg(-(B6eeKl8*~EqY%py!@FD z1+{hPv#m3(E#~p0Tvdvta`F_y4~9EHb8=IQN+cROT)KY{Q1E!>MWW^CUt&xubroRw zERn;2l&aK_m}9U#25Pr;kT9X!EX}PS-P55eHjG1GWJR}@P|w1MO*WzX{YIPNu}G7g zroD1AOhtmS(US6O_bLMGbc>Jj5S-MmtNns^5pD?Y3`%ntFovBK|3Km ztpogzm8f<^810|pa^oW&Ncz1qjxv9NWqo5KwW2rfR1C;WtxPCd5(P_WH*sfrf!XR! z8Lu(y%@iZfeq%?jm~PA#a~fC#gFV{wggq^)kRw!=wphgKezi3kpQ5Gm~dQ0!3Kx^_B4Brubd z$WYi6#N#^C*$k6@&nJRF0a~#vm>u0}s=wO^ax3rm22jK|3Y&S42NtV;{>RCMz=)X~j>^Vx;x8kdvQm5cW=X^+%qMaHPobI>0 zy+WKTUihxBjo(J5efO0!W@fZ`-j{YGyjAzo9 o?^OwYh1SJTq}m%W(Iy&d@-A-A_O{?W`(F#h9*m1>j!duq7h?y7t^fc4 diff --git a/.catalog/screenshots/2.png b/.catalog/screenshots/2.png deleted file mode 100644 index 73ee612748a764e1f31afa2226ff89d4117c977d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1361 zcmeAS@N?(olHy`uVBq!ia0y~yU;;8388|?c*QZDWAjMhW5n0T@AXEavjQ7&yD;OA9 znLS+`Ln`LHz3Z5F#el&fu&GMs+;K$<`R9&0yJm8^dU@Cse!3s+ba~h0L(|``-2CU~ z*T>Qfw)fY|F)&;gU}(@_WatpWL;Z^Q-TmIaet)qH1J9*v&Q-Pwgx0oZW;~!1^%g|7HgPFmB zfngO3gF@DKxdYQm|C@eeW>}ZX5Ay5^pi5TxRx`L?`+NNcKSKqQ5tiH>3P*r$W?~3X zWnc(oVh}*0qn4Ho=eL!qA$xJt(>-+z^N#Z{D0ne2ECRXt#Ak+YcFV;Zz8f>c18&!wnFrSY zW~u(p+!tg0=(CLB;nxO-CcnG5dilNerp7&$ZH6{ek;3hRZNtUvvg+&Xwx1vTy|dWA zJaYfM#Iv<+h9WZ-()=|7Oob7;v|a|H0L1rcZUZ0o^o{z506J^*6HrbAB^M z%j|Sd-)pBFcU$>4yYeyPU!^mCrf)rfS_k#^|G7ie!cv^`1tpE_fzMbIgBvoRbV>f+|>7xZ__PbpZTKve1rVY zx^#=+7i+TLZ<<$kZSTI*-%sy60|{18=uT5UFBO|?E0|D+WX0@n3=9==h-f2}T=6C4 jQ8~OheaHsSiv4pOrSBb`vLO&yMlyK1`njxgN@xNA7H6CJ 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;