Issues with having multiple editions of a multi-part movie using hard links

I have a disc with two cuts of a movie using seamless branching. I’d ideally like to have both in the server, but since they only differ by about 4 minutes, storing each edition as a single file would require nearly double the disk space. My goal is to just store the individual parts for each edition and let Plex stitch them together, and use hard links so that the parts that are shared between the editions are only actually stored once.

I’ve tried some obvious approaches to naming the files, but when I “Scan Library Files” I seem to end up with only one of the editions in the library. Sometimes if I “Scan Library Files” again it’ll flip to the other edition, but so far I haven’t managed to get both into the library at the same time.

So far none of these file layouts has worked. Note that the two “pt1” files are hard-linked to the same underlying file, and likewise for the two “pt3” files:

Swamp Thing (1982) {edition-PG}
  Swamp Thing (1982) {edition-PG} - pt1.mkv
  Swamp Thing (1982) {edition-PG} - pt2.mkv
  Swamp Thing (1982) {edition-PG} - pt3.mkv
Swamp Thing (1982) {edition-Unrated}
  Swamp Thing (1982) {edition-Unrated} - pt1.mkv
  Swamp Thing (1982) {edition-Unrated} - pt2.mkv
  Swamp Thing (1982) {edition-Unrated} - pt3.mkv
Swamp Thing (1982) {edition-PG}
  Swamp Thing (1982) - pt1.mkv
  Swamp Thing (1982) - pt2.mkv
  Swamp Thing (1982) - pt3.mkv
Swamp Thing (1982) {edition-Unrated}
  Swamp Thing (1982) - pt1.mkv
  Swamp Thing (1982) - pt2.mkv
  Swamp Thing (1982) - pt3.mkv
Swamp Thing (1982)
  Swamp Thing (1982) {edition-PG} - pt1.mkv
  Swamp Thing (1982) {edition-PG} - pt2.mkv
  Swamp Thing (1982) {edition-PG} - pt3.mkv
  Swamp Thing (1982) {edition-Unrated} - pt1.mkv
  Swamp Thing (1982) {edition-Unrated} - pt2.mkv
  Swamp Thing (1982) {edition-Unrated} - pt3.mkv

Maybe I’m missing something obvious. Or maybe the server is using inode numbers internally and getting confused by the hard links?

Has somebody ever tried to fix this and other problems with multi-part movies? :wink:
It’s not really hard to do some smart book-keeping for watched status on multi-part files. Everybody could do it. It just needs the right prioritizing on the developers’ end.

Really… with xy parts (ranging from 1 to the maximum allowed part number) - each of them having an individual length, the play/resume logic can easily deduct part length to find the correct part to play at the correct moment. There’s nothing special in handling multi-part media if you include one-part movies into the same logic.

This would even work if a multi-part movie becomes concatenated while it’s been partly watched.

The problem which @dododge summarizes looks like a scanner problem - not being able to properly combine the concept of editions with multiple part handling. Something that can be also worked at.

Actually yeah I’m not sure I’ve ever sat down and watched one of my multi-part movies; up to this point I’ve only used the technique for extra-long ones that were split across multiple physical discs, and I count only about a dozen in my collection.

Since this one only has three segments it seemed like an easy candidate to try to mimic seamless branching. If it ends up not working in practice then I guess I’ll go back to my old “only keep one edition on the server” approach. This multi-part method would get me the second edition with less than 2GB of extra storage, but remuxing them to single files would use an additional 55GB.

The only way to keep them separate is to name the edition or cut of each movie. Example is: Halloween (1978) {Theatrical} . You upload that file first and load it into Plex. Once found name the edition to Theatrical and save. Now upload the 2nd cut Halloween (1978) {Extended Cut} and add that to Plex and name the new cut in the Edition section. Now both are there and you can choose which ever one you would like to watch.

I also know that if you want the 2 cuts to be under one file…as far as I know, it’s not possible for Plex or any software to do that (from a player standpoint). They just read the file and even a regular blu-ray player doesn’t have that capability, but it would be nice if you could do that. Someone may have done it. I wish you luck and hope that helps.

It’s 64 KB instead of 4. And the file size is also taken into account. So, no, that would not cause the concatenated version to get detected as a dupe.
See How is Plex hash calculated? - #5 by gbooker02

1 Like

The only way to keep them separate is to name the edition or cut of each movie.

That works fine if they’re single files, for example I’ve got three variants of Dirty Work and didn’t have to do anything special other than put different edition tags in the file names. They were all picked up by the same “Scan Library Files” run, and the movie shows up three times in the app:

Dirty Work (1998) {edition-Dirtier Cut}.mkv
Dirty Work (1998) {edition-PG-13 Cut}.mkv
Dirty Work (1998) {edition-Video Assembly Cut}.mkv

As far as multi-part files, I did some more experiments. This layout does work if every part is unique:

Swamp Thing (1982) {edition-PG}
  Swamp Thing (1982) - pt1.mkv
  Swamp Thing (1982) - pt2.mkv
  Swamp Thing (1982) - pt3.mkv
Swamp Thing (1982) {edition-Unrated}
  Swamp Thing (1982) - pt1.mkv
  Swamp Thing (1982) - pt2.mkv
  Swamp Thing (1982) - pt3.mkv

But if any individual part is hard-linked, it only picks up one edition, and every time I “Scan Library Files” again it deletes the edition it already has and then adds the other one. I tried various tests with only one part hard-linked and it didn’t matter if it was the first, middle, or last piece – it never worked.

However, I also tried making a copy of one of the parts, with byte-identical content and all of the same timestamps and such, and that did work. So presumably the server is using the inode number somehow to keep track of files during the scan, and when it runs into two files with the same inode it gets confused.

Aside: I don’t think it cares about the link count. I have a separate directory tree where makemkv puts everything, and then I hard-link the files into the plex directory tree giving them plex-style names without removing or renaming them in the makemkv tree. So basically all of my media files already have a link count of at least 2, and the server has never had a problem with that. But this is the first time I’ve tried having two links to the same file within the plex tree.

I finally got around to watching Swamp Thing with this multi-part layout, and now I see what the issues are with playback, ugh. It does play, but there’s a very visible glitch and discontinuity when it switches parts, including my projector bouncing into SDR mode for a moment before going back to HDR. And when I tried to back up to watch the part change-over again, it wouldn’t reverse into the previous part. And after finishing the movie the home screen still showed it as only played up through the first part.

This was with the app on an NVIDIA shield. I guess these problems are “known” but it certainly puts a damper on using parts for seamless branching, even if I could get the hard links to work.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.