Skip to content

Commit

Permalink
Squashed 'music_player/' changes from 99bd509..d136006
Browse files Browse the repository at this point in the history
d136006 move base pack here
REVERT: 99bd509 Picopass, music player version bump (#28)
REVERT: 1cce06c Music player, picopass: assets integration (#23)
REVERT: fca2fde Clock, music player, snake game from firmware repo (#19)
REVERT: 19cc230 Mass storage: deadlock fix (#22)
REVERT: b108d7a add Auriol-AHFL protocol (#17)
REVERT: 64625d3 Mass storage 1.1 (#18)
REVERT: f3d0a51 .gitignore add (#16)
REVERT: a012a03 Added fap_version field to all apps (#15)
REVERT: 7d7a283 [FL-3475] Fix markdown for descriptions  (#14)
REVERT: f3c49ed Add descriptions for all the faps (#13)
REVERT: d8c1593 Added build workflow (#11)
REVERT: f15e0f8 Add codewoners and PR template
REVERT: 4670a88 Fixes failure to read picopass cards immediately after emulating. (#10)
REVERT: fdb9b1c Merge pull request #9 from bettse/custom_key
REVERT: e5b76f8 Picopass: key change to custom elite key
REVERT: d625492 Merge pull request #7 from bettse/write_fail
REVERT: 20468a8 Manifest cleanup
REVERT: e445072 Added app descriptions (#8)
REVERT: 9df58b6 bugfix
REVERT: 2fd255d Picopass: Properly indicate write success/failure
REVERT: 6300982 Merge pull request #3 from nvx/feature/picopass_emulation
REVERT: 586836b Screenshots for app catalog (#6)
REVERT: c20e110 nfc_magic: fix icon dependency (#5)
REVERT: 5f39e01 Removed clock, music player, snake game (#4)
REVERT: ed0823c [FL-3432] USB storage app (#1)
REVERT: cc70ae9 Add picopass emulation
REVERT: 7d55581 Prepare nfc_rfid for fap catalog (#2)
REVERT: 881d9be Move apps from flipperzero firmware into separate repository

git-subtree-dir: music_player
git-subtree-split: d136006
  • Loading branch information
Willy-JL committed Nov 12, 2023
1 parent 99bd509 commit 0bd010b
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 33 deletions.
7 changes: 0 additions & 7 deletions .catalog/README.md

This file was deleted.

Binary file removed .catalog/screenshots/1.png
Binary file not shown.
Binary file removed .catalog/screenshots/2.png
Binary file not shown.
5 changes: 1 addition & 4 deletions application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
6 changes: 0 additions & 6 deletions files/Marble_Machine.fmf

This file was deleted.

19 changes: 3 additions & 16 deletions music_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0bd010b

Please sign in to comment.