final update

This commit is contained in:
2025-06-20 16:35:43 +03:00
parent 9fe4c419d7
commit f5ba9e734f
2 changed files with 34 additions and 26 deletions

View File

@@ -1,2 +1,7 @@
2025-06-20 16:32:40 - STARTED: edit_pencil.png
2025-06-20 16:33:00 - STARTED: delete.png
2025-06-20 16:35:13 - STARTED: edit_pencil.png
2025-06-20 16:35:15 - STARTED: delete.png
2025-06-20 16:35:16 - STARTED: edit_pencil.png
2025-06-20 16:35:17 - STARTED: delete.png
2025-06-20 16:35:18 - STARTED: edit_pencil.png

View File

@@ -186,7 +186,10 @@ class MediaPlayer(Screen):
def play_media(self):
"""Play the current media in the playlist."""
if self.playlist:
if not self.playlist or not isinstance(self.playlist, list):
Logger.error("MediaPlayer: Playlist is invalid or empty. Cannot play media.")
return
media = self.playlist[self.current_index] # Get the current media
file_name = media.get('file_name', '') # Get the file name
file_extension = os.path.splitext(file_name)[1].lower() # Get the file extension