Jellyfin Forum
Jellyfin deletes all media metadata when unable to access media filles - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: Jellyfin deletes all media metadata when unable to access media filles (/t-jellyfin-deletes-all-media-metadata-when-unable-to-access-media-filles)



Jellyfin deletes all media metadata when unable to access media filles - cthunsfrd - 2024-05-13

Jellyfin server deletes all metadata during restart if unable to access media files.
Because my media files are on another server and Jellyfin server access these files through local ethernet.
These files are not always accessable if the server is not up or network error.
This is not a problem if Jellyfin server keeps on as I disabled filesystem monitoring.
When connection restores, I can access my movies again on Jellyfin server.
But if Jellyfin server restarts at this time,I loses all midia metadata, Jellyfin server deletes all at startup.
Is there any way to keep the metadata if media files are not accessable when restarting Jellyfin?


RE: Jellyfin deletes all media metadata when unable to access media filles - TheDreadPirate - 2024-05-13

What OS is the jellyfin server running? If it is Linux there are ways to modify the service file to wait for certain conditions before starting Jellyfin.


RE: Jellyfin deletes all media metadata when unable to access media filles - cthunsfrd - 2024-05-14

Server OS: Centos7.9(runs on esxi6.7)
Jellyfin version : 10.8.10

Media files are mouted via cifs during server startup


RE: Jellyfin deletes all media metadata when unable to access media filles - TheDreadPirate - 2024-05-14

In the service file you can add "RequiresMountsFor=/your/cifs/mount/path"

The service file is located at

/etc/systemd/system/multi-user.target.wants/jellyfin.service

Using my service file as an example, you would add RequiresMountFor like this.

Code:
[Unit]
Description = Jellyfin Media Server
After = network-online.target

[Service]
RequiresMountsFor=/media/library
Type = simple
EnvironmentFile = /etc/default/jellyfin
User = jellyfin
Group = jellyfin
WorkingDirectory = /var/lib/jellyfin
ExecStart = /usr/bin/jellyfin $JELLYFIN_WEB_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLYFIN_ADDITIONAL_OPTS
Restart = on-failure
TimeoutSec = 15
SuccessExitStatus=0 143

[Install]
WantedBy = multi-user.target



RE: Jellyfin deletes all media metadata when unable to access media filles - cthunsfrd - 2024-05-15

Thanks, It works perfect,
after reboot jellyfin server keeps running but no longer deletes any metadata now.