[Ubuntu 16.04.6] Inconsistent matching of TV Episodes despite consistent naming schema

Server Version#: 1.20.1.3252
Player Version#: n/a

I have begun to have problems with new TV Shows that are not matching data for specific episodes despite them being named consistently with others that are matching correctly.

I have tried clearing the agent cache (https://support.plex.tv/articles/202967376-clearing-plugin-channel-agent-http-caches/) as well as removing the show/update library/readd/update library.

One of the shows that isn’t working is Mrs. America. My folder structure is /Mrs. America/Season 01/Mrs.America.S01E0# for each of the files which are all .mkv, valid files from the same source. Only episodes 1, 2 and 7 are being identified.

I have attached the log that indicates:

2020-09-19 15:20:18,691 (7f0ac0ff9700) : INFO (init:926) - No media for season 1 episode 3 - skipping population of episode data
2020-09-19 15:20:18,692 (7f0ac0ff9700) : INFO (init:926) - No media for season 1 episode 4 - skipping population of episode data
2020-09-19 15:20:18,692 (7f0ac0ff9700) : INFO (init:926) - No media for season 1 episode 5 - skipping population of episode data
2020-09-19 15:20:18,692 (7f0ac0ff9700) : INFO (init:926) - No media for season 1 episode 6 - skipping population of episode data
2020-09-19 15:20:18,693 (7f0ac0ff9700) : INFO (init:926) - No media for season 1 episode 8 - skipping population of episode data
2020-09-19 15:20:18,693 (7f0ac0ff9700) : INFO (init:926) - No media for season 1 episode 9 - skipping population of episode data

Any help or advice would be much appreciated!

com.plexapp.agents.thetvdb.log (11.3 KB)

Need full logs ZIP please and the file names exactly as they exist to show one example of the failure.

Thanks for the quick reply @ChuckPa! Here is the file list and I have attached the full zip.

Mrs.America.S01E01.REPACK.Phyllis.720p.AMZN.WEB-DL.DDP5.1.H.264-NTb.mkv
Mrs.America.S01E02.REPACK.Gloria.720p.AMZN.WEB-DL.DDP5.1.H.264-NTb.mkv
Mrs.America.S01E03.REPACK.Shirley.720p.AMZN.WEB-DL.DDP5.1.H.264-NTb.mkv
Mrs.America.S01E04.Betty.720p.AMZN.WEB-DL.DDP5.1.H.264-NTb.mkv
Mrs.America.S01E05.Phyllis.Fred.Brenda.Marc.720p.AMZN.WEB-DL.DDP5.1.H.264-NTb.mkv
Mrs.America.S01E06.Jill.720p.AMZN.WEB-DL.DDP5.1.H.264-NTb.mkv
Mrs.America.S01E07.Bella.720p.AMZN.WEB-DL.DDP5.1.H.264-NTb.mkv
Mrs.America.S01E08.Houston.720p.AMZN.WEB-DL.DDP5.1.H.264-NTb.mkv
Mrs.America.S01E09.Reagan.720p.AMZN.WEB-DL.DDP5.1.H.264-NTb.mkv

Plex Media Server Logs_2020-09-19_15-41-14.zip (5.1 MB)

Thank you for the logs.

They show what I expected to find – The scanner is having trouble selecting which pieces of characters to use for identification.

May I take a moment and point out how terribly non-compliant those names are?

  1. There is no clear delimiter between series name and episode identifier
  2. that’s just a mash of characters which you can read but, for as good as the automaton is, it can’t get everything.

The proper way Plex expects media to be named for series can be found here.

https://support.plex.tv/articles/naming-and-organizing-your-tv-show-files/

As example of matching with good naming (which was nearly instant)

[chuck@lizum tv.341]$ ls -lR Mrs.\ America/
Mrs. America/:
total 28
drwxr-xr-x 2 chuck chuck 4096 Sep 19 19:00 Season 01/
drwxr-xr-x 2 chuck chuck 4096 Sep 19 19:00 Season 02/
drwxr-xr-x 2 chuck chuck 4096 Sep 19 19:00 Season 03/
drwxr-xr-x 2 chuck chuck 4096 Sep 19 19:00 Season 04/
drwxr-xr-x 2 chuck chuck 4096 Sep 19 19:00 Season 05/
drwxr-xr-x 2 chuck chuck 4096 Sep 19 19:00 Season 06/
drwxr-xr-x 2 chuck chuck 4096 Sep 19 19:00 Season 07/

Mrs. America/Season 01:
total 80
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E01.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E02.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E03.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E04.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E05.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E06.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E07.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E08.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E09.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E10.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E11.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E12.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E13.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E14.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E15.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E16.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E17.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E18.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E19.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S01E20.mkv

Mrs. America/Season 02:
total 80
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E01.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E02.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E03.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E04.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E05.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E06.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E07.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E08.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E09.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E10.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E11.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E12.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E13.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E14.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E15.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E16.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E17.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E18.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E19.mkv
-rw-r--r-- 1 chuck chuck 272 Sep 19 19:00 Mrs. America - S02E20.mkv

That said, I respectfully suggest you consider using a naming automation tool like FileBot or TheRenamer to help you clean up the names.

  1. Consistent - per specification - naming
  2. Better matches
  3. Faster matching.

Thanks for clarifying the issue at hand and for taking the time to test on your own. What I don’t understand is why it matches some but not all of the episodes when they are all named in the exact same manner. The only difference is some contain the phrase REPACK but 2 of those are matched while the 3rd is not.

While I understand having consistent naming I must respectfully disagree and suggest that having Title.S01.E# with periods instead of spaces should be sufficient. There might be some cases where users want to preserve original file names that adhere to a consistent format such as this or avoid spaces all together. What is surprising is that I have not had any other problems with the hundreds of other shows named in this manner in my Library. Is there anything else that can be done with the matching algorithms to navigate punctuation and other media identifying tags in the filename when the title and season/episode numbers are present?

@ChuckPa apologies for not getting this but I read https://support.plex.tv/articles/naming-and-organizing-your-tv-show-files/ and it indicates

The important bit in the file name is the appropriate season and episode number notation s02e17 which in this example means Season 2 Episode 17 It does not matter if you use dashes, dots or just spaces.

as well as

  • Many of our naming instructions mention having Optional_Info at the end of the file name. As the label suggests, it’s optional, but many people like to use it for things such as an episode title; such optional info is ignored by Plex when matching content.

Again, apologies for pressing this matter but not being able to scrape shows named with periods and with optional info after the title and episode number is a deal breaker for my library!

While I can appreciate wanting to get rid of spaces if one’s using the command line all the time but there MUST be a clear delimiter in the sequence.

The problem with making it all one token is precisely that — It’s all one token (blob of characters).

May I offer this script?

This is what I use to test user matching problems.

To use it:

  1. Create a new directory somewhere to hold the test files
  2. Edit Dir= at the top of the script to point to it.
  3. Create a new “Testing” library section - type TV Shows - pointing to it.
  4. In the command line:
make-series 'Quoted name the exact way you want it to appear'  [Num_seasons [num_episodes]]

By default, it stamps out 7 seasons and 20 episodes each.

[chuck@lizum tv.343]$ cat ~/bin/make-series
#!/bin/sh

# Make a fake TV series for match and metadata debugging

Dir=/vie/qa/tv

if [ "x$1" = "x" ]; then
  echo Usage:  $0 Name \(Remember to use \" or \'  as needed \) \[number of seasons\] \[Episodes/Season\]
  exit 1
fi

Name="$1"

# Get Season count
Seasons=7
if [ "x$2" != "x" ]; then
  Seasons=$2
fi

# Get Episode count
Episodes=20
if [ "x$3" != "x" ]; then
  Episodes=$3
fi


# add upper limit if given
if [ "$2" = "" ]; then
 Limit=07
else
 Limit=$2
fi

S=1
while [ $S -le $Seasons ]; 
do

  # Prepare Season
  Season="$S"

  # Pad
  if [ $S -lt 10 ]; then
    Season="0${S}"
  fi

  echo Making \"${1}/Season ${Season}\"
  mkdir -p "${Dir}/${1}/Season ${Season}"
  
  E=1
  while [ $E -le $Episodes ]; 
  do
 
    EpisodeNum=$E
    if [ $E -lt 10 ]; then
      EpisodeNum="0$EpisodeNum"
    fi

    echo $(uuidgen)  $(uuidgen)  $(uuidgen) `date` $1 this is must some stuff to make the file long enough to not be skipped `date` $1 > "${Dir}/${1}/Season ${Season}/${1} - S${Season}E${EpisodeNum}.mkv"

    E=$(($E + 1))
  done

  S=$(($S + 1))
done
echo Done

[chuck@lizum tv.344]$ 

As for space mitigation – the tab key works very nicely.

In:

[chuck@lizum tv.344]$ cd /vie/qa/tv/Mrs.\ America/Season\ 02/Mrs.\ America\ -\ S02E

I tapped the tab key three times to get this far. Now it’s waiting for a digit selection

Lastly, To make your test series:

make-series "Mrs. America"

Thanks @ChuckPa your script is very cool. I also understand that the tab key works to navigate files and directories with spaces but the part I am struggling with is the requirement for spaces. The support page indicates:

Standard, Season-Based Shows

Most television shows have episodes organized into seasons. To name season-based shows create files with the season and episode notation SXXEXX

  • /TV Shows/ShowName/Season 02/ShowName – s02e17 – Optional_Info.ext

This is only an example. The important bit in the file name is the appropriate season and episode number notation s02e17 which in this example means Season 2 Episode 17 It does not matter if you use dashes, dots or just spaces.

I understand the need for a clear delimiter but I am still not understanding why
“Mrs.America.S01E03” is not scraping correctly with a period as outlined on the support page.

If all Plex needs is the title, season and episode number isn’t a period a fair request as a delimiter? :slight_smile:

The problem with your usage:

Mrs <DOT> America <DOT> S02E17 <DOT>

<Dot> is a valid delimiter however:

Mrs - is not the name of a series
America is not a valid Season-Episode expression.

See how the automation can get confused?

In my script, if you want to use dots.

Change:

to not be skipped `date` $1 > "${Dir}/${1}/Season ${Season}/${1} - S${Season}E${EpisodeNum}.mkv

To be:

to not be skipped `date` $1 > "${Dir}/${1}/Season ${Season}/${1}.S${Season}E${EpisodeNum}.mkv"

I use periods all the time but I do preserve the spaces where required.

Here is an example of what’s happening using your technique.

Thanks @ChuckPa that is much more clear. SeriesName has to be a text string without a delimiter.

I am not entirely convinced that is the only problem at hand however. I am also experiencing the issue with the last show I added. Plex only shows 7 episodes as being identified

image

But there are clearly 10 episodes in the /DAVE/Season 01/ folder:

Dave.S01E01.720p.AMZN.WEB-DL.DD+5.1.H.264-iKA.mkv
Dave.S01E02.720p.AMZN.WEB-DL.DD+5.1.H.264-iKA.mkv
Dave.S01E03.720p.AMZN.WEB-DL.DD+5.1.H.264-iKA.mkv
Dave.S01E04.720p.AMZN.WEB-DL.DD+5.1.H.264-iKA.mkv
Dave.S01E05.720p.AMZN.WEB-DL.DD+5.1.H.264-iKA.mkv
Dave.S01E06.720p.AMZN.WEB-DL.DD+5.1.H.264-iKA.mkv
Dave.S01E07.720p.AMZN.WEB-DL.DD+5.1.H.264-iKA.mkv
Dave.S01E08.720p.AMZN.WEB-DL.DD+5.1.H.264-IKA.mkv
Dave.S01E09.720p.AMZN.WEB-DL.DD+5.1.H.264-IKA.mkv
Dave.S01E10.720p.AMZN.WEB-DL.DD+5.1.H.264-IKA.mkv

(sorry for another such file list I promise I am not trying to upset you!)

Given that I haven’t had a problem with the other shows in my library is there anything else that could be at play here?

In this case, I would do two things:

  1. Check the file permissions. Make certain PMS can read them
  2. If permissions are fine, “Plex Dance” the series.
    (move out to an unmonitored area, scan files, empty trash, clean bundles, move media back, scan files again and allow to match)

Thanks @ChuckPa. I just wanted to follow up on this thread in case it can benefit anyone else.

As it turns out it was a permissions issue with Sonarr hence some episodes resolving (manually moved) while others did not (imported automatically).

In Sonarr’s settings under “Media Management” which requires “Advanced Settings” to be toggled there are options to set file permissions which I have updated to suite my needs. Everything is now working as intended and Plex has no problem managing all of the filenames mentioned in this thread.

Thanks again @ChuckPa I sure appreciate your tireless effort in supporting questions here. I have read through many that seem as silly in retrospect as mine was but the reality is I would not have come by the solution as easily as I did without your help, something I am very grateful for!

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