Thor 3 only works with the wrong file name

Server Version#:1.41.2.9200
Player Version#: 4.140.0

I have a single movie file for Thor 3: Ragnarok (2017). If I name the file something reasonable, it never shows up in the web player movie list even though I see it get detected in /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/Plex Media Server.log .

File names that have the problem above:
‘Thor 3: Ragnarok (2017).m4v’
‘Thor 3 - Ragnarok.m4v’

As a troubleshooting step, I moved the file outside the library folder, then name it something like ‘aaaaa.m4v’ and then move it back in, it will quickly and automatically show up in the web player media list and get auto-matched to Thor 3.

Great! Except the file is named aaaaa.m4v. So I renamed that file back to ‘Thor 3 - Ragnarok.m4v’. Within seconds, it disappeared from the web player.

Next, I moved it outside the file library again and renamed it to aaa123.m4v, then moved it back in. Within seconds, it’s auto-discovered again and added to the library as Thor 3.

For something new, did this:
ln -s abc123.m4v ‘Thor 3: Ragnarok.m4v’

Now I can have a reasonable file-level identifier for what aaa123.m4v really is. Nope. As soon as I did that, it automatically disappeared from the web player movie list again.

I’m stumped. From within the log directory, when I grep for the file name I only ever find it in the Plex Media Server.log file. I see Plex detecting my file renames/moves within seconds, but I’m baffled as to why this file only seems to show up when I use a bogus name.

FWIW ‘Thor 2 - The Dark World.m4v’ is working just fine…

Anyone seen anything like this before?

(next step, repeating steps above with debugging/verbose logging turned on)

In verbose mode, I see this at the end of my next move out/rename/move back/rename attempt, this time I renamed it from aabbcc.m4v to Thor3.m4v and got this:

Nov 17, 2024 23:49:59.526 [139922328927032] INFO - Part rename detected [/mnt/usb-media/Video/Movies/Action - Adventure/aabbcc.m4v] was renamed [/mnt/usb-media/Video/Movies/Action - Adventure/Thor3.m4v]
Nov 17, 2024 23:49:59.526 [139922328927032] DEBUG - Updating media item 126333, size=4933673033, metadata_item_id=109019
Nov 17, 2024 23:49:59.526 [139922328927032] DEBUG - Updating part with ID=132650 [/mnt/usb-media/Video/Movies/Action - Adventure/aabbcc.m4v]
Nov 17, 2024 23:49:59.527 [139922328927032] DEBUG - Hint name didn't match ('Thor3' != 'Aabbcc') for DB media item 126333
Nov 17, 2024 23:49:59.530 [139922328927032] DEBUG - Added new metadata item (Thor3) with ID 109020
Nov 17, 2024 23:49:59.531 [139922320726840] DEBUG - [LibraryTimeline] Scanner activity on section 1: 1 added, 0 deleted
Nov 17, 2024 23:49:59.533 [139922328927032] DEBUG - Calculated media file path for path [upload://]: ["/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/Movies/8/c8d03aedeaef9b052f9af6779893e483d0a706b.bund
le/Uploads"]
Nov 17, 2024 23:49:59.533 [139922328927032] DEBUG - Calculated media file path for path [upload://]: ["/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/Movies/3/379511e82c099315023546083eb0212405412a8.bund
le/Uploads"]
Nov 17, 2024 23:49:59.533 [139922328927032] ERROR - Couldn't copy file "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/Movies/8/c8d03aedeaef9b052f9af6779893e483d0a706b.bundle/Uploads/posters/com.plexapp.
agents.imdb_bebed8d1c0e2cc2578ac6eed4474efbe7a66c6fc" to "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/Movies/3/379511e82c099315023546083eb0212405412a8.bundle/Uploads/posters/com.plexapp.agents.imdb_be
bed8d1c0e2cc2578ac6eed4474efbe7a66c6fc": File exists
Nov 17, 2024 23:49:59.534 [139922335255352] DEBUG - Looking for path match for [/mnt/usb-media/Video/Movies/Action - Adventure/Three Musketeers.m4v]
Nov 17, 2024 23:49:59.534 [139922337364792] DEBUG - Native Scanner: Executed Local Metadata stage in 0.00 sec.
Nov 17, 2024 23:49:59.535 [139922335255352] DEBUG - Scanner [Plex Movie]: found existing media id 168
Nov 17, 2024 23:49:59.535 [139922335255352] DEBUG - Native Scanner: Executed Agent Match stage in 0.00 sec.
Nov 17, 2024 23:49:59.536 [139922328927032] DEBUG - Migrating metadata settings from plex://movie/5f408ed2768fc700405cf8bf -> plex://movie/5d776b0547dd6e001f6da17c
Nov 17, 2024 23:49:59.544 [139922328927032] DEBUG - Doing expensive tags write for 'Thor3' because something changed.
Nov 17, 2024 23:49:59.548 [139922328927032] DEBUG - Doing expensive tags write for 'Thor3' because something changed.
Nov 17, 2024 23:49:59.549 [139922328927032] DEBUG - Doing expensive tags write for 'Thor3' because something changed.
Nov 17, 2024 23:49:59.554 [139922328927032] DEBUG - Doing expensive tags write for 'Thor3' because something changed.
Nov 17, 2024 23:49:59.555 [139922328927032] DEBUG - Doing expensive tags write for 'Thor3' because something changed.
Nov 17, 2024 23:49:59.556 [139922328927032] DEBUG - Deleting media item 126333.
Nov 17, 2024 23:49:59.556 [139922263952184] DEBUG - Request: [127.0.0.1:43206 (Loopback)] GET /:/metadata/notify/changeItemState?librarySectionID=1&metadataItemID=142&metadataType=1&state=-1&parentID=-1&rootID=-1&mediaState=analyzing (9
 live) #18ebd GZIP Signed-in Token (jared744)
Nov 17, 2024 23:49:59.556 [139922538707768] DEBUG - Completed: [127.0.0.1:43206] 200 GET /:/metadata/notify/changeItemState?librarySectionID=1&metadataItemID=142&metadataType=1&state=-1&parentID=-1&rootID=-1&mediaState=analyzing (9 live
) #18ebd GZIP 10ms 195 bytes (pipelined: 1)
Nov 17, 2024 23:49:59.558 [139922328927032] DEBUG - Was connected to metadata item 109019, count is now 0.
Nov 17, 2024 23:49:59.562 [139922328927032] DEBUG - Destroying metadata item 109019 (MARVEL'S THOR: RAGNAROK - BLU-RAY)
Nov 17, 2024 23:49:59.564 [139922263952184] DEBUG - Request: [127.0.0.1:43206 (Loopback)] GET /:/metadata/notify/changeItemState?librarySectionID=1&metadataItemID=142&metadataType=1&state=-1&parentID=-1&rootID=-1&mediaState=idle (9 live
) #18edb GZIP Signed-in Token (jared744)
Nov 17, 2024 23:49:59.564 [139922538707768] DEBUG - Completed: [127.0.0.1:43206] 200 GET /:/metadata/notify/changeItemState?librarySectionID=1&metadataItemID=142&metadataType=1&state=-1&parentID=-1&rootID=-1&mediaState=idle (9 live) #18
edb GZIP 7ms 195 bytes (pipelined: 2)
Nov 17, 2024 23:49:59.573 [139922320726840] DEBUG - [LibraryTimeline] Scanner activity on section 1: 1 added, 1 deleted
Nov 17, 2024 23:49:59.582 [139922328927032] DEBUG - We are merging ID 109020 into ID 24410 ('Thor3'), moving over 1 media items.
Nov 17, 2024 23:49:59.582 [139922328927032] DEBUG -  * Moving over media item 126334.
Nov 17, 2024 23:49:59.583 [139922328927032] DEBUG - Updating media item 126334, size=4933673033, metadata_item_id=24410
Nov 17, 2024 23:49:59.583 [139922328927032] DEBUG - Updating part with ID=132651 [/mnt/usb-media/Video/Movies/Action - Adventure/Thor3.m4v]
Nov 17, 2024 23:49:59.584 [139922328927032] DEBUG - Updating metadata item (save) (Thor 3: Ragnarok - Sakaar) with ID 24410
Nov 17, 2024 23:49:59.588 [139922328927032] DEBUG - Updating deletion state for metadata item 24410, is has a dead item count of 0.
Nov 17, 2024 23:49:59.588 [139922328927032] DEBUG - Now whacking metadata item 109020 since we gave away its media items
Nov 17, 2024 23:49:59.588 [139922549181240] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Media Scanner' exit code for process 829222 is 0 (success)
Nov 17, 2024 23:49:59.588 [139922313640760] DEBUG - Killing job.
Nov 17, 2024 23:49:59.588 [139922313640760] DEBUG - Signalling job ID 829222 with 9
Nov 17, 2024 23:49:59.589 [139922313640760] DEBUG - LongRunningJobManager [CreditsDetector]: scheduling job for item 142, 0 pending.
Nov 17, 2024 23:49:59.589 [139922328927032] DEBUG - Destroying metadata item 109020 (Thor3)
Nov 17, 2024 23:49:59.589 [139922313640760] DEBUG - Media Analyzer: Background analysis completed in 0.4 seconds, removing 1 IDs

Next step, how do I find those assets that got merged and unmerge them?

I copied a test file to “Thor: Ragnarok (2017).mp4”. This would match better to the TMDB name. After copying it to my Movies library, it was picked up and detected correctly.

1 Like

Thank you @napolij for the fast reply! That was one of the file names I tried earlier but I appreciate the effort.

I found that 2 files are getting merged. This one and "Thor 3 - Ragnarok - Sakaar.m4v’

But there are also other Thor3 extras files and those aren’t getting merged. Maybe I can turn off merging somewhere.

I typically have no movie extras. Just a wild guess, but move all the Ragnarok related extras/moves of the library, then add Thor: Ragnarok and see if it is detected correctly. Then try adding your extras. Perhaps the matching/merging will act differently.

Plex DocumentationYour Media
Naming & Organizing Your Movie Files
Local Files for Movie Trailers and Extras

For movies, use the name as it appears at TMDB or IMDB. For illegal characters (colon, etc.), use a space, not a dash. If you really want to name it differently, Thor 3 vs Thor Ragnarok (2017) you can add the TMDB/IMDB ID to the folder and file name (see docs).

See docs for how to organize extras. Personally, I use the subdirectories. Easy and it always works.

@napolij Yup, moving them all out and moving them all back in worked, sort of. The main movie and that same extra got merged again, but now the main movie is the main one.

@FordGuy61 I am sure you’re right, I need to reorganize. It’s just been working fine this way for so long and I would rather not rename all my files. If I can find a way to turn off the merging completely that seems like it’d be simpler.

Thank you both!

There is no way to turn off merging.

You don’t have to rename the entire library all at once. I started with the ones that gave me problems, then attacked the others a few at a time.

There are many tools to help with renaming. Here’s a shortlist. I use Tiny Media Manager. The free version works quite well.

Many people use Filebot. It is quite powerful and can rename an entire library in minutes.

TMM Renamer Patterns:

  • Show Name: ${showTitle} (${showYear})
  • Season: Season ${seasonNr2}
  • Episode Name: ${showTitle} (${showYear}) s${seasonNr2}e${episodeNr2} ${episode.title}
  • Movie Name: ${title} (${year}) {imdb-${imdb}}

PowerRenamer in Microsoft Power Tools is helpful for simple renaming with pattern matches or regular expressions. It makes quick work of tasks such as adding a year to file names, removing undesirable text from multiple files, etc

Oof – I just searched for duplicates, and it looks like I’m going to have to do some renaming for sure.

I just found these two merged, from two different folders:
/mnt/usb-media/Video/Movies/Action - Adventure/Robin Hood.m4v
/mnt/usb-media/Video/Movies/Animated/Robin Hood.m4v

Completely different movies.

I’ve got some work to do.

It’s truly impossible to turn off merging or manually split them to be different assets? Bummer! But, I suppose I really only need to rename the ones that get merged. Maybe that’s good enough for now.

Thanks again.

Thank you for those renamer recommendations. I’ll check them out for sure.

I recommended one a few months that was completely free but I don’t recall the name of it, Lol. Search the forum for “free file renamer”

You can always Split Apart combined files then use Fix Match to correctly match things.

However, if you ever need to make a new library, add a new server, etc. the files will probably be re-combined.

Robin Hood is a good example. There are probably 50+ movies that start with “Robin Hood.” Without the year, Plex has no idea which one is on your server.

Add the year to the file names then re-scan the library. If Plex does not separate them, Plex Dance both movies to clear out incorrect matching info from the database.

My canned response is to see https://support.plex.tv/articles/naming-and-organizing-your-movie-media-files/ and:
If you want to save yourself a lot of time I would recommend using archive.tinymediamanager.org and use ${title} (${year}) {imdb-${imdb}} as the new name format.

Folder format:
${title} (${year})

(Please note I linked to the v3 which is free to use)

FYI mounting the media share to your computer and using TMM you can do several thousand movies in an hour or two.

Use the plex manual to name your files appropriately.

FWIW ‘Thor 2 - The Dark World.m4v’ is working just fine…

Sometimes even inappropriately named content, you get lucky and it works, but that is not a guaranteed.

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