Jellyfin Forum
Archive list script - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Off Topic (https://forum.jellyfin.org/f-off-topic)
+--- Forum: General Discussion (https://forum.jellyfin.org/f-general-discussion)
+--- Thread: Archive list script (/t-archive-list-script)



Archive list script - laughing_man77 - 2024-02-17

Hi all,

Archiving videos on Jellyfin - just create an new Library named "Archive" and add your new archive disks as you create then. You can then add each archive disk as volumes to the new library. They will remain in the library, even when unmounted. I would recommend that you configure the "Archive" library to save metadata to disk - that saves a lot of time scanning when remounting the disks.

There is one minor gotcha if you use Jellyfin in docker - the docker-compose.yml file will need a permanent directory to mount (so you cannot use /media/<user>/<volume_name>. In that situation, you will need to setup fstab yo mount each archive disk to a location like /mnt/<volume_name> and you you can then volume mount from that location. Also note that you will need to run docker compose down/up for Jellyfin to recognise the changes.

However, how do you know what is on each archive disk? You don't want to have to mount/unmount each archive disk to find what you want.

The solution is to have a spreadsheet that contains sheets for each archive disk, so that you can globally search for the video that you want and the mount the correct disk. This also helps when you have a guest over: "Ooooh, do you have this movie?"... "Hmmm, it's not in my collection. let me see if I archived it..." (and view the archive in a nice readable format, rather than just a long list of filenames)!

As a major time saver, I created a set of bash scripts to generate CSV files for any directory that you want, which can then be imported into a spreadsheet. It also contains summary data of space used/remaining so that you can quickly see if there's space to archive another video.

It is currently quite specific to the Jellyfin file naming structure, but this is quite similar to Plex and Kodi. However, I'm happy to update the scripts to include anything non-Jellyfin.

I've made the repository public, so anyone can use it, fork it and create bug/feature requests: 

I'd love to hear any feedback anyone has, or improvements that I can make  Grinning-face


RE: Archive list script - laughing_man77 - 2024-02-18

I've just pushed fixes to tv_list.sh, and also added an optional scan for the video resolution (if it's not in the filename) in both scripts.

This now means that if you turn on DETECT_RESOLUTION in the new .env file, there is a dependency on ffmpeg and jq.


RE: Archive list script - laughing_man77 - 2024-02-27

v2.0.0 has just been released. This includes better confguraton, video and audio columns, merge scripts into a single script, better integration with plex and kodi naming conventions and structure, etc


RE: Archive list script - laughing_man77 - 2024-03-02

The last breaking change has just been released (v.3.0.0) - https://github.com/laughingman77/video_list_csv/releases/tag/v3.0.0

Apologies for any inconvenience. V2.0.0 still works fine, but V3.0.0 is now fully POSIX compliant and it runs in the sh shall rather than the bash shell, so more portable to most systems. But that means there are no arrays by default, so I had to update the configuration array for columns in the .env, which are now are pseudo arrays.

The code has now been optimised, and if you're relying on the video scan, rather tn filenames, then it will be at least x2 faster!