I found the scanner files that likely need to be edited, within the file /Applications/Plex Media Server.app/Contents/Resources/Plug-ins-d34b464/Scanners.bundle/Contents/Resources/Series/Plex Series Scanner.py (my server is on a Mac) I found the block of code below:
# Make sure an episode name didn't make it into the show.
for rx in ends_with_episode:
show = re.sub(rx, '', show)
I believe this is stripping the name of the show from the filename while scanning which would result in the “24” being removed from the “S01E24”. I have tried commenting out that block, restarting the server, then scanning again but I’m still getting the same result. Is that the correct file to be editing for the scanner?
The file file can be view on GitHub: github.com/plexinc-plugins/Scanners.bundle/blob/master/Contents/Resources/Series/Plex%20Series%20Scanner.py
EDIT: Actually, it looks like that block of code is removing the name of the episode from the name of the show, I’m going to continue looking through the code for a solution.
EDIT 2: Here are log details from the scan for one of the seasons, all of the seasons perform the same way.
Oct 07, 2016 14:01:37.471 [0x7fffc99133c0] DEBUG - * Scanning directory /private/tmp/DATA/Videos/Television/24/Season 05 (parent: yes)
Oct 07, 2016 14:01:37.471 [0x7fffc99133c0] VERBOSE - * Noting that '24/Season 05' was updated at 2016-09-20 16:37:49
Oct 07, 2016 14:01:37.471 [0x7fffc99133c0] VERBOSE - * Taking directory '24/Season 05' (2197) out of the map (601 left)
Oct 07, 2016 14:01:37.500 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E01.mkv
Oct 07, 2016 14:01:37.500 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E02.mkv
Oct 07, 2016 14:01:37.501 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E03.mkv
Oct 07, 2016 14:01:37.502 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E04.mkv
Oct 07, 2016 14:01:37.502 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E05.mkv
Oct 07, 2016 14:01:37.503 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E06.mkv
Oct 07, 2016 14:01:37.503 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E07.mkv
Oct 07, 2016 14:01:37.504 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E08.mkv
Oct 07, 2016 14:01:37.504 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E09.mkv
Oct 07, 2016 14:01:37.505 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E10.mkv
Oct 07, 2016 14:01:37.505 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E11.mkv
Oct 07, 2016 14:01:37.506 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E12.mkv
Oct 07, 2016 14:01:37.506 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E13.mkv
Oct 07, 2016 14:01:37.507 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E14.mkv
Oct 07, 2016 14:01:37.507 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E15.mkv
Oct 07, 2016 14:01:37.508 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E16.mkv
Oct 07, 2016 14:01:37.508 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E17.mkv
Oct 07, 2016 14:01:37.508 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E18.mkv
Oct 07, 2016 14:01:37.509 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E19.mkv
Oct 07, 2016 14:01:37.509 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E20.mkv
Oct 07, 2016 14:01:37.510 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E21.mkv
Oct 07, 2016 14:01:37.510 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E22.mkv
Oct 07, 2016 14:01:37.511 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E23.mkv
Oct 07, 2016 14:01:37.511 [0x7fffc99133c0] DEBUG - Adding file for scanner: /private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E24.mkv
Oct 07, 2016 14:01:37.520 [0x7fffc99133c0] DEBUG - Directory had 24 files, database had 23 files, can't skip.
Oct 07, 2016 14:01:37.544 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 1
Oct 07, 2016 14:01:37.544 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E01.mkv]
Oct 07, 2016 14:01:37.545 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119757
Oct 07, 2016 14:01:37.545 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 2
Oct 07, 2016 14:01:37.545 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E02.mkv]
Oct 07, 2016 14:01:37.547 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119758
Oct 07, 2016 14:01:37.547 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 3
Oct 07, 2016 14:01:37.547 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E03.mkv]
Oct 07, 2016 14:01:37.548 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119759
Oct 07, 2016 14:01:37.549 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 4
Oct 07, 2016 14:01:37.549 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E04.mkv]
Oct 07, 2016 14:01:37.550 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119760
Oct 07, 2016 14:01:37.550 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 5
Oct 07, 2016 14:01:37.550 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E05.mkv]
Oct 07, 2016 14:01:37.552 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119761
Oct 07, 2016 14:01:37.552 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 6
Oct 07, 2016 14:01:37.552 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E06.mkv]
Oct 07, 2016 14:01:37.553 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119762
Oct 07, 2016 14:01:37.554 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 7
Oct 07, 2016 14:01:37.554 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E07.mkv]
Oct 07, 2016 14:01:37.555 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119763
Oct 07, 2016 14:01:37.555 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 8
Oct 07, 2016 14:01:37.555 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E08.mkv]
Oct 07, 2016 14:01:37.557 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119764
Oct 07, 2016 14:01:37.557 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 9
Oct 07, 2016 14:01:37.557 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E09.mkv]
Oct 07, 2016 14:01:37.558 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119765
Oct 07, 2016 14:01:37.559 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 10
Oct 07, 2016 14:01:37.559 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E10.mkv]
Oct 07, 2016 14:01:37.560 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119766
Oct 07, 2016 14:01:37.560 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 11
Oct 07, 2016 14:01:37.560 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E11.mkv]
Oct 07, 2016 14:01:37.561 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119767
Oct 07, 2016 14:01:37.562 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 12
Oct 07, 2016 14:01:37.562 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E12.mkv]
Oct 07, 2016 14:01:37.563 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119768
Oct 07, 2016 14:01:37.563 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 13
Oct 07, 2016 14:01:37.564 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E13.mkv]
Oct 07, 2016 14:01:37.565 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119769
Oct 07, 2016 14:01:37.565 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 14
Oct 07, 2016 14:01:37.565 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E14.mkv]
Oct 07, 2016 14:01:37.566 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119770
Oct 07, 2016 14:01:37.567 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 15
Oct 07, 2016 14:01:37.567 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E15.mkv]
Oct 07, 2016 14:01:37.568 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119771
Oct 07, 2016 14:01:37.568 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 16
Oct 07, 2016 14:01:37.568 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E16.mkv]
Oct 07, 2016 14:01:37.570 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119772
Oct 07, 2016 14:01:37.570 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 17
Oct 07, 2016 14:01:37.570 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E17.mkv]
Oct 07, 2016 14:01:37.571 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119773
Oct 07, 2016 14:01:37.572 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 18
Oct 07, 2016 14:01:37.572 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E18.mkv]
Oct 07, 2016 14:01:37.573 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119774
Oct 07, 2016 14:01:37.573 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 19
Oct 07, 2016 14:01:37.573 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E19.mkv]
Oct 07, 2016 14:01:37.575 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119775
Oct 07, 2016 14:01:37.575 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 20
Oct 07, 2016 14:01:37.575 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E20.mkv]
Oct 07, 2016 14:01:37.576 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119776
Oct 07, 2016 14:01:37.577 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 21
Oct 07, 2016 14:01:37.577 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E21.mkv]
Oct 07, 2016 14:01:37.578 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119777
Oct 07, 2016 14:01:37.578 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 22
Oct 07, 2016 14:01:37.578 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E22.mkv]
Oct 07, 2016 14:01:37.580 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119778
Oct 07, 2016 14:01:37.580 [0x7fffc99133c0] DEBUG - * Scanning 24 Season 5 Episode 23
Oct 07, 2016 14:01:37.580 [0x7fffc99133c0] DEBUG - Looking for path match for [/private/tmp/DATA/Videos/Television/24/Season 05/24 - S05E23.mkv]
Oct 07, 2016 14:01:37.581 [0x7fffc99133c0] DEBUG - Path matched, we're reusing media item 1119779