updated to local folder

This commit is contained in:
2025-03-25 10:08:16 +02:00
parent 5fad1ffaf0
commit 91ff63937c

View File

@@ -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']: