tremby / jellyfin-find-duplicates

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

[FR]Auto remove "null" entry #1

Open rexzhang opened 4 months ago

rexzhang commented 4 months ago

like this

Series "TV Show" has duplicates:
  TV Show S01E01
  - 2023-01-18T14:54:04+08:00: /media/tv-series/TV Show/TV.Show.1989.S01E01.1080p.BluRay.x264.DD5.1-FGT.mkv
  - 2023-11-29T16:00:04+08:00: null
  TV Show S01E02
  - 2023-01-18T14:54:03+08:00: /media/tv-series/TV Show/TV.Show.1989.S01E02.1080p.BluRay.x264.DD5.1-FGT.mkv
  - 2023-11-29T16:00:04+08:00: null
tremby commented 4 months ago

I've never seen a null path appear.

I can think of 4 scenarios:

  1. You do have a duplicate file and it's a problem with this script. Can you find out what's going wrong? see what you have in $DUPE after line 120. Maybe the Jellyfin API gives the path information on a different key in some circumstances. Is there anything special about how your library is set up?
  2. You do have a duplicate file but the Jellyfin API isn't providing the path for some reason. See what you have in $DUPE after line 120 to verify, and maybe it's something we raise to the Jellyfin developers.
  3. You don't have a duplicate file, and the Jellyfin API is doing nothing wrong, but this script has produced a new row through some bug. Can you help debug? What was in $DUPES after line 115?
  4. You don't have a duplicate file, but the Jellyfin API is giving an entry it shouldn't. This seems like a bug on the Jellyfin side, whether it's choking on something wrong in your library or not. What is in $DUPLICATES_JSON after line 111?

I'll need your help on any of these since I can't replicate this issue on my end.

rexzhang commented 4 months ago

What happens to me is that I upload a video file in one format to an episode, then delete the video file, and at the same time upload a video file in another format (with a different filename). If you upload the second version first and then delete the first one, it will also happen.

tremby commented 4 months ago

Does the null clear away if you tell jellyfin to update your library?

rexzhang commented 4 months ago

Does the null clear away if you tell jellyfin to update your library?

No, May you can refer to this link