# Bug :.plexmatch doesn't recognize media files under Multi-level directory

**URL:** <https://forums.plex.tv/t/bug-plexmatch-doesnt-recognize-media-files-under-multi-level-directory/874305>\
**Category:** Metadata & Adding Files\
**Tags:** server-linux, server-docker\
**Created:** [April 6, 2024, 7:22pm UTC](https://forums.plex.tv/t/bug-plexmatch-doesnt-recognize-media-files-under-multi-level-directory/874305 "2024-04-06T19:22:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaedeair](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kaedeair](https://forums.plex.tv/u/kaedeair)\
**Post date:** [April 6, 2024, 7:22pm UTC](https://forums.plex.tv/t/bug-plexmatch-doesnt-recognize-media-files-under-multi-level-directory/874305/1 "2024-04-06T19:22:31Z")

</div>

Server Version#: 1.40.1.8227

#### Directory structure in docker container:

```auto
/dir1
	/dir2
		/dir3
            /tv
                /series1
					some mp4 files
                /series2
                    /Season1 title
						some mp4 files
                    /Season2 title
                        .plexmatch
						some mp4 files
                        /SPs
                            media1.mp4
                            media2.mp4

```

#### .plexmatch content:

```auto
Title: series2 title
Season: 2
ep:SP01:SPs/media1.mp4
ep:SP02:SPs/media2.mp4
# another attempt
Pattern:SPs/media{sp}.mp4

```

#### Library:

Type: `TV Shows`

Folder added: only `/dir1/dir2/dir3/tv`

#### Bug manifestation：

`media1.mp4` and `media2.mp4`not in library, `.plexmatch` doesn’t working.

It works when I move directory `Season2 title` into `tv` like this:

```auto
/dir1
	/dir2
		/dir3
            /tv
                /series1
					some mp4 files
                /series2
                    /Season1 title
						some mp4 files
                /Season2 title
                    .plexmatch
                    some mp4 files
                    /SPs
                        media1.mp4
                        media2.mp4

```

It also works after created another `.plexmatch` under `SPs`.

#### Other attempt

I have renamed the folders to short name in file path. It is not length of path caused the problem.

## Log

[Plex Media Server Logs\_2024-04-08\_14-26-04.zip](https://forums.plex.tv/uploads/short-url/7duMFpvmRbl0zUMKawKGp7goYLw.zip) (280.8 KB)

##### What I did:

1. Move three folders ( 3 seasons of Magia Record ) into `/htpc/tr/anime/tv/`
2. Rename `/htpc/tr/anime/tv/[philosophy-raws][Angel Beats!]/Bonus/` to `Boonus/`,and modified `.plexmatch` correctly.
3. Scan the library
4. The files appear in library
5. Undo step 1 and 2
6. The files in step 4 are missing

##### .plexmatch content:

`/htpc/tr/anime/tv/[SweetSub&EnkanRec&VCB-Studio] Magia Record/[SweetSub&EnkanRec&VCB-Studio] Magia Record [Ma10p_1080p]/.plexmatch`

> ```auto
> Title: Magia Record
> Season:1
> Pattern: [SweetSub&EnkanRec&VCB-Studio] Magia Record [{ep}][Ma10p_1080p]*.mkv
> Pattern: SPs/[SweetSub&EnkanRec&VCB-Studio] MagiRepo [{sp}][Ma10p_1080p][x265_flac].mkv
> 
> ```

`/htpc/tr/anime/tv/[SweetSub&EnkanRec&VCB-Studio] Magia Record/[SweetSub&EnkanRec&VCB-Studio] Magia Record 2nd SEASON [Ma10p_1080p]/.plexmatch`

> ```auto
> Title: Magia Record
> Season: 2
> Pattern: [SweetSub&EnkanRec&VCB-Studio] Magia Record 2nd SEASON [{ep}][Ma10p_1080p]*.mkv
> Pattern: SPs/[SweetSub&EnkanRec&VCB-Studio] Magia Record 2nd SEASON [S1 Recap {sp,1-3,+12}][Ma10p_1080p][x265_flac].mkv
> ep: SP16: SPs/[SweetSub&EnkanRec&VCB-Studio] Magia Record 2nd SEASON [S2 Recap][Ma10p_1080p][x265_flac].mkv
> ep: SP17: SPs/[SweetSub&EnkanRec&VCB-Studio] Magia Record 2nd SEASON [TVSP][Ma10p_1080p][x265_aac].mkv
> 
> ```

`/htpc/tr/anime/tv/[SweetSub&EnkanRec&VCB-Studio] Magia Record/[SweetSub&EnkanRec&VCB-Studio] Magia Record Final SEASON [Ma10p_1080p]/.plexmatch`

> ```auto
> Title: Magia Record
> Season: 3
> Pattern: [SweetSub&EnkanRec&VCB-Studio] Magia Record Final SEASON [{ep}][Ma10p_1080p][x265_flac_aac].mkv
> ep: SP18: SPs/[SweetSub&EnkanRec&VCB-Studio] Magia Record Final SEASON [S1&S2 Recap][Ma10p_1080p][x265_flac].mkv
> ep: SP19: SPs/[SweetSub&EnkanRec&VCB-Studio] Magia Record Final SEASON [S2 Recap][Ma10p_1080p][x265_flac].mkv
> 
> ```

`/htpc/tr/anime/tv/[philosophy-raws][Angel Beats!]/.plexmatch`

> ```auto
> Title: Angel Beats!
> Pattern: [philosophy-raws][Angel Beats!][{ep}][BDRIP][HEVC Main10P FLAC][1920X1080].mkv
> ep:SP02: [philosophy-raws][Angel Beats!][OVA1][BDRIP][HEVC Main10P FLAC][1920X1080].mkv
> ep:SP03: Bonus/[philosophy-raws][Angel Beats!][Another Epilogue][BDRIP][HEVC Main10P FLAC][1920X1080].mkv
> ep:SP05: [philosophy-raws][Angel Beats!][OVA2][BDRIP][HEVC Main10P FLAC][1920X1080].mkv
> 
> ```

---

<div class="post-metadata">

**Author:** ![kaedeair](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kaedeair](https://forums.plex.tv/u/kaedeair)\
**Post date:** [April 7, 2024, 6:43pm UTC](https://forums.plex.tv/t/bug-plexmatch-doesnt-recognize-media-files-under-multi-level-directory/874305/2 "2024-04-07T18:43:43Z")

</div>

#### Another Bug

```auto
/tv
	/series1
		.plexmatch
		some mkv files
		/Bonus
			media.mkv

```

The scanner can’t find the `media.mkv`. The log tells there are 18 files in directory, but 46 mkv files in fact. It says ` Adding subdirectory for scanner /tv/series1/Bonus`, but no processing found after this message. The scanner found out the file, after renamed directory `Bonus` to `Boonus` and modified `.plexmatch` correctly.

---

<div class="post-metadata">

**Author:** ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)\
**Post date:** [April 8, 2024, 9:56am UTC](https://forums.plex.tv/t/bug-plexmatch-doesnt-recognize-media-files-under-multi-level-directory/874305/3 "2024-04-08T09:56:40Z")

</div>

My personal recommendation: stop trying to make plexmatch work. It is a crutch, and will never fully work as you expect. Particularly with bonus content.  
Furthermore, it will severely slow down library scanning.

`Bonus` and `extras` as folder names will ensure that their content is ignored by Plex:  
[https://support.plex.tv/articles/201381883-special-keyword-file-folder-exclusion/](https://support.plex.tv/articles/201381883-special-keyword-file-folder-exclusion/)

If you want Plex to show bonus content as such, you need to tell plex what these files are: [https://support.plex.tv/articles/local-files-for-tv-show-trailers-and-extras/](https://support.plex.tv/articles/local-files-for-tv-show-trailers-and-extras/)

There is no good reason not to adopt the plex way of naming media, because all the major media servers/players do support it.

[https://support.plex.tv/articles/categories/your-media/](https://support.plex.tv/articles/categories/your-media/)

---

<div class="post-metadata">

**Author:** ![kaedeair](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kaedeair](https://forums.plex.tv/u/kaedeair)\
**Post date:** [April 8, 2024, 1:19pm UTC](https://forums.plex.tv/t/bug-plexmatch-doesnt-recognize-media-files-under-multi-level-directory/874305/4 "2024-04-08T13:19:53Z")

</div>

Thank you for reminding me of the special keyword. There are a few files from Season 0 and `NCOP/ED` in the `Bonus` directory, but only Season 0 is needed. It’s common for Season 0 to be included as a bonus with animation DVDs or Blu-ray discs.

There’s a real need to use plexmatch. Renaming files is difficult due to persistent seeding for private trackers. Before using plexmatch, I had used hard links to solve the problem. However, it resulted in synchronization issues when managing files, which required me to spend more time on them.

---

<div class="post-metadata">

**Author:** ![kaedeair](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kaedeair](https://forums.plex.tv/u/kaedeair)\
**Post date:** [April 8, 2024, 2:08pm UTC](https://forums.plex.tv/t/bug-plexmatch-doesnt-recognize-media-files-under-multi-level-directory/874305/5 "2024-04-08T14:08:09Z")

</div>

[Match Hinting for TV Series | Plex Support](https://support.plex.tv/articles/plexmatch/)  
According the article, `Bonus` isn’t keyword in plexmatch.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [July 7, 2024, 2:08pm UTC](https://forums.plex.tv/t/bug-plexmatch-doesnt-recognize-media-files-under-multi-level-directory/874305/6 "2024-07-07T14:08:47Z")

</div>

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