Since Credits feature added, Intro scanning no longer works on Media Added

Server Version#: 1.31.3.6868
Player Version#: Web 4.100.1 (Happens on all players though, including Xbox Series and PS5)

Since the addition of the credits feature, into scanning is no longer working when the media is added. It does still work as a scheduled task however.

My settings are:

  • “Scan my library automatically” is disabled (because Linux).
  • “Generate intro video markers” is set to “On media added and as a scheduled task”
  • “Generate credits video markers” is set to “On media added and as a scheduled task”

Media added is being triggered by an automation hitting the API and is working properly… media still shows up and gets scanned for media info and credits. The only part not working is the intro scan.

Mind sharing some more details?
I’ve just added a new show on my Ubuntu 22.04 server and both intro and credit detection were kicked-off right away, successfully detecting both. Detection will take its fair share of time – especially for the credits – but I haven’t seen any general issue with my own setup.

PS: not sure I get the “is disabled (because Linux)” reference… there’s no restriction for automatic scans on Linux, is there?

It’s running on Ubuntu 22.04, runs bare metal. Not sure what other details you’re looking for?

As for the disabled automatic scanning, it’s because Linux has a low default value for the total number of file system watchers and depending on the size and organization of your files, it can hit that limit pretty easily and stop picking up new stuff. I also do some processing on files before adding them to the library, so the API trigger approach simply works better in my environment anyway.

how exactly are you triggering the scan via the API (minus your Plex Token in any of the API calls)?

using /library/sections/{sectionId}/refresh?X-Plex-Token={plexToken} for the first episode of a new series to trigger a full library scan and /library/sections/{sectionId}/refresh?path={folderPathToShow}&X-Plex-Token={plexToken} to trigger a scan of the series.

Like I said in the OP though, media is still being added to the library, media info is still being downloaded and added for the show, and credits detection is still working. The only thing not working, is intro detection.

For intro detection, you need to scan the season or an episode, not the series.

1 Like

This does not appear to be the case. When triggering the scan from any avenue, including the Series folder or season folder, it will show “Detecting Intro” for a split second during the scan, but will not actually detect the Intro until the Scheduled Task Runs. Attempting to pass the full path including the filename does not trigger a scan at all. Like above it will properly detect credits and grab all media information. To test I removed and readded the same show multiple times to see the result for different API commands:

http://{plexUrl}/library/sections/4/refresh?X-Plex-Token={plexToken}

http://{plexUrl}/library/sections/4/refresh?path=/mnt/mediastore/Anime/Tomo-chan Is a Girl!&X-Plex-Token={plexToken}

http://{plexUrl}/library/sections/4/refresh?path=/mnt/mediastore/Anime/Tomo-chan Is a Girl!/Season 01&X-Plex-Token={plexToken}

All yielded the exact same results.

http://{plexUrl}/library/sections/4/refresh?path=/mnt/mediastore/Anime/Tomo-chan Is a Girl!/Season 01/Tomo-chan Is a Girl! - S01E13.mkv&X-Plex-Token={plexToken}

Did not trigger a scan on the server at all.

Oh sorry. My brain took a break for a moment. What I said above doesn’t matter. As long as the file is added, it should run the intro detection. Can you provide your server logs after the next time something is added.

Here are the logs. “How I Met Your Father” Season 2 Episode 10 was added at 9:17am Eastern time this morning. And “Spy Classroom” Season 1 Episode 12 was added at 11:19am. Around 9:30am is when I added and removed “Tomo-chan Is A Girl” Season 1 Episode 12 several times.

Plex Media Server Logs_2023-03-30_15-28-08.zip (1.2 MB)

You need to enable debug logging for your server. Can’t tell what’s going on without that. This is not retroactive, so grab a new log after the next file is added.

Here it is with debug logging enabled. I added a new series so I could get plenty of data and noticed something interesting.

When episodes 2-12 were added, it would say it did intro detection like normal in the server status, but the intro did not work like usual for those episodes. After it added episode 1 (which triggers a full library scan, I think I did this because of a bug years ago and never changed it) all the intros started working. Seems like the issue at the core may be that scans triggered on a folder don’t generate the intro markers properly, but scans on an entire library do. Which is strange because it still shows “Scanning Intro” during the import, even when the intro doesn’t work.

Intros always work after the scheduled scan that takes place nightly at midnight.

The show added is called " Campfire Cooking in Another World with my Absurd Skill" and was done about 20 minutes ago.

Plex Media Server Logs_2023-03-30_17-42-06.zip (1.7 MB)

Didn’t you say you tried the entire library previously and it didn’t work?

The show added is called " Campfire Cooking in Another World with my Absurd Skill"

I see where it ran intro detection for episode 1, the others already had it done. Are you saying you didn’t see the intro markers until after you added episode 1?

Didn’t you say you tried the entire library previously and it didn’t work?

I did, and it didn’t work. After enabling debugging and adding this new series as a test however, it did work. Possibly because 2 scans had been run on the episodes?

Are you saying you didn’t see the intro markers until after you added episode 1?

Correct, no intros functioned until after episode 1 was added and a full library scan was completed. Prior to episode 1 being added, and after all the individual episode scans had been completed, the intro markers did not function.

Ok, well your logs only shows after episode 1 was added, so I can’t tell why the intro markers wouldn’t have worked before.

For “Campfire Cooking”, I do see it running the intro detection on all 3 new episodes. It’s possible it didn’t detect the intro but it does look like it ran.

I tried to repro the steps but it worked for me. I also have that show and when I added Ep 13 and ran the library scan using the API, I got the intro and credit markers. I’ll test some more.

Here is another log grab for when “Tokyo Revengers” Season 1 Episode 13 was added. No intro skip appears when the intro hits the screen. It was added at 7:37am Eastern Time today 2023-04-02.

Plex Media Server Logs_2023-04-02_14-54-59.zip (4.5 MB)

I made a couple videos to illustrate the issue, one showing that the intro doesn’t work on Episode 13 but does on 12. And another that shows that a subsequent scan doesn’t fix the issue, like previously reported before (though it did work for some reason on “Campfire Cooking”), but it seems I cannot upload them to YouTube to share here because they contain copyrighted material… and I can’t upload them here because they aren’t one of the file types allowed (they are .mkv).

Your logs indicate it did run the intro detection. It doesn’t tell me if it actually detected any intros but it all appears to have run properly.

Let’s check again on the next episode you add.

Issue happened today at 1:41PM EST adding episode 2 of “My Love Story With Yamada-kun at Lv999” logs attached.

Plex Media Server Logs_2023-04-08_18-40-57.zip (4.6 MB)

That’s only the second episode. Intro detection requires 3 matching episodes before it can determine what is the intro. It did run so it has the data on what it thinks might be the intro, but it needs 1 more episode before it confirms and adds the marker. This is expected.

Do you have another example with more episodes?

Also, why is the time on your server set to GMT? You should set the clock to your actual location, unless this is an offsite server.

This one is Bofuri Episode 11, added at 12:28PM EST.

Also updated Plex Server to 1.32.0.6918 on Monday.

Plex Media Server Logs_2023-04-12_21-57-45.zip (4.8 MB)

Also, why is the time on your server set to GMT? You should set the clock to your actual location, unless this is an offsite server.

Consistency in logging with other applications that use GMT regardless of configuration on server. The clock is set to the correct time.

It scanned that episode for intros.

Apr 12, 2023 16:28:36.844 [0x7fae05babb38] DEBUG - IntroDetector: Initializing for “/mnt/mediastore/Anime/bofuri/Season 02/BOFURI I Don’t Want to Get Hurt so I’ll Max Out My Defense. - S02E11.mkv” (61660)

It finished running,

Apr 12, 2023 16:28:47.181 [0x7fae05babb38] DEBUG - Activity: updated activity 26303923-df28-489e-80cb-53b7663206f5 - completed 100.0% - Detecting intros
Apr 12, 2023 16:28:47.181 [0x7fae05babb38] DEBUG - Activity: Ended activity 26303923-df28-489e-80cb-53b7663206f5.

It looks like it ran properly. So you don’t see the markers right away but they appear a day or 2 later?