Optimizing libraries and wondering why they get deleted (the videos) after watching

yes, if 5 is set, then 5 get optimized. If I rerun with that same setting, I get an error saying the files already exist.

(the limit number is on by default)

I mean after you watch one. If the watched one is deleted, does Plex optimize the NEXT episode automatically? Does it maintain a quorum of 5 that are optimized?

Do you have multiple optimization jobs present that might overlap the same show or season or episodes?

I’ll double check that… Nothing as far as seasons or shows overlap …

I’ll know by tomorrow…

Plex will do that if you set the job up as a Collection.
I tried optimizing two unwatched episodes then showing one as watched. It wasn’t deleted.
That’s why I was trying to see how the files were being selected. If he selects a season he would get the first 5 files every time.

Ok, ran a test and I got different results.

I deleted the optimized versions and ran it again, but, with just 1 file in the count. I ran this from the season view and not the episode view, so, it optimized the first episode.

I then marked that file as watched and noticed this time it did not delete the file.

This is with the same as pictured above settings…

so, it seems it is now working like I want… Now I am confused… lol…

1 Like

I have a Collection set up based on filters to Optimize TV episodes. The Optimization settings don’t have Unwatched or Limit settings checked. The filter does have Unwatched as criteria.
This Collection Optimization works the way yours was working but by design. As I watch an episode it gets deleted and a new one gets optimized.

I am curious, why don’t you optimize the whole season and replace the original files instead of trying to keep both versions?

Sounds like you’ve created multiple jobs for the same show. Double check and see if you have a conflicting job, one based on “unwatched”. It’s likely this other job is causing the optimized version to get deleted and not the job you are thinking of.

I just recreated the scenario with “limit of 5” and marking things as watched does not change what 5 episodes have been optimized.

image

Ok, after last night’s viewing, it seems that this time, nothing was deleted. I had deleted all the optimizations and re-did some as a test, making sure un-watched was not selected.

It seems that was the issue, I had that on by mistake.

Issue is resolved!

Very cool tip… thanks for that…

I have different devices that use Plex-- IOS, PC and Firesticks, Tablets etc… so, I need the versions… (I suppose)… but, hard drive space is not an issue for me…

One last this I did as a test was ran an optimization WITH those settings on, then go back and changed them from the edit button on the right of the list.

I noticed that it re-ran optimization based on the settings change… I am sure there is a good reason for this, but, seems like double work, when it was already optimized.

How is Plex keeping track of this?

So you created a new job with unwatched enabled and a limit, let it optimize, then edited the job to uncheck those 2 options?

I’m trying something similar. I took the job I created above and checked the “unwatched” option. It removed the 4 watched episodes and is now converting the next 4 unwatched.

Once this is done, I’ll remove both checks and I expect it should keep the 5 it already and add back the first 4 “watched” ones. I’ll update when it’s done.

That’s exactly what I saw when testing a single job and editing it, changing those settings, or watching episodes. I couldn’t make it behave badly.

I notice that if I have overlapping jobs, Plex is clever about not creating unnecessary duplicates for the second job.

If I manually optimize episode S01E01, and then create a job for all of S01, Plex recognizes that S01E01 was already optimized and doesn’t duplicate the work.

If I remove the episode S01E01 job, Plex notices that the season S01 job is now “unsatisfied” for that episode, and optimizes it (again).

Ok, the previous edit finished so I now have 5 “unwatched” episodes. I edit the job and turn off both boxes. It kept the 5 that already existed and added in the rest of the season. To me, this looks to be working as expected. I can’t reproduce the issue you see of it re-optimizing the same files.

1 Like

Right, this can cause the job to get recreated, since the removal of the individual job would occur first. The optimize feature is not quite smart enough to know to remove the job, but not the file so it could be inherited by another job.

Edit - On second thought. That shouldn’t remove the file. Let me check.

I’m pretty sure. Tested with Season and Show-level jobs too.

These jobs:

  • Season: Limit to 3 items
  • Show: No Limit ...

The Season job optimizes the first 3 episodes.
The Show job optimizes the remaining episodes. The first 3 aren’t duplicated.

When the Season job is removed, the Show job indicates that the first 3 items are missing, and it optimizes them (again).

(I’m not suggesting this is a massive disaster. Having overlapping jobs is probably pretty rare anyway.)


I noticed something else I wasn’t previously aware of. Changing the quality settings for an optimization job only affects future tasks. Already-optimized shows aren’t re-optimized with the new quality settings.

Huh. I couldn’t reproduce. So, the season finished. I added a single job for episode 1 using the same “original” profile. No new file was created.

I then deleted this new job, and nothing changed. I double checked my files and all the optimized versions are still there.

Did you possibly use different profiles? It will re-optimize if the profile is different.

Ahh, I’m describing the opposite order - removing the earlier job, not the later one.

Because the S01 job was already present, when you created the S01E01 job, it didn’t do anything. The file from the S01 job already satisfied it.

If you remove S01, the S01E01 job will be need to reprocess S01E01.

(I created a bunch of 10 second episodes to test this quickly.)

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