Jump to content

Rebuild metadata vs Refresh metadata


Recommended Posts

Posted

It would be helpful if Emby had an option to rebuild metadata files (such as when you enable NFO saving on a library that didn't originally have it), so you can dump out a valid, new, true copy of the current configuration, WITHOUT refreshing metadata against online providers.  This would allow you to generate all missing NFO files without blowing away any content that Emby would misidentify upon metadata refresh.  I think it would also be useful when converting from an internal Emby cache and/or metadata folder to a custom external path "outside" of Emby's installation location.

Slightly more context on my concerns regarding metadata refresh on a parallel topic: 

 

  • Agree 2
GrimReaper
Posted
6 hours ago, mrmixed said:

It would be helpful if Emby had an option to rebuild metadata files (such as when you enable NFO saving on a library that didn't originally have it), so you can dump out a valid, new, true copy of the current configuration, WITHOUT refreshing metadata against online providers.  This would allow you to generate all missing NFO files without blowing away any content

Refresh Metadata>Search for missing should already do that for you, (re)write NFOs without altering existing data. 

Posted
2 minutes ago, GrimReaper said:

Refresh Metadata>Search for missing should already do that for you, (re)write NFOs without altering existing data. 

That's still going to look for missing internet metadata and potentially add new data. But it's still the closest option to what he's looking for.

What he really wants is the effect of clicking save in the metadata editor, but there's no way to do that in bulk.

GrimReaper
Posted (edited)
13 minutes ago, Luke said:

That's still going to look for missing internet metadata and potentially add new data.

I assumed that was self-explanatory from the option title, hence was said:

17 minutes ago, GrimReaper said:

without altering existing data

Edit: And if meta-providers disabled (or internet connection killed altogether) before Search for missing, it actually shouldn't (couldn't) download any new data, so net-result could very well be only existing data written. 

Edited by GrimReaper
Append
  • Thanks 1
Posted

Thank you both for the feedback.  Ultimately, I've been burned a few times and want to start saving NFO files, and would like a way to enforce that everything has one.  It's not good enough to enable NFO file saving on an existing library and not have a way of triggering a mass dump.  The dropping internet connection before performing a refresh is a good suggestion, although I do think having a context menu option to perform this task would be pretty helpful for everyone.

Ultimately, my wish is for a more robust backup function that would ensure there is a copy of all NFO files and images, in a dedicated folder that is not the media folder, per my adjacent post:

 

Concerningly, I was attempting to do testing per Luke's suggestion above, and triggered a right-click refresh metadata for new data only.  I did this on a particular subfolder in my library, thinking it would contain any potential issues just to that set of folders.  Oddly enough, I am noticing after this that I am missing images on approximately 20-30% of all titles across my entire library.  I am assuming this is an unrelated issue, as I would not have expected a metadata refresh triggered on a subfolder to do anything to affect the rest of the library.  I also changed cache locations earlier today and suspect that may be involved in the image issue--although I really don't know why a change of cache location would cause images to be lost.  At any rate, I'm currently in a weird state with a 4.8 database in a 4.9 environment, so I don't really know what to expect anymore.  But as this is now probably the fourth time in two years that I've had to go through and manually restore a bunch of custom poster art to many titles throughout my library, it really reinforces that I need to be saving NFO files and images outside of the internal Emby server folders.  I just don't want to do it in the media folders as described in the other post.

Thanks again for your help.

 

Posted

Exactly what setting did you change?

Posted

My cache path was previously blank (although I had set it at some point months ago, but it seemingly disappeared since then).  I set the cache path to a location I can actually access in my filesystem (I run non-portable on a NAS).

I tentatively think the only things that lost images are folders--both single-title-folders and multi-title-folders.  But not all of them.  I think anything where I selected an image from a online provider is still there, but anything where I supplied an image that I had downloaded or created myself may be gone.  Although all my top-level folders are fine and most of my second-level folders are fine.  I don't have a handle on the complete pattern yet.

(I at least learned my lesson from the last time I had to redo all of my custom images to retain all downloaded images outside of Emby so I don't have to hunt and download them again.  So I'm not completely irate about this.  More annoyed at myself for thinking I could test a few things out and not have something bad happen.  I realize at this point I probably need to convert to a portable Emby installation and figure out some sort of snapshot filesystem rollback option.)

Posted

Is it necessary to restart the server immediately upon updating the cache path to get it to stick?  Or do I need to copy the contents of the original cache location over to the new one every time it is changed?  ("Cache" to me sounds as though it is a volatile type of storage that would be capable of rebuilding, but perhaps it's not meant this way in Emby.)

I had set it to a local folder:

image.png.a88d9ec077db5ef3de800c39a3e46bf0.png

And checking a few hours later, the path I set no longer displays under Server Settings:

image.png.e601c1f2c14c98d22d49d6dc05bebfd4.png

 

I made a few changes to poster images just now and I don't see any updated timestamps in my local cache folder, so I assume the setting has reverted.  And I guess this is what happened to me a few months ago, too, because I was sure I had set it at one point.

In any case I don't want to get into troubleshooting on a feature request post.   I was only messing with the settings to try and understand how I might be able to retain an image backup outside of the media folders per my other post.  But ultimately my point here is that there are a lot of things that can whack metadata and images in unexpected ways (the 4.9 update alone was a doozy based on single-title-folder metadata changes), and having a bulk "save-everything-exactly-as-it-is-right-now" option to preserve a known good configuration would be quite useful.  And hopefully in tandem with choosing a custom path where that file dump can reside.

Posted

No you don’t have to restart. You don’t have to copy the contents either although you can if you want.

  • Thanks 1
  • 3 weeks later...
Posted
On 10/11/2025 at 6:27 PM, Luke said:

That's still going to look for missing internet metadata and potentially add new data. But it's still the closest option to what he's looking for.

What he really wants is the effect of clicking save in the metadata editor, but there's no way to do that in bulk.

 

On 10/11/2025 at 6:37 PM, GrimReaper said:

I assumed that was self-explanatory from the option title, hence was said:

Edit: And if meta-providers disabled (or internet connection killed altogether) before Search for missing, it actually shouldn't (couldn't) download any new data, so net-result could very well be only existing data written. 

Thank you both for the suggestions.  Disabling internet and running a refresh looks to work to generate NFO files for an existing library that didn't originally have that setting turned on.

It also seemed to be helpful to disable all but one of the metadata providers to not have to wait and timeout each one.  (Removing them all caused the entire thing to not bother trying to do anything relating to metadata, since there was nothing to find).

 

Do you have any suggestions on how I might dump out a copy of every poster image?  I have now enabled the "Save artwork into media folders" and would like to ensure I have everything saved in the media folders (and eventually would prefer to have them in an alternate location per comments made on an adjacent post, but I'll live with them in the media folders for now).  But running the metadata refresh without either of the "replace image/thumbnail" options doesn't do anything to update the poster location, and running it with the replace image option will blow out custom images that I had either selected for various titles.  I haven't figured out an option within Emby to save my existing images to the media folders like I have for the NFOs, although I imagine there is probably a scripting option based on the "<metadata>/library" folder that I could work up to pull the posters out and file them in the correct locations.

 

Regardless, I still think a "rebuild" menu option, natively supported within the Emby UI, would be a better way to deal with all of this.  And I can't imagine it would be very difficult, since it consists wholly of functionality that already exists; it just needs a new trigger and scope.  And if you really don't want to complicate the UI, it could be triggered automatically when library settings are changed (with a warning that it could take a long time for an existing library), but I think it would be more useful to be able to run it manually (e.g. prior to an upgrade, to ensure that everything is properly synced).

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...