Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit895e203

Browse files
Music Player app: shortcuts
1 parent4faa3b8 commit895e203

File tree

1 file changed

+4
-1
lines changed
  • internal_filesystem/apps/com.micropythonos.musicplayer/assets

1 file changed

+4
-1
lines changed

‎internal_filesystem/apps/com.micropythonos.musicplayer/assets/music_player.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ def onCreate(self):
2222
self.file_explorer.explorer_open_dir('M:/')
2323
self.file_explorer.align(lv.ALIGN.CENTER,0,0)
2424
self.file_explorer.add_event_cb(self.file_explorer_event_cb,lv.EVENT.ALL,None)
25-
self.file_explorer.explorer_set_quick_access_path(lv.EXPLORER.MUSIC_DIR,"M:/sdcard/music")
25+
importos
26+
local_filesystem_dir=os.getcwd().rstrip('/')# if it's / then it has a slash, if it's a subfolder then it doesn't
27+
self.file_explorer.explorer_set_quick_access_path(lv.EXPLORER.HOME_DIR,f"M:{local_filesystem_dir}/")
28+
self.file_explorer.explorer_set_quick_access_path(lv.EXPLORER.MUSIC_DIR,f"M:{local_filesystem_dir}/sdcard/music")
2629
self.setContentView(screen)
2730

2831
defonResume(self,screen):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp