Local file subtitles disappear from plex app after "Scan Library Files"

Server Version#: 1.29.1.6260
Player Version#: 1.54.2.3267-d35cd36f Plex for Mac

Hey, I’m running into an issue with “Plex Movie” Scanner for my Movies library. I have directories for movies, and inside each directory I have a video file and a subtitle file. Both named correctly. When I add a new subtitle file to my library, this file is visible in the Plex application. But after some time, after the “Scan Library Files” action is executed, either manually or on schedule, those local subtitles files are no longer visible in Plex UI. I found that I can re-add them by running “Manage Library → Refresh All Metadata” on the whole library or just “Refresh Metadata” on a specific movie.

I think that this behavior is a bug somewhere in the “Scan Library Files” as I don’t believe it should be causing those subtitles to disappear. Not sure what is the best way of raising such bugs, that’s why I’m creating a new topic here. Happy to open up an issue somewhere else if there are more suitable places.

Thanks for a great software!

DEBUG log files (the ZIP) which captures this are needed.

What’s being described sounds like a permissions issue but could be naming.

Hey, here are server logs. Around 2022-09-30 17:51I ran “Scan Library Files” which made by subtitles based on external files to dissapear, and then I ran “Analyze Metadata” for movie “Batman” which caused external subtitles to be visible again in the Plex UI.

REMOVING LOG FILE

here’s a troublesome folder named nzbget that’s scanned I think, and you can see it cause issues with The Outfit for example:

Sep 30, 2022 12:50:19.894 [0x7ff3f8a89b38] ERROR - [Req#3a58] [Notify] Failed to remove watcher (22: Invalid argument)
Sep 30, 2022 12:50:19.894 [0x7ff3f8a89b38] ERROR - [Req#3a58] Failed to remove watch for "/data/nzbget/download/Movies/The.Card.Counter.2021.1080p.BluRay.x264-REDACTED" (22)


Sep 30, 2022 17:51:30.394 [0x7ff3f630ab38] DEBUG - [MetadataAgent/tv.plex.agents.movie] Found 1 provider matches for 'The Outfit (2022)'.
Sep 30, 2022 17:51:30.394 [0x7ff3f630ab38] DEBUG - Scanner [Plex Movie]: found cloud match for file '/data/media/Movies/The Outfit (2022)/The Outfit (2022) 2160p.mkv': 'The Outfit'
Sep 30, 2022 17:51:30.394 [0x7ff3f630ab38] DEBUG - Native Scanner: Executed Cloud Match stage in 0.09 sec.
Sep 30, 2022 17:51:30.395 [0x7ff3f630ab38] DEBUG - Looking for path match for [/data/media/Movies/The Outfit (2022)/The Outfit (2022) 2160p.mkv]
Sep 30, 2022 17:51:30.396 [0x7ff3f630ab38] DEBUG - Checking by hash to see if we can find a match with 0c92ef9e4d3dc5e46e81476aff30abe428d0e03d (display offset: 0, not part -1)
Sep 30, 2022 17:51:30.396 [0x7ff3f630ab38] DEBUG - We found a hash match for [/data/media/Movies/The Outfit (2022)/The Outfit (2022) 2160p.mkv] which was [/data/nzbget/download/Movies/The.Outfit.2022.2160p.WEB-DL.HDR.DTS-HD.MA.5.1.H265-SHD/The.Outfit.2022.2160p.WEB-DL.HDR.DTS-HD.MA.5.1.H265-SHD.mkv].
Sep 30, 2022 17:51:30.398 [0x7ff3f630ab38] INFO - Part rename detected [/data/nzbget/download/Movies/The.Outfit.2022.2160p.WEB-DL.HDR.DTS-HD.MA.5.1.H265-SHD/The.Outfit.2022.2160p.WEB-DL.HDR.DTS-HD.MA.5.1.H265-SHD.mkv] was renamed [/data/media/Movies/The Outfit (2022)/The Outfit (2022) 2160p.mkv]
Sep 30, 2022 17:51:30.399 [0x7ff3f630ab38] DEBUG - Updating media item 4619, size=16710910037, metadata_item_id=1926
Sep 30, 2022 17:51:30.399 [0x7ff3f630ab38] DEBUG - Updating part with ID=76178 [/data/nzbget/download/Movies/The.Outfit.2022.2160p.WEB-DL.HDR.DTS-HD.MA.5.1.H265-SHD/The.Outfit.2022.2160p.WEB-DL.HDR.DTS-HD.MA.5.1.H265-SHD.mkv]
Sep 30, 2022 17:51:30.400 [0x7ff3f630ab38] DEBUG - Turbo analysis on modified item 4619 [/data/nzbget/download/Movies/The.Outfit.2022.2160p.WEB-DL.HDR.DTS-HD.MA.5.1.H265-SHD/The.Outfit.2022.2160p.WEB-DL.HDR.DTS-HD.MA.5.1.H265-SHD.mkv]
Sep 30, 2022 17:51:30.401 [0x7ff3f630ab38] DEBUG - Updating media item 4619, size=33421820074, metadata_item_id=1926
Sep 30, 2022 17:51:30.401 [0x7ff3f630ab38] DEBUG - Updating part with ID=76178 [/data/nzbget/download/Movies/The.Outfit.2022.2160p.WEB-DL.HDR.DTS-HD.MA.5.1.H265-SHD/The.Outfit.2022.2160p.WEB-DL.HDR.DTS-HD.MA.5.1.H265-SHD.mkv]

two logs filled with errors about items not existing for all episodes of a season, maybe because of permissions?:

Sep 30, 2022 12:39:38.045 [0x7ff3fbf3db38] ERROR - Couldn't get size of file "/data/media/TV Shows/Upload/Season.02/Upload.S02E06.2160p.mkv": boost::filesystem::file_size: No such file or directory: "/data/media/TV Shows/Upload/Season.02/Upload.S02E06.2160p.mkv"
Sep 30, 2022 12:39:38.045 [0x7ff3fbf3db38] ERROR - Couldn't get size of file "/data/media/TV Shows/Upload/Season.02/Upload.S02E05.2160p.mkv": boost::filesystem::file_size: No such file or directory: "/data/media/TV Shows/Upload/Season.02/Upload.S02E05.2160p.mkv"
Sep 30, 2022 12:39:38.045 [0x7ff3fbf3db38] ERROR - Couldn't get size of file "/data/media/TV Shows/Upload/Season.02/Upload.S02E07.2160p.mkv": boost::filesystem::file_size: No such file or directory: "/data/media/TV Shows/Upload/Season.02/Upload.S02E07.2160p.mkv"

and a lot of naming issues

Sep 30, 2022 12:49:04.129 [0x7ff3fa6d3b38] ERROR - Couldn't get size of file "/data/media/Movies/No Time to Die (2021)/No Time to Die (2021) 1080p.mkv": boost::filesystem::file_size: No such file or directory: "/data/media/Movies/No Time to Die (2021)/No Time to Die (2021) 1080p.mkv"
Sep 30, 2022 12:49:04.129 [0x7ff3fa6d3b38] ERROR - Couldn't get size of file "/data/media/Movies/No Time to Die (2021)/No Time to Die (2021) 2160p.mkv": boost::filesystem::file_size: No such file or directory: "/data/media/Movies/No Time to Die (2021)/No Time to Die (2021) 2160p.mkv"

Sep 30, 2022 14:09:05.366 [0x7ff3fa4d0b38] INFO - Library section 1 (Movies) will be updated because of a change in "/data/media/Movies/Eternals (2021)/Eternals (2021) 1080p.en.srt"
Sep 30, 2022 14:09:14.957 [0x7ff3fa4d0b38] INFO - Library section 1 (Movies) will be updated because of a change in "/data/media/Movies/The Outfit (2022)/The Outfit (2022) 2160p.pl.srt"
Sep 30, 2022 14:09:17.409 [0x7ff3fa4d0b38] INFO - Library section 1 (Movies) will be updated because of a change in "/data/media/Movies/Ron's Gone Wrong (2021)/Ron's Gone Wrong (2021) 1080p.pl.srt"

Looks fixable :slight_smile:

Cool thanks very much for your help! Indeed putting files in the right directory structure fixed the issue. My post-processing script was putting two video files into the same movie directory if I had two releases with different resolution. For example “The Batman/The Batman 2140p.mkv” & “The Batman/The Batman 1080p.mkv”. I changed my post processing to put them into different directories and now Plex identifies everything correctly.

On a related note, was there any discussion about exposing such file naming errors to the user in Plex UI? That’s great that such information is available in the debug log, but I guess not many users read them. It might be helpful if I saw some information about errors in my file scanner somewhere in the Plex UI.

You’re welcome, glad to help a bit. :slight_smile:
Interesting question on exposing naming issues to the user in the GUI. You could search the forums to see if anything has been suggested. I’ve not seen that.

The Getting Started Guides aren’t prominent on the website, but most eventually find the articles that are basically the user manual.

The Plex website Articles contain numerous guides about setting up the server, especially the first half dozen or so about “naming” you find using their search box. I have not seen the following mentioned in any article, though, that it’s problematic to let Plex see any folder used to store in-progress downloads.

It looks like /data/nzbget/download/ was causing tons of ERRORs. Did you remove that from any list of folders Plex can see? I’m pretty sure you intend to keep all your films in /media. The log errors were about the same exact file in two places, in /data and in /media over and over, as the file grew iirc.

Hey, yeah I mostly removed the nzbget directory from my Plex library. I have a pipeline that moves files from the nzbget to media, but it isn’t always doing the right thing, so for simplicity I gave plex access to the other dir as well. It kinda worked, coz I was able to see all movies from both directories and no duplicates in Plex. But it looks like it. was also causing problems with subtitles, so today was a cleanup day :slight_smile:

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