[FIXED] New Plex Movie agent break if folder naming in regex format `es\d\d[-_]\d+`

Server Version#: 1.23.2.4656 (docker)
Player Version#: 1.31.1.2262-74fdc6b7

After I upgrade to new Plex Movie agent when the UI remind me to upgrade the match recently, I can not use it to find new movies I added into my external drive. I create a new library and it will only find the movies I have added before. I have to change to legacy agent to make it find the new movies.

Here are logs when I scan the folder, it should have 3 movies, but non of them got added:

Jun 17, 2021 00:03:55.266 [0x7f5b5d6bab38] Debug β€” Library Updater: Requested that section 20 be updated, force=0, deep=0, subdir= iTunes=0
Jun 17, 2021 00:03:55.266 [0x7f5b5d6bab38] Debug β€” Library Updater: Queueing section 20
Jun 17, 2021 00:03:55.266 [0x7f5b5dc61b38] Debug β€” Activity: registered new activity f2d15381-98ad-4472-96f1-e3edaa200719 - "Scanning"
Jun 17, 2021 00:03:55.267 [0x7f5b5dc61b38] Debug β€” Scanning section 20
Jun 17, 2021 00:03:55.267 [0x7f5b5dc61b38] Debug β€” Activity: updated activity f2d15381-98ad-4472-96f1-e3edaa200719 - completed 0.0% - Scanning Movies
Jun 17, 2021 00:03:55.267 [0x7f5b5dc61b38] Debug β€” Job was already killed, not killing again.
Jun 17, 2021 00:03:55.267 [0x7f5b5e585b38] Debug β€” Completed: [127.0.0.1:56604] 200 GET /library/sections/20/refresh (7 live) GZIP 1ms 323 bytes (pipelined: 1)
Jun 17, 2021 00:03:55.267 [0x7f5b5dc61b38] Debug β€” Asked to cull library timeline before time 1623901435, we're starting with 118 items.
Jun 17, 2021 00:03:55.267 [0x7f5b5dc61b38] Debug β€” Library timeline cull complete with 118 items left.
Jun 17, 2021 00:03:55.267 [0x7f5b5dc61b38] Debug β€” Scanning Movies using en-US(Plex Movie) with 0 current media items and 1 section locations in the database.
Jun 17, 2021 00:03:55.267 [0x7f5b5dc61b38] Debug β€” Performing a scan with 'Plex Movie' (language: en-US virtual: 0).
Jun 17, 2021 00:03:55.267 [0x7f5b5dc61b38] Debug β€”   * Scanning /data/es14_3/movie/other

Jun 17, 2021 00:03:55.267 [0x7f5b5dc61b38] Debug β€” Scanner: Processing directory /data/es14_3/movie/other (parent: no)
Jun 17, 2021 00:03:55.267 [0x7f5b5dc61b38] Debug β€” Directory had 2 files, database had 0 files, can't skip.
Jun 17, 2021 00:03:55.268 [0x7f5b5dc61b38] Debug β€” Scanner: Processing directory /data/es14_3/movie/other/a-movie-folder (parent: yes)
Jun 17, 2021 00:03:55.268 [0x7f5b5dc61b38] Debug β€” Directory had 1 files, database had 0 files, can't skip.
Jun 17, 2021 00:03:55.268 [0x7f5b5dc61b38] Debug β€” Activity: updated activity f2d15381-98ad-4472-96f1-e3edaa200719 - completed 99.0% - Scanning Movies
Jun 17, 2021 00:03:55.269 [0x7f5b5dc61b38] Debug β€” Scanner [Plex Movie]: Idle and left with 0 media items.
Jun 17, 2021 00:03:55.269 [0x7f5b5dc61b38] Debug β€” Removing 0 media items that were left.
Jun 17, 2021 00:03:55.269 [0x7f5b5dc61b38] Debug β€” Removing 0 directories that were left.
Jun 17, 2021 00:03:55.270 [0x7f5b5dc61b38] Debug β€” Collections: Found 0 collections tags in section 20.
Jun 17, 2021 00:03:55.270 [0x7f5b5dc61b38] Debug β€” Collections: We had 0 collections in the library already.
Jun 17, 2021 00:03:55.270 [0x7f5b5dc61b38] Debug β€” Collections: Synced tags in section 20 in 0ms.
Jun 17, 2021 00:03:55.270 [0x7f5b5dc61b38] Debug β€” Collections: Refreshed attributes for 0 collections in section 20 in 0ms.
Jun 17, 2021 00:03:55.271 [0x7f5b5dc61b38] Debug β€” Collection: Refreshed visibility in section 20 in 0ms.
Jun 17, 2021 00:03:55.275 [0x7f5b5dc61b38] Debug β€” Collections: Refreshed attributes for 0 collections in section 20 in 4ms.
Jun 17, 2021 00:03:55.276 [0x7f5b5dc61b38] Debug β€” Activity: updated activity f2d15381-98ad-4472-96f1-e3edaa200719 - completed 100.0% - Scanning Movies
Jun 17, 2021 00:03:55.276 [0x7f5b5dc61b38] Debug β€” Refreshing section 20 of type: 1
Jun 17, 2021 00:03:55.277 [0x7f5b5d697b38] Debug β€” Refreshing 0 IDs.
Jun 17, 2021 00:03:55.280 [0x7f5b5dc61b38] Debug β€” Activity: registered new activity aeee2f46-a207-484a-8272-ee74f3d81d3d - "Processing subscriptions"
Jun 17, 2021 00:03:55.280 [0x7f5b5d4c7b38] Debug β€” Grabber: Cleaning up orphaned grabs.
Jun 17, 2021 00:03:55.283 [0x7f5b5d4c7b38] Debug β€” Grabber: Cleaned up 0 decrepit directories in 0.0 sec.
Jun 17, 2021 00:03:55.283 [0x7f5b5d4c7b38] Debug β€” Activity: registered new activity bd2385bf-a46f-45a9-83ba-b4cf74fcfed6 - "Processing subscriptions"
Jun 17, 2021 00:03:55.283 [0x7f5b5d4c7b38] Debug β€” Subscription: Scheduling subscriptions.
Jun 17, 2021 00:03:55.283 [0x7f5b5d4c7b38] Debug β€” Subscription: Initialized 0 schedulers.
Jun 17, 2021 00:03:55.283 [0x7f5b5d4c7b38] Debug β€” Subscription: Starting with 0 grabs, scheduled 0 active ones preemptively.
Jun 17, 2021 00:03:55.283 [0x7f5b5d4c7b38] Debug β€” Subscription: Scheduled all subscriptions in 0 ms.
Jun 17, 2021 00:03:55.283 [0x7f5b5d4c7b38] Debug β€” Activity: Ended activity bd2385bf-a46f-45a9-83ba-b4cf74fcfed6.
Jun 17, 2021 00:03:55.283 [0x7f5b5d4c7b38] Debug β€” Subscription: There are 0 active grabs at the end.
Jun 17, 2021 00:03:55.283 [0x7f5b5d4c7b38] Debug β€” Activity: Ended activity aeee2f46-a207-484a-8272-ee74f3d81d3d.
Jun 17, 2021 00:03:55.283 [0x7f5b5d4c7b38] Debug β€” Subscription: Refreshed all content in 3 ms.
Jun 17, 2021 00:03:55.283 [0x7f5b5dc61b38] Debug β€” Activity: Ended activity f2d15381-98ad-4472-96f1-e3edaa200719.

Is this path correct? That doesn’t look correct. How are the files in that folder named?

I modified the name when I post… Here they are:

-rwxr-xr-x 1 plex plex 47804665851 Jun 16 08:07 La.Haine.1995.UHD.BluRay.2160p.DTS-HD.MA.5.1.DV.HEVC.REMUX-FraMeSToR.mkv
-rwxr-xr-x 1 plex plex 47141842994 Jun 16 07:59 Le.Cercle.Rouge.1970.UHD.BluRay.2160p.FLAC.2.0.DV.HEVC.REMUX-FraMeSToR.mkv
drwxr-xr-x 2 plex plex      262144 Jun 16 23:41 Minari.2020.KOREAN.ENSUBBED.2160p.AMZN.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-SWTYBLZ

They can be detected by legacy scanner.

I don’t know how the old scanner deals with the naming thing, but jn order to use the new one, you’ll need to fix your naming scheme. Each movie has to be in its own folder

There is one folder there, and from log you can see it checks that folder a-movie-folder but still got nothing…

When I use legacy scanner, it can even get movies under nested/2nd level folders.

The new one too, but you’re mixing folders with files when you should have something like below:

Movies/
β”œβ”€β”€ La Haine (1995)
β”‚   └── La.Haine.1995.UHD.BluRay.2160p.DTS-HD.MA.5.1.DV.HEVC.REMUX-FraMeSToR.mkv
β”œβ”€β”€ Le Cercle (1970)
β”‚   └── Le.Cercle.Rouge.1970.UHD.BluRay.2160p.FLAC.2.0.DV.HEVC.REMUX-FraMeSToR.mkv
└── Minari (2020)
    └── Minari.2020.KOREAN.ENSUBBED.2160p.AMZN.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-SWTYBLZ.mkv

You can even move those first two to a folder β€œL”, for example.

Movies/
β”œβ”€β”€ L
β”‚   β”œβ”€β”€ La Haine (1995)
β”‚   β”‚   └── La.Haine.1995.UHD.BluRay.2160p.DTS-HD.MA.5.1.DV.HEVC.REMUX-FraMeSToR.mkv
β”‚   └── Le Cercle (1970)
β”‚       └── Le.Cercle.Rouge.1970.UHD.BluRay.2160p.FLAC.2.0.DV.HEVC.REMUX-FraMeSToR.mkv
└── M
    └── Minari (2020)
        └── Minari.2020.KOREAN.ENSUBBED.2160p.AMZN.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-SWTYBLZ.mkv

Thanks for the suggestion. But still does not work…

The new Movie agent can’t scan movie files in my new 14TB external drive, it works on my old 10TB external drive. I mount both of them into docker volume and I can check all the content inside docker.

Legacy agent works on both drives and TV agent works on both drives. Both drives have same exFat format with single partition. I did not find any difference… Anyone has any idea?

Yes - you have already been given the answer. Follow the support documents and rename your files according to those. Citing the old agent worked is not a reason to ignore the official documentation.

1 Like

Thanks. I have tried but did not work.

I think it may relate to docker and external drive but I can’t find the issue. Can post more log if someone can help to debug it.

  1. Rename your movies as suggested;
  2. Change the agent and scanner of your library to Plex movie as in the example below
  3. Share a screenshot of you Add Folders tab
  4. Post the .zip from the menu troubleshooting, not a redacted log

Thanks for the instruction! Here is the log:
Plex Media Server Logs_2021-06-20_16-07-50.zip (3.0 MB)

Here is Add Folders tab:

Here is the tree path of files:

/mnt/es14_3/movie/other
β”œβ”€β”€ La Haine (1995)
β”‚   └── La.Haine.1995.UHD.BluRay.2160p.DTS-HD.MA.5.1.DV.HEVC.REMUX-FraMeSToR.mkv
β”œβ”€β”€ Le Cercle (1970)
β”‚   └── Le.Cercle.Rouge.1970.UHD.BluRay.2160p.FLAC.2.0.DV.HEVC.REMUX-FraMeSToR.mkv
└── Minari (2020)
    └── Minari.2020.KOREAN.ENSUBBED.2160p.AMZN.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-SWTYBLZ.mkv

3 directories, 3 files

The /mnt/es14_3 is mounted under /data/es14_3 of official docker image.

You can always add the id to the folder name and then it will never fail. So…

La Haine (1995)

would become

La Haine (1995) {tmdb-406}

You can get the id from the url on the TMDB for the movie. Assuming of course your using the plex movie scanner and agent on the library.

Thanks for suggestion! Just tried but does not work…

Here is the current file tree:

/mnt/es14_3/movie/other
β”œβ”€β”€ La Haine (1995) {tmdb-406}
β”‚   └── La.Haine.1995.UHD.BluRay.2160p.DTS-HD.MA.5.1.DV.HEVC.REMUX-FraMeSToR.mkv
β”œβ”€β”€ Le Cercle Rouge (1970) {tmdb-11657}
β”‚   └── Le.Cercle.Rouge.1970.UHD.BluRay.2160p.FLAC.2.0.DV.HEVC.REMUX-FraMeSToR.mkv
└── Minari (2020) {tmdb-615643}
    └── Minari.2020.KOREAN.ENSUBBED.2160p.AMZN.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-SWTYBLZ.mkv

One thing I noticed: if I scan via legacy first, it will find the movies. And then I changed to the new scanner, movies will stay there and metadata will be refreshed (poster changed). But new scanner can not detect new movies I added into the folder…

Okay so one of two things is now happening.

1: Can you check the advanced tab on the library and confirmation the scanner and agent.
2: I notice you have mounted to /mnt. What permissions have you set on those folders and files?

My guess at this point is that if the scanner is correct then it’s a permission problem and plex cannot see the folders and/or files.

EDIT: BTW… I see on the screen shot above you mention /data while in other posts you mention /mnt. You sure your adding the right folders?

Thanks for help!

Here is the scanner and agent:

The /mnt is the path of host machine (Ubuntu), /data is path inside docker. Here is the permission for folders inside docker:

drwxr-xr-x 5 plex plex 131072 Jun 20 16:33  .
drwxr-xr-x 7 plex plex 131072 Jun 20 16:23  ..
drwxr-xr-x 2 plex plex 131072 Jun 20 16:27 'La Haine (1995) {tmdb-406}'
drwxr-xr-x 2 plex plex 131072 Jun 20 16:29 'Le Cercle Rouge (1970) {tmdb-11657}'
drwxr-xr-x 2 plex plex 131072 Jun 20 16:07 'Minari (2020) {tmdb-615643}'

Here are the permissions for files:

-rwxr-xr-x 1 plex plex 47804665851 Jun 16 08:07 La.Haine.1995.UHD.BluRay.2160p.DTS-HD.MA.5.1.DV.HEVC.REMUX-FraMeSToR.mkv
-rwxr-xr-x 1 plex plex 47141842994 Jun 16 07:59 Le.Cercle.Rouge.1970.UHD.BluRay.2160p.FLAC.2.0.DV.HEVC.REMUX-FraMeSToR.mkv
-rwxr-xr-x 1 plex plex 13388195938 Jun 16 01:30 Minari.2020.KOREAN.ENSUBBED.2160p.AMZN.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-SWTYBLZ.mkv

One more thing. I believe you cannot switch scanners/agents anymore. Maybe that could be causing your issues. Once a library uses the new scanner/agent it can’t be changed.

I wonder as a test if you delete you test library, empty trash etc… and then create again using the new agent does it work.

Hmm, I can still change scanners. But I changed it in another library. I created this brand new library β€œTest Library” for debugging and only use new scanner ever since for this library. It is still empty.

Very very odd. I’m only on my phone at the moment but could you upload some new logs and I’ll take a look later.

In the mean time maybe @ChuckPa or @OttoKerner if they had time could add some additional suggestions.

Sure! Here is the new logs:
Plex Media Server Logs_2021-06-20_16-59-02.zip (3.0 MB)

Really appreciate the help!