diff --git a/lazy_player/video_player.py b/lazy_player/video_player.py index e0e8502..f66eaf7 100644 --- a/lazy_player/video_player.py +++ b/lazy_player/video_player.py @@ -1,6 +1,5 @@ from __future__ import annotations -import os from pathlib import Path import gi @@ -45,10 +44,7 @@ class VideoPlayer(GObject.Object): def play(self, file_path: Path | str, position: int = 0, subtitle_track: int = -2) -> None: """Start playing a video file""" - if isinstance(file_path, Path): - file_path = os.path.abspath(file_path) - - self.playbin.set_property("uri", f"file://{file_path}") + self.playbin.set_property("uri", Gst.filename_to_uri(str(file_path))) if subtitle_track >= 0: flags = self.playbin.get_property("flags")