File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
internal_filesystem/apps/com.micropythonos.musicplayer/assets Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff 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+ import os
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 def onResume (self , screen ):
You can’t perform that action at this time.
0 commit comments