diff --git a/jellyfin_kodi/helper/api.py b/jellyfin_kodi/helper/api.py
index 0174c3edb..56df8dc88 100644
--- a/jellyfin_kodi/helper/api.py
+++ b/jellyfin_kodi/helper/api.py
@@ -206,6 +206,16 @@ def get_file_path(self, path=None):
if not path:
return ""
+ replace = settings("directPathReplace")
+ replace_with = settings("directPathReplaceWith")
+ if (
+ settings("useDirectPaths") == "1"
+ and replace
+ and replace_with
+ and path.startswith(replace)
+ ):
+ path = path.replace(replace, replace_with, 1)
+
if path.startswith("\\\\"):
path = (
path.replace("\\\\", "smb://", 1)
diff --git a/resources/language/resource.language.en_gb/strings.po b/resources/language/resource.language.en_gb/strings.po
index d44a37b1e..0645cae28 100644
--- a/resources/language/resource.language.en_gb/strings.po
+++ b/resources/language/resource.language.en_gb/strings.po
@@ -996,3 +996,11 @@ msgstr "Max artwork resolution"
msgctxt "#33202"
msgid "Transcode H265/HEVC RExt"
msgstr "Transcode H265/HEVC RExt"
+
+msgctxt "#33203"
+msgid "Native path to replace"
+msgstr "Native path to replace"
+
+msgctxt "#33204"
+msgid "Native path to replace with"
+msgstr "Native path replace with"
diff --git a/resources/settings.xml b/resources/settings.xml
index 91bc5f83e..2d7a8e2ea 100644
--- a/resources/settings.xml
+++ b/resources/settings.xml
@@ -24,6 +24,8 @@
+
+