# Bug: Plex doesn't respect folder naming for tv

**URL:** <https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634>\
**Category:** Metadata & Adding Files\
**Tags:** server-linux\
**Created:** [March 11, 2019, 9:36am UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634 "2019-03-11T09:36:30Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![raditokyo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/raditokyo/32/104310_2.png) [@raditokyo](https://forums.plex.tv/u/raditokyo)\
**Post date:** [March 11, 2019, 9:36am UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/1 "2019-03-11T09:36:30Z")

</div>

Server Version#: latest  
Player Version#:latest

How to reproduce bug:  
Create folders and files for TV per tvdb naming below:

/TV/V/V S01E01.MKV… Etc.

Then create another TV show per tvdb naming

/TV/V (2009)/S01E01.MKV… Etc.

You must have one of the TV show per matched and analyzed by plex. In this case V (2009) was already matched and analyzed before I newly added V.  
Create many other TV shows with similar naming, the only difference is their year air time,which per tvdb naming shows we must put year in bracket in the TV shows name.

Then scan plex.

Bug:  
Plex seems to ignore the year in bracket naming when matching TV shows and ends up matching to the wrong ones or combines two or more similarly named TV shows into one. This doesn’t always happen but when you have a lot of TV shows it happens more often.

Case tested for TV shows for example:  
V  
V (2009)  
Pure (2019)  
Coroner  
The Coroner  
Shameless US AND UK version, the office UK and Us version, etc.  
TV shows that has the same name for its drama and original Anime version of the two TV shows.

---

<div class="post-metadata">

**Author:** ![anon18523487](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon18523487](https://forums.plex.tv/u/anon18523487)\
**Post date:** [March 11, 2019, 6:11pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/2 "2019-03-11T18:11:30Z")

</div>

> [@raditokyo](#):
>
> /TV/V (2009)/S01E01.MKV… Etc.

You need to include the showname in the file.

---

<div class="post-metadata">

**Author:** ![raditokyo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/raditokyo/32/104310_2.png) [@raditokyo](https://forums.plex.tv/u/raditokyo)\
**Post date:** [March 11, 2019, 6:51pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/3 "2019-03-11T18:51:42Z")

</div>

I did. I didn’t write the file name correctly in above post as the problem is not about file naming but rather about the top folder naming of a show.

If you have drama and Anime with the same name of the show, and you follow tvdb naming fit the folder then plex will match it wrongly even when the file name is correct.

I just tested this with:  
Pure (2017)  
Pure (2019)  
Shameless (US)  
Shameless (UK)  
V  
V (2009)  
And many Japanese TV drama that has the same name as its original Japanese TV Anime show.

They all caused plex matching to not work properly.  
Plex seems to ignore folder naming despite files are name correctly just like the top folder

---

<div class="post-metadata">

**Author:** ![anon18523487](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon18523487](https://forums.plex.tv/u/anon18523487)\
**Post date:** [March 11, 2019, 6:56pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/4 "2019-03-11T18:56:41Z")

</div>

I’ve seen this happen if you add 2 similarly names shows at once. i.e. Adding V and V (2009) at the same time. However, if you add one at a time, they should match correctly. If not, I’ll need a specific example and the logs from PMS when try try adding that show.

---

<div class="post-metadata">

**Author:** ![raditokyo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/raditokyo/32/104310_2.png) [@raditokyo](https://forums.plex.tv/u/raditokyo)\
**Post date:** [March 11, 2019, 7:00pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/5 "2019-03-11T19:00:41Z")

</div>

Well I just tested exactly that cases and both show they matched wrongly.

For example I have the office UK and US version and they are always matched into one when I added them as the same time.

Another example with Japanese TV drama already matched and then I add Japanese TV Anime of the same name. And it was matched to completely different TV show!

All tests show plex doesn’t always take into consideration of the year when matching. Or article like the in The Coroner and Coroner TV show.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [March 11, 2019, 7:03pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/6 "2019-03-11T19:03:51Z")

</div>

If I may add here?

I have both versions of **The Flash**.

The original is listed as **The Flash** while the second is listed as **The Flash (2014)**

In order to guarantee TVDB queries are kept properly unique, **adding** the original series year **(1996)** to the naming works:

```auto
The Flash (1996)/
  Season 01/
    The Flash (1996) - S01E01 - Pilot.mkv

```

---

<div class="post-metadata">

**Author:** ![anon18523487](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon18523487](https://forums.plex.tv/u/anon18523487)\
**Post date:** [March 11, 2019, 7:04pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/7 "2019-03-11T19:04:37Z")

</div>

> [@raditokyo](#):
>
> For example I have the office UK and US version

Did you name these “The Office” and “The Office (US)”?

> [@raditokyo](#):
>
> Another example with Japanese TV drama already matched and then I add Japanese TV Anime of the same name. And it was matched to completely different TV show!

That sounds correct. Isn’t it?

> [@raditokyo](#):
>
> All tests show plex doesn’t always take into consideration of the year when matching. Or article like the in The Coroner and Coroner TV show.

Did you add the year?

---

<div class="post-metadata">

**Author:** ![raditokyo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/raditokyo/32/104310_2.png) [@raditokyo](https://forums.plex.tv/u/raditokyo)\
**Post date:** [March 11, 2019, 7:06pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/8 "2019-03-11T19:06:15Z")

</div>

> [@ChuckPa](#):
>
> In order to guarantee TVDB queries are kept properly unique, **adding** the original series year **(1996)** to the naming works:

But that’s the whole point of the problem. It used to work like that that’s why I have been following if that way. But now it doesn’t work like that anymore. Check the score when plex matching same name or similarly name with different year. The score is wonky.

---

<div class="post-metadata">

**Author:** ![anon18523487](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon18523487](https://forums.plex.tv/u/anon18523487)\
**Post date:** [March 11, 2019, 7:08pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/9 "2019-03-11T19:08:43Z")

</div>

I just tried The Coroner and Coronor and it worked for me.

![Untitled](https://global.discourse-cdn.com/plex/original/3X/7/9/796485c1aaaa59db6237f269ba8c7524148329c2.png)

---

<div class="post-metadata">

**Author:** ![anon18523487](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon18523487](https://forums.plex.tv/u/anon18523487)\
**Post date:** [March 11, 2019, 7:14pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/10 "2019-03-11T19:14:42Z")

</div>

V and V (2009) did not work but V (1983) and V (2009) does.

Matching is based on TheTVDB’s search API, which is the same they use on their website. They made changes several months back with the redesign of their website and their search results sometimes give different results now.

---

<div class="post-metadata">

**Author:** ![raditokyo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/raditokyo/32/104310_2.png) [@raditokyo](https://forums.plex.tv/u/raditokyo)\
**Post date:** [March 11, 2019, 7:15pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/11 "2019-03-11T19:15:10Z")

</div>

> [@anon18523487](#):
>
> Did you name these “The Office” and “The Office (US)”?
> 
> ![](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/raditokyo/40/104310_2.png) raditokyo:

I named then based on tvdb.  
I remember the only way to fix this issue was to do manual unmatch, click fix match, wait until it shows results for the wrong year, and then click and edit the name of the TV show and click search and then click the correct TV show.

> [@anon18523487](#):
>
> That sounds correct. Isn’t it?

No it was matched to completely different TV show that somehow has the highest scoring when matching.  
The way I solved it is like above.

> [@anon18523487](#):
>
> Did you add the year?

I add year in the folder and file name when tvdb do it like that.

So for my clarification, should we **always** add year in the folder and file name for both TV show?  
On tvdb they only add year for one of the TV show for which there is duplicate name.

If I have to add both to show with year, which interestingly I did do it this way then it presents different problem when searching especially with android voice search won’t match when TV show has duplicate name but different year and contain year in its naming…

---

<div class="post-metadata">

**Author:** ![anon18523487](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon18523487](https://forums.plex.tv/u/anon18523487)\
**Post date:** [March 11, 2019, 7:18pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/12 "2019-03-11T19:18:31Z")

</div>

> [@raditokyo](#):
>
> So for my clarification, should we **always** add year in the folder and file name for both TV show?

See my note above about the change to TheTVDB and my V example. It’s not necessarily required but their search hasn’t been the same so adding the year to both isn’t a bad idea.

---

<div class="post-metadata">

**Author:** ![raditokyo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/raditokyo/32/104310_2.png) [@raditokyo](https://forums.plex.tv/u/raditokyo)\
**Post date:** [March 11, 2019, 7:19pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/13 "2019-03-11T19:19:58Z")

</div>

> [@anon18523487](#):
>
> V and V (2009) did not work but V (1983) and V (2009) does.
> 
> Matching is based on TheTVDB’s search API, which is the same they use on their website. They made changes several months back with the redesign of their website and their search results sometimes give different results

So should I always add year on the folder name for both show?

I think what you stated is part of the problem.  
I’m and avid tvdb contributor I added many Japanese TV shows and fixed older TV show on tvdb website.  
My guess is that after something is majorly changed like usually the original creator put the wrong year or wrong TV network on tvdb and I fixed it plex matching does not always work.

If I may suggest please create a cache of tvdb database on plex server and have that as higher priority for matching when there’s duplicate naming.

And please change the plex matching scoring algorithm to consider year and English article

---

<div class="post-metadata">

**Author:** ![anon18523487](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon18523487](https://forums.plex.tv/u/anon18523487)\
**Post date:** [March 11, 2019, 7:26pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/14 "2019-03-11T19:26:22Z")

</div>

> [@raditokyo](#):
>
> If I may suggest please create a cache of tvdb database on plex server and have that as higher priority for matching when there’s duplicate naming

I don’t get it. That cache would just change with the changes to the original source, so how would that be any different from using TheTVDB directly? Plus, that DB is huge. I don’t think TheTVDB would want us making a copy on every Plex user’s server.

---

<div class="post-metadata">

**Author:** ![raditokyo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/raditokyo/32/104310_2.png) [@raditokyo](https://forums.plex.tv/u/raditokyo)\
**Post date:** [March 11, 2019, 7:29pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/15 "2019-03-11T19:29:31Z")

</div>

> [@anon18523487](#):
>
> I don’t get it. That cache would just change with the changes to the original source, so how would that be any different from using TheTVDB directly? Plus, that DB is huge. I don’t think TheTVDB would want us making a copy on every Plex user’s server.

I don’t know enough to provide solution for plex matching algorithm . I only know enough that the scoring becomes wonky when same or similarly named shows appear

---

<div class="post-metadata">

**Author:** ![anon18523487](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon18523487](https://forums.plex.tv/u/anon18523487)\
**Post date:** [March 11, 2019, 7:31pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/16 "2019-03-11T19:31:44Z")

</div>

It has to do with TheTVDB’s search. For example, if you search for “V”, it only returns the newer one. This wasn’t always the case before their change. For now, I would recommend adding the year to both/all shows that have a similar name. If there is a show in multiple languages, add “(language)” to the end of the name too.

---

<div class="post-metadata">

**Author:** ![AmazingRando24](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/amazingrando24/32/351517_2.png) [@AmazingRando24](https://forums.plex.tv/u/AmazingRando24)\
**Post date:** [March 11, 2019, 7:36pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/17 "2019-03-11T19:36:37Z")

</div>

Is it true that Plex tends to favor folder name over file name for matching the show?

And conversely, file name over folder structure for season/episode?

Any time I’ve ever had issues like this… V, Knight Rider, Lost in Space… I’ve found changing the folder name (by adding the year) solved the issue in all cases. But, what works for me may not work for everyone.

---

<div class="post-metadata">

**Author:** ![anon18523487](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon18523487](https://forums.plex.tv/u/anon18523487)\
**Post date:** [March 11, 2019, 7:42pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/18 "2019-03-11T19:42:39Z")

</div>

> [@AmazingRando24](#):
>
> Is it true that Plex tends to favor folder name over file name for matching the show?

No, it uses the filename first. But if there isn’t a good match, then it can use the folder as a backup to raise the match score.

i.e. - If you have a file named “Knight Rider”, you can’t override it by putting it in a “Lost in Space” folder.

---

<div class="post-metadata">

**Author:** ![raditokyo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/raditokyo/32/104310_2.png) [@raditokyo](https://forums.plex.tv/u/raditokyo)\
**Post date:** [March 11, 2019, 7:44pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/19 "2019-03-11T19:44:40Z")

</div>

> [@anon18523487](#):
>
> has to do with TheTVDB’s search. For example, if you search for “V”, it only returns the newer one. This wasn’t always the case before their change. For now, I would recommend adding the year to both/all shows that have a similar name. If there is a show in multiple languages, add “(language)” to the end of the name too.

While we are on the subject I would like to suggest plex to retrieve all posters and background images from tvdb regardless of the image specified language.  
This present user with choices to choose which poster and background they want regardless of the show and poster language.  
Most tvdb contributor doesn’t care about creating duplicate poster just to change language ID of the poster and so plex can’t retrieve any poster when there’s no poster in the language it currently search.

For example for many European and Japanese TV show, they have only posters in one tvdb language ID. these posters are interchangeable and can be used whether you matched them in English, or German or Japanese. But plex won’t retrieve this poster if it doesn’t match the language ID.

SO to be clear when a TV show is matched just retrieve all available posters from all languages. Plex can b default one like current behavior. Plex user can choose later from plex interface. But this solve greatly for most TV show that has only one or two poster in one tvdb language ID

---

<div class="post-metadata">

**Author:** ![anon18523487](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon18523487](https://forums.plex.tv/u/anon18523487)\
**Post date:** [March 11, 2019, 7:47pm UTC](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634/20 "2019-03-11T19:47:31Z")

</div>

> [@raditokyo](#):
>
> SO to be clear when a TV show is matched just retrieve all available posters from all languages.

Can’t easily be done. TheTVDB’s api only returns info based on the specific search, which is 1 language. We would have to search for each language separately, and when there is no data, wait for a return of 0 before moving on. This can take a long time to accomplish. And it could be a lot of data. Some don’t like the amount of data already being retrieved.

[Next page](https://forums.plex.tv/t/bug-plex-doesnt-respect-folder-naming-for-tv/386634.md?page=2)
