Music Player app: add quick access for filesystem

This commit is contained in:
Thomas Farstrike
2025-11-02 23:27:49 +01:00
parent 895e2030ea
commit 1dcf5d8cc6
@@ -24,8 +24,10 @@ class MusicPlayer(Activity):
self.file_explorer.add_event_cb(self.file_explorer_event_cb, lv.EVENT.ALL, None)
import os
local_filesystem_dir = os.getcwd().rstrip('/') # if it's / then it has a slash, if it's a subfolder then it doesn't
self.file_explorer.explorer_set_quick_access_path(lv.EXPLORER.HOME_DIR, f"M:{local_filesystem_dir}/")
self.file_explorer.explorer_set_quick_access_path(lv.EXPLORER.FS_DIR, f"M:{local_filesystem_dir}")
self.file_explorer.explorer_set_quick_access_path(lv.EXPLORER.HOME_DIR, f"M:{local_filesystem_dir}/sdcard")
self.file_explorer.explorer_set_quick_access_path(lv.EXPLORER.MUSIC_DIR, f"M:{local_filesystem_dir}/sdcard/music")
#self.file_explorer.explorer_set_sort(lv.EXPLORER_SORT.KIND)
self.setContentView(screen)
def onResume(self, screen):