From 91ff63937c39f11aeeee487b3414fb539554db41 Mon Sep 17 00:00:00 2001 From: ske087 Date: Tue, 25 Mar 2025 10:08:16 +0200 Subject: [PATCH] updated to local folder --- src/media_player.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/media_player.py b/src/media_player.py index 7d30aa4..44ecc9e 100644 --- a/src/media_player.py +++ b/src/media_player.py @@ -67,7 +67,7 @@ class MediaPlayer(Screen): Logger.error(f"Failed to load playlist: {e}") def download_media_files(self): - base_dir = '/home/pi/media/files' # Update this to a directory with write permissions + base_dir = os.path.join(os.path.dirname(__file__), 'static', 'resurse') # Update this to the correct path if not os.path.exists(base_dir): os.makedirs(base_dir) @@ -95,7 +95,7 @@ class MediaPlayer(Screen): duration = media.get('duration', 10) # Default duration is 10 seconds # Define the base directory for media files - base_dir = '/path/to/media/files' # Update this to the correct path + base_dir = os.path.join(os.path.dirname(__file__), 'static', 'resurse') # Update this to the correct path file_path = os.path.join(base_dir, file_name) if file_extension in ['.mp4', '.avi', '.mov']: