I am running into problems with the scanner when looking at old Dr Who episodes with a funny multi-part naming convention. Firstly, I don’t really want to rename all the files in my archive to conform to the current PLEX multi-part episode detection as it would break my existing torrents, secondly there appears to be a limit of only 8 parts per episide. Below are some sample file names:
Doctor Who - s01e01p1 - An Unearthly Child - An Unearthly Child.avi
Doctor Who - s01e01p2 - An Unearthly Child - The Cave of Skulls.avi
Doctor Who - s01e01p3 - An Unearthly Child - The Forest of Fear.avi
Doctor Who - s01e04p1R - Marco Polo - The Roof of the World.avi
Doctor Who - s01e04p2R - Marco Polo - The Singing Sands.avi
Doctor Who - s01e08p01 - The Reign of Terror - A Land Of Fear.avi
Doctor Who - s01e08p02 - The Reign of Terror - Guests Of Madame Guillotine.avi
Doctor Who - s01e08p03 - The Reign of Terror - A Change Of Identity.avi
Doctor Who - s01e08p04R - The Reign of Terror - The Tyrant Of France.avi
Doctor Who - s03e04p01 - The Dalek’s Master Plan - The Nightmare Begins (reconstructed).avi
…
Doctor Who - s03e04p12 - The Dalek’s Master Plan - Destruction of Time (reconstructed).avi
I don’t mind trying to chew this off on my own but I didn’t want to duplicate any work if this problem has already been solved. I don’t know python, but have programmed in just about everything else that is around.
If this has not already been fixed somewhere, does anybody know if the 8 part limit is a hard limit, or is it a soft limit that a little regex magic and logic can overcome?
thanks,
-DF
In the default series scanner, there are a regular expressions at the top of the scanner. I think you'd want to modify the first one given your naming convention. Note that Plex processes these sequentially, so whatever you do, make sure it comes first. I haven't walked through the code in a while, but that may be enough to get it to recognize the episodes so it will match them on TVDB. I suspect that you'll want to do something in the "Extract data" section to pick up the part and put it in a variable if you need it (or in case you need it). I'm not sure what other changes you might need to make in the scanner.
You may or may not need to make changes in the TVDB agent as well to handle multi-part shows. I'd start with the scanner and make sure it identifies the various parts correctly first. You'll need to figure out how to run it from the command line on your system so you can embed debug messages for yourself.
If you read C, Python isn't that hard.
Good luck.
Symlinks (or hardlinks) would allow you have two naming conventions for the same set of files. And you don’t even need to generate all of them by hand – you can parse the existing file names with a shell script pretty easily to generate all the necessary links in one go.
Hmmm… I just realized I may have misunderstood your question.
So, first note, where are you getting the metadata? TVDB lists these as separate episodes (e.g., Season 1 Episodes 1, 2 and 3), so even if you get Plex to process the names you have, you won’t get metadata from TVDB. It isn’t impossible to code around this (because you have to get the part number and add part-1 to the base episode number), but it is more complex.
Second, if you want PLEX to recognize these as parts and play the episodes continuously as if they were one, I believe that’s beyond the scanner/agent and into the Plex software itself (because neither seems to be looking at parts).
Given those two issues, you might be better off taking profplump’s suggestion and creating a directory of symlinks with a naming convention Plex likes.
Agreed. I looked over the scanners code and was met with something between wonder and horror. Lots of structure that I'm sure makes sense, but to the uninitiated the cost of entry was just too much. My solution was exactly that of profplump ... I installed a windows shell extension that makes hard/soft links accessible via the clicky-clicky interface (yes that is a technical term) and began experimenting. FYI, PLEX doesn't like soft-links ... not that there is anything wrong with that.
In my original Doctor Who problem set, I renamed the hard link episodes sequentially:
s01e01p01 -> s01e01
s01e01p02 -> s01e02
s01e02p01 -> s01e03
...
The scanner identified them correctly and we all had a happy day. Thanks for the support guys! And thanks for helping to keep PLEX awesome!
uh, am I the only one that sees the math problem with episode + part?
s01e01p01 -> s01e01 (1+1 = 2)
s01e01p02 -> s01e02 (1+2 = 3)
s01e01p03 -> s01e04 (1+3 = 4)
s01e02p01 -> s01e05 (2+1 = 3)
so your derrived episode numbers are wrong, and cannot actually be figured out by e+p since its dependant on how many parts the previous episode had. You would have to process them sequentially, and keep a running total. And, I really hope its the correct sequence every time because theres no way to check it until you watch the show and the "OOPS!" you gotta sort out the mess visually.
Ive got the same issue, with the same series actually. Im using filebot to rename and sort files, which also gets its panties wadded on multipart episodes.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.