• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support General Questions Jellyfin deletes all media metadata when unable to access media filles

     
    • 0 Vote(s) - 0 Average

    Jellyfin deletes all media metadata when unable to access media filles

    cthunsfrd
    Offline

    Junior Member

    Posts: 8
    Threads: 4
    Joined: 2023 Jul
    Reputation: 0
    Country:China
    #1
    2024-05-13, 03:52 AM (This post was last modified: 2024-05-13, 03:53 AM by cthunsfrd. Edited 1 time in total.)
    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?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-05-13, 12:11 PM
    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.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    cthunsfrd
    Offline

    Junior Member

    Posts: 8
    Threads: 4
    Joined: 2023 Jul
    Reputation: 0
    Country:China
    #3
    2024-05-14, 12:42 PM
    Server OS: Centos7.9(runs on esxi6.7)
    Jellyfin version : 10.8.10

    Media files are mouted via cifs during server startup
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-05-14, 02:37 PM
    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
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    cthunsfrd
    Offline

    Junior Member

    Posts: 8
    Threads: 4
    Joined: 2023 Jul
    Reputation: 0
    Country:China
    #5
    2024-05-15, 12:06 PM
    Thanks, It works perfect,
    after reboot jellyfin server keeps running but no longer deletes any metadata now.
    AntonyF
    Offline

    Junior Member

    Posts: 5
    Threads: 2
    Joined: 2024 Mar
    Reputation: 0
    Country:United Kingdom
    #6
    2025-01-14, 12:00 PM
    Hi there, after my collections data keeps disappearing I've worked out from threads here and the above info that the issue is I'm using Windows, Windows reboots whenever the damn well hell it wants and my media is on mounted drivers for which I need to provide passwords.

    So the drives aren't accessible on reboot, and the collections are wiped.

    Is there a Windows equivalent of the above, the RequireMounts thing? Or a suggested solution? I guess I could just tell Jellyfin not to start on boot, but wondered if there was a preferred solution.

    Thanks in advance!
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #7
    2025-01-14, 02:49 PM
    I don't think there is an equivalent solution. The issue the OP of this thread had was a matter of startup order. Jellyfin was starting before another process connected to their network storage. So we configured Jellyfin to wait a bit for those processes to finish before starting Jellyfin.

    Your circumstance requires you to enter a password to, I assume, decrypt the drives. And I'm not sure there is any other solution other than to, as you stated, configure Jellyfin to not start on boot.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    theguymadmax
    Offline

    Community Moderator

    Posts: 1,009
    Threads: 0
    Joined: 2024 Jun
    Reputation: 58
    #8
    2025-01-14, 02:58 PM
    (2025-01-14, 12:00 PM)AntonyF Wrote: Hi there, after my collections data keeps disappearing I've worked out from threads here and the above info that the issue is I'm using Windows, Windows reboots whenever the damn well hell it wants and my media is on mounted drivers for which I need to provide passwords.

    So the drives aren't accessible on reboot, and the collections are wiped.

    Is there a Windows equivalent of the above, the RequireMounts thing? Or a suggested solution? I guess I could just tell Jellyfin not to start on boot, but wondered if there was a preferred solution.

    Thanks in advance!

    There’s a task that runs on startup to remove items from collections and playlists if they aren’t detected. You can find it in the Dashboard under Scheduled Tasks – look for "Clean up collections and playlists" under "Maintenance".

    To stop it from running on startup, simply delete the "on application startup" trigger. After that, you can either manually run the task or set your own custom trigger.
    AntonyF
    Offline

    Junior Member

    Posts: 5
    Threads: 2
    Joined: 2024 Mar
    Reputation: 0
    Country:United Kingdom
    #9
    2025-02-01, 06:32 PM
    Thank you, much appreciated!
    « Next Oldest | Next Newest »

    Users browsing this thread: 2 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode