Jellyfin Forum
SOLVED: Path substitution for files on NFS or Samba server - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: Path substitution for files on NFS or Samba server (/t-solved-path-substitution-for-files-on-nfs-or-samba-server)



Path substitution for files on NFS or Samba server - nanouk76 - 2024-05-25

Hi all,
upgraded to version 10.9 then to 10.9.2 on a Ubuntu 22.04.4 server a couple days ago. Everything seemed to work fine until I added a drive to the Movie library. I immediately noticed that there no longer is a textbox where you can type the absolute path to the shared drive on the NFS server in the form of
Code:
nfs://server/share
(as per the screenshot in version 10.8     ) which results in the movies not playing on a Kodi instance with the Jellyfin addon in native mode. Did I miss a fundamental change in the way library sources are defined or is that a bug of some sort? Any help would be much appreciated.


RE: Path substitution for files on NFS or Samba server - Efficient_Good_5784 - 2024-05-25

Adding network shares in a library's settings was removed some version ago. I believe it was due to security issues.


RE: Path substitution for files on NFS or Samba server - qwerty12 - 2024-05-25

The option to add shared network folders from the web interface got removed (https://github.com/jellyfin/jellyfin-web/pull/5098), but they are still obeyed if set. It's mentioned on the documentation for the Kodi plugin ("Starting from Jellyfin 10.9 it is no longer possible to set the shared network folder.").

I have no idea how to set those paths via the API, but you can still set them by editing Jellyfin setting files directly:

  1. Shutdown Jellyfin
  2. Go to C:\ProgramData\Jellyfin\Server\root\default\ (or the *NIX equivalent in your case)
  3. Open the options.xml of the library you want to add a network path to, and add a corresponding <NetworkPath> element underneath the <Path> element. Example:
    Code:
    <PathInfos>
        <MediaPathInfo>
          <Path>C:\1</Path>
          <NetworkPath>\\192.168.1.1\C$\1</NetworkPath>
        </MediaPathInfo>
        <MediaPathInfo>
          <Path>C:\2</Path>
          <NetworkPath>\\192.168.1.1\C$\2</NetworkPath>
        </MediaPathInfo>
      </PathInfos>



RE: Path substitution for files on NFS or Samba server - TheDreadPirate - 2024-05-25

Echoing the prior two posts. Adding that it has always been strongly recommended to add network shares (NFS or SMB/CIFS) by mounting them in the file system and then providing that mounted path to Jellyfin. Doing it this way is less problematic, in general, allows you to use more secure NFS/CIFS protocols, etc.


RE: Path substitution for files on NFS or Samba server - nanouk76 - 2024-05-25

(2024-05-25, 12:01 PM)qwerty12 Wrote: The option to add shared network folders from the web interface got removed (https://github.com/jellyfin/jellyfin-web/pull/5098), but they are still obeyed if set. It's mentioned on the documentation for the Kodi plugin ("Starting from Jellyfin 10.9 it is no longer possible to set the shared network folder.").

I have no idea how to set those paths via the API, but you can still set them by editing Jellyfin setting files directly:

  1. Shutdown Jellyfin
  2. Go to C:\ProgramData\Jellyfin\Server\root\default\ (or the *NIX equivalent in your case)
  3. Open the options.xml of the library you want to add a network path to, and add a corresponding <NetworkPath> element underneath the <Path> element. Example:
    Code:
      <PathInfos>
        <MediaPathInfo>
          <Path>C:\1</Path>
          <NetworkPath>\\192.168.1.1\C$\1</NetworkPath>
        </MediaPathInfo>
        <MediaPathInfo>
          <Path>C:\2</Path>
          <NetworkPath>\\192.168.1.1\C$\2</NetworkPath>
        </MediaPathInfo>
      </PathInfos>
Sorry clicked on the previous post for the solution. I can't change that apparently. Could a mod do it please?
This is the solution. Thanks, works as expected.