Adding better version of episode/movie will mark it as unseen

Server Version#: 1.19.3.2764

Hi,

How can I prevent PMS to mark an existing watched movie/episode for which I upgrade the file as unseen?

So, let me explain a bit more; I have a movie in my Library which I watched, so PMS has marked it as watched. Then a few months later, I upgrade the movie file with a higher quality file, after I did this, the Movie will be marked as unseen again for everyone who watched the movie.
How can I disable this behaviour?

Thanks!

How are you replacing the file?

If you’re deleting the orignal then placing the new, PMS will catch you in the act of doing so (presuming you have "automatically update my library when changes are detected).

It’ll see the file deleted and react.
Before you can complete copying the new file into position,
It’ll remove the old
After the new version is in place, it will again be notified of a creation
It will scan and add.

The best method of replacing existing is to overwrite it.

  1. mv source dest
  2. Select it in Plex/Web and “Analyze” to update what PMS knows.

Anecdotal Data Point:
On this Winders Beast - I have, just now added a Movie I deleted 4 years ago, and Plex still knows I’ve watched it.

I’ll add:
I’ve not changed my Movie Agent in well over 4 years - and that’s a good way to get a file seen as brand new… I think. That ‘Watch Status’ is a magical thing and no user alive knows how it survives a Plex Dance (or cares really) - it just does.

Not sure what’s going on here, but it sounds like there could be something odd happening somewhere.

Since ‘Watch Status’ is, probably, Account info, that data might be held in a mayonnaise jar on Funk and Wagonalls porch and if the jar was opened, fiddled with, broken, or is ‘out of bounds’ - weird things might happen - and yes, that’s a wild-ass-guess.

It’s being replaced from a Docker Container running Radarr.
But now that I’m thinking about it, Radarr also sends a signal to Plex that it had added a movie. Maybe this triggers the unseen state?

There is your root cause.

It deletes the original first.
It then copies the new into position.

On your system, Plex’s Notify mechanism is fast enough to catch that gap.

So in my case it is not possible? Or can I change some settings in Plex or Radarr to solve this issue?

You might want to do it as I do.

I have those dockers write to my “Downloads” share.

I then, in the GUI File Manager, move (which is an overwrite) operation, update the file.

PMS sees the Write/Change but no “Delete” action.
It runs analysis and updates with the new information.

I will add my post-processing script in the next post. This is how I perform any cleanup and the ultimate move into the destination

$ cat clean-episode 
#!/bin/sh

# this script runs when sonarr triggers (a download/rename) to clean subtitles and attachments

# Location of binaries
Bin="/usenet/bin"

# Location of libraries
export LD_LIBRARY_PATH=/usenet/lib

# Sonarr variables
Event=$sonarr_eventtype
Episode="$sonarr_episodefile_path"
Series="$sonarr_series_title"

# User specified log file
Logfile="/usenet/clean-mkv.log"
touch $Logfile


echo `date` Event: \"$Event\" proccesed  for $Series , Episode: $Episode >> $Logfile

DoEvent=0

if [ "$Event" = "Download" ]; then
    DoEvent=1
 elif [ "$Event" = "Upgrade" ]; then
    DoEvent=1
 elif [ "$Event" = "Rename" ]; then
    DoEvent=1
fi

if [ $DoEvent -eq 1 ]; then
  echo  `date` Cleaning: $Episode >> ${Logfile}
  rm -f temp.mkv
  ${Bin}/mkvmerge -o temp.mkv -M -S --no-global-tags --disable-track-statistics-tags "$Episode"
  if [ $? -ne 0 ]; then
    echo `date` Bad file: Error \($?\) "$Episode" >> ${Logfile}
    rm -f temp.mkv
  else
    echo `date` "Keeping: " "$Episode" >> ${Logfile}
   ${Bin}/mkvpropedit -s title=   temp.mkv
   ${Bin}/mkvpropedit --edit track:a1 --set language=eng --edit track:v1 --set language=eng temp.mkv
   mv -f temp.mkv "$Episode"
   rm -f temp.mkv
  fi
fi
$

I’m not sure what I just read, but I definitely know it was something! :rofl:

Because I hate myself, I’m about to being a quest to re-encode all of my physical media. This is the method I assumed I should use, but Plex will only update information about the file, not regenerate any items such as thumbnails?

I ask because I will want it to in certain situations. For some reason, I failed to create chapter markers for some media the first time around. If a re-rip, encode and replace the file, when I analyze, will Plex generate chapter thumbnails for a file that now has more chapters than before?

Sorry to hijack this thread, but it’s somewhat related. I’m also trying to avoid having it show up as recently added.

If the media is truly a “better version”, why is there a need to generate new thumbnails?

Chapter markers are time based. There should be no more or fewer chapters than first time around – unless the original is a botched job. If it was then you do want all fresh data and marking it as new is the right approach ; delete - add as fresh.

There wouldn’t be - unless the run time has changed. <—I hate it when my VPTs don’t match the thing they were made for.

There will be new thumbs generated if:
The Container changes
AVC is swapped for HEVC - or vice-versa
The Agent has changed

Other than that a ‘copy-over-and-rewrite’ won’t generate thumbs, but if all else fails… thumb gen is so fast now it hardly matters, does it?

Yes, that’s exactly what happened. Not sure how, but I’ve noticed it on an episode of a show and once I got to looking, I found more and they’re kind of random. Was going to use this as an opportunity to fix them.

It’s very fast, but to get them to generate, I’ll have to remove files and clean bundles and in the end, I’ll wind up with it added back to recently added. I don’t really care, but it will be a little annoying.

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