Movie extra paths not surviving library relocation/Media rescan not updating movie extra paths

Server Version#: Version 1.23.2.4625 Win 10 x64
Player Version#: Version 4.57.4 Web

I recently discovered a problem with Plex Media Server which, in full disclosure, I haven’t tried to recreate with the latest version, so I don’t know if the source of the error is still in the codebase or not. However, the bigger problem is that there appears to be another bug that is still present in the current version that prevents the ability to recover from the first error, should you have suffered from it at any time previously.

The details:

Problem 1: Movie extras do not survive library relocation.

To reproduce:

  1. Create a library
  2. Add movie titles with extras organized according to:https://support.plex.tv/articles/local-files-for-trailers-and-extras/
  3. Verify movie and extras play in web player.
  4. Relocate the library according to: https://support.plex.tv/articles/201370363-move-an-install-to-another-system/
  5. Verify movie plays in web player.
  6. Verify extras generate a web player UI error with the text:

Playback Error
Please check that the file exists and the necessary drive is mounted.

and log entries of the form:

Error opening file ‘“[old or invalid path]”’ - Permission denied (13)

Workaround: None identified so far. The only workaround I’ve conceived of so far is to not follow the recommended library relocation process by trashing the removed media from the library before re-adding it, which loses all of the library metadata, which metadata everyone wishes was available for users to access and export as a manipulatable database and import to enable more robust library relocation.

Problem 2: Library rescan/metadata refresh does not update move extra paths. If an extra of the same name already exists in the Plex database (albeit with a non-existent path), the new extra’s path is discarded by Plex Media Server. There appears to be no supported means to force Plex Media Server to rescan/trash nonexistent extra paths. Until the extra is removed from the library Plex Media Server will not forget the old, invalid path. For movie titles themselves, Plex does report that the media has gone missing and provide a means to remove it from the database or to update the path with a rescan. Additionally, Plex does not provide a way to view the file info for extras as it does for main titles.

To reproduce:

  1. Recreate Problem 1 above or otherwise relocate movie extras to recreate the problem.
  2. Rescan library/refresh metadata and verify that the error still occurs and the extra path is not updated.

Workaround: For each affected title, remove the extras from the library and wait for a rescan to verify that the extras have been removed from the title. Then, re-add the extras and wait for a rescan to verify that the extras have been added. Play the extra and verify that it plays correctly.
The problems with this workaround are:

  1. Plex provides no introspection into which extras have invalid paths other than to try playing all of them, which is obviously impractical for non-trivial libraries. Unless one knows what movies in the library have been relocated, one must assume that the entire library needs to be fixed.
  2. It is not scalable without writing a script, which the average user is unlikely to be able to create. For non-trivial libraries, performing this activity manually is untenable. If you only have a dozen movies, sure. If you have thousands or even just hundreds of movies, no.

Local extras are Local Media Assets and so are updated upon Metadata refresh (and not during a regular library scan).
Refresh Metadata on all the libraries affected.

Thanks for the quick reply and my apologies for the error in the inner workings of Plex. I have refreshed metadata hundreds of times since this issue appeared (including just now) and the issue persists.

You could try this one. I understand it replaces all locations of all media which fit a certain search pattern.
It’s not for the faint of heart though: [HowTo] Plex database modification - Moving media the right/wrong way - #10 by jelwell

Not for the faint of heart indeed. Thanks for pointing me to it, though. I am reasonably comfortable working with databases, so I may give it a try sometime. I don’t know if I’m confident enough, though, to attempt it without backing up my data, at which point the script solution is probably more straightforward. Since my libraries are dozens of terabytes and backing up an entire library requires lots of extra hard drives and days worth of work, I will probably not be attempting it anytime soon.

As someone whose libraries are constantly moving because they are constantly growing, library relocation is a major thorn and I spend a significant amount of time fixing matches and metadata because the prescribed process just doesn’t quite work that well. At some point Plex has to provide this very fundamental feature natively.

In this case you only need to backup the primary database file, which should be done much quicker.

You should read up on dynamic volumes and “drive pooling”.
Plus, you know you can add several locations to a Plex library, aren’t you?

Yes, I used to pool my drives but that presented other very big problems and nearly lost me many terabytes of content so I have abandoned that and life has been better.

Yes, my libraries are currently comprised of many locations.

The solution to growing space is not always to throw more drives at it, as I only have a finite number of SATA connections and bays for drives. I am having to frequently upgrade drives and shuffle library locations around to optimize and balance the storage I currently have available with my available backup resources…

Yeah, I guess that’s true. Thanks.

@OttoKerner Thanks for your help. While this failed to be fixed with many previous attempts to refresh metadata, including yesterday, today it seems to have worked. I inspected the database and without my having to modify it all of the paths have been corrected and all extras seem to play correctly today. It’s possible that this was occurring because of a bug that was fixed in a recent update (which is why the many previous metadata refreshes did not succeed) and that my attempts at refreshing the metadata yesterday took much, much longer to complete than the UI reported to me and, thus, I didn’t see the effects until today.

1 Like

Glad you got it working!

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