tremby / jellyfin-find-duplicates

Find duplicate TV show episodes in a Jellyfin library
17 stars 2 forks source link

jellyfin-find-duplicates

Find duplicate TV show episodes in a Jellyfin library.

Usage

jellyfin-find-duplicates [-h] [--help]

Information is output about any duplicate episodes found. If the program exits with no output and a success status, no duplicates were found.

Options

Example output

Series "The Itchy and Scratchy Show" has duplicates:
  The Itchy and Scratchy Show S01E01
  - 1990-01-28T19:42:33-05:00: \\disk\shows\The Itchy and Scratchy Show\Season 01\The.Itchy.And.Scratchy.Show.S01E01.1080p.WEB.H264-MUNTZ.mkv
  - 1990-01-28T20:01:42-05:00: \\disk\shows\The Itchy and Scratchy Show\Season 01\the.itchy.and.scratchy.show.s01e01.proper.1080p.web-dl.h264-elbarto.mkv
  The Itchy and Scratchy Show S01E04
  - 1990-10-11T19:50:01-04:00: \\disk\shows\The Itchy and Scratchy Show\Season 01\The.Itchy.And.Scratchy.Show.S01E04.720p.HDTV.H.264.mPRiNCE.mkv
  - 1990-10-11T20:09:22-04:00: \\disk\shows\The Itchy and Scratchy Show\Season 01\the.itchy.and.scratchy.show.s01e04.1080p.web-dl.h264-elbarto.mkv
Series "Single Female Lawyer" has duplicates:
  Single Female Lawyer S01E01
  - 1999-11-07T20:00:05-05:00: \\disk\shows\Single Female Lawyer\Season 01\Single.Female.Lawyer.S01E01.480p.NTSC.h264-LRRR.mkv
  - 2000-01-22T14:17:06-05:00: \\disk\shows\Single Female Lawyer\Single.Female.Lawyer.S01.480p.NTSC.h264-LRRR\Single.Female.Lawyer.S01E01.480p.NTSC.h264-LRRR.mkv
  Single Female Lawyer S01E02
  - 1999-11-14T20:04:30-05:00: \\disk\shows\Single Female Lawyer\Season 01\Single.Female.Lawyer.S01E02.480p.NTSC.h264-LRRR.mkv
  - 2000-01-22T14:17:06-05:00: \\disk\shows\Single Female Lawyer\Single.Female.Lawyer.S01.480p.NTSC.h264-LRRR\Single.Female.Lawyer.S01E02.480p.NTSC.h264-LRRR.mkv
  Single Female Lawyer S01E03
  - 1999-11-21T19:48:50-05:00: \\disk\shows\Single Female Lawyer\Season 01\Single.Female.Lawyer.S01E03.480p.NTSC.h264-LRRR.mkv
  - 2000-01-22T14:17:06-05:00: \\disk\shows\Single Female Lawyer\Single.Female.Lawyer.S01.480p.NTSC.h264-LRRR\Single.Female.Lawyer.S01E03.480p.NTSC.h264-LRRR.mkv

Configuration

The file $XDG_CONFIG_HOME/jellyfin-find-duplicates.conf (which is usually ~/.config/jellyfin-find-duplicates.conf) is sourced as a bash script if it exists.

An example is distributed as jellyfin-find-duplicates.conf.example it can be copied into place with

cp jellyfin-find-duplicates.conf.example $XDG_CONFIG_HOME/jellyfin-find-duplicates.conf

and then edited.

The following variables are then expected to exist:

Dependencies

Compatibility

So far this is only tested on Linux. It may work on other platforms.

Contributing

Patches welcome.

Ideas: