I have a rather large library of movies gathered over the years (all entirely legally I assure you officer). I’m in the process of setting up a Jellyfin server so I can stream them on the go.

Currently it’s just one folder full of individual files but Jellyfin wants each movie within it’s own folder.

Is there a command, or set of commands, that would do this all in one go? ie iterate my way through a folder, create a new folder with the same name as a file, move that file into this new folder and repeat a few hundred times.

I am using Cachy OS (arch) and have Dolphin and yazi as file managers if that helps. I guess a bash script would be the best way to achieve this but my skills are quite rusty.

  • Winning@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    20 hours ago

    It does? I don’t do that with my jellyfin library. Are your file names ok? I just have 27 folders #A-Z and sort by first letter, ignoring A/The but keeping it in place in the filename. Works great

    I know the file manager Double Commander has a built in multi renamer that would be able to do this if you still want to.

    • Denjin@feddit.ukOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      19 hours ago

      The wiki advises a certain naming convention and folder structure (as linked by another user) and it’s a useful exercise in giving all my media a consistent structure as managing it personally has become a bit of a nightmare.

      • vithigar@lemmy.ca
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        1
        ·
        18 hours ago

        This isn’t strictly necessary. My movies library is a mix of both loose files and folders and works just fine.

        • Onomatopoeia@lemmy.cafe
          link
          fedilink
          English
          arrow-up
          4
          arrow-down
          1
          ·
          17 hours ago

          As your library grows, or becomes more complex, or contains anything that’s difficult to differentiate, Jellyfin will struggle to properly identify.

          With well-named folders (release date, imdbid), my Jellyfin server still has issues where it will mis-identify some things that arent mainstream. Old movies are specifically problematic, as are rare titles that have any similarity to something more popular.

          Using the folder naming structure reduced mis-identification tremendously.