updated to local folder
This commit is contained in:
@@ -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']:
|
||||
|
||||
Reference in New Issue
Block a user