Jump to content

Advice on Cleaning up TV Image Metadata stored in Media Folders


Recommended Posts

ginjaninja
Posted

My OCD has finally got the better of me and I want to clean up my TV image metadata stored in media folders. I also want to ensure other programs reading the metadata have a consistent situation to work with.

I have been using Emby since MB days and i believe it is the only product which has been storing image metadata in media folders.

I have spent some time ensuring my series and season images are correct - and they still are correct in the ui.

Now, i assume due to changing Emby design? over the years, I have a complete mix of files and locations and am looking to write a powershell script to standardise to the current design.

I have

  • series\folder.jpg, series\show.jpg, series\poster.jpg
  • series\season XX\folder.jpg, series\season XX\season-X.jpg, series\seasonXX-poster.jpg

sometimes multiples for a given series, sometime differences within seasons of a series... but lots of different outcomes across all the series.

Does anyone have any ideas, perhaps

  • from experience of how things have changed over the years,
  • what is the current preferred logic for reading ui image metadata,

what logic i should employ to move from the current messy situation to a clean situation which conforms to embys current default image metadata design, whilst maintaining the current images in the ui (and indeed maintain them if i should rebuild the server from scratch)

thanks in anticipation.

PenkethBoy
Posted

Example of how my TV series folders look - this is how all my series folders look - just varying on number of images

864590738_Annotation2020-08-30112740.jpg.d6b134e2fd24ce09461b747a7a6ebbba.jpg

having seasonXX-yyyy - varies per Series some only have -poster - depends usually how new the series is and how popular for art to be created etc

only thing is that the "extrafanart" folder is not now being created - Luke changed this for some stupid reason so now for a new show all the fanartX.jpg are created in the show root folder which is messy and unnecessary!

889534555_Annotation2020-08-30112748.jpg.a4d02557a77486938640398ff2a29aff.jpg

currently i move these to a extrafanart folder i manually create which is still seen by Emby

As for season folder - mine only have images for the episodes - no other images like poster exist in those folders

65910210_Annotation2020-08-30113638.thumb.jpg.190a28d87aeffb00fc8b11e04b7b2381.jpg

And looks like this in Emby (ignore the css chnages)

805133764_Annotation2020-08-30113817.thumb.jpg.579b142cabf692211ac1699aa4306c7c.jpg

 

So i think that covers whats todays "standard" for TV series root folders etc

ginjaninja
Posted

thanks for the insights/background/clarification on the current preferred storage scheme,

if a series or season images exists more than once, which one will emby be using? my script needs to make a decision as which one to keep before moving it to the current preferred storage scheme location, and removing all the others

this is what i am guesstimating so far

In order
if exists, move [and overwrite if necessary] \series\season xx\season-x.jpg to \series\seasonXX-poster.jpg
if exists, move [and overwrite if necessary] \series\season xx\folder.jpg to \series\seasonXX-poster.jpg
if exists, move [and overwrite if necessary] \series\show.jpg to \series\poster.jpg
if exists, move [and overwrite if necessary] \series\folder.jpg to \series\poster.jpg
 

but equally that could be completely wrong and i end up deleting my preferred image which is in use.

i wasnt thinking of doing this via the api [unnecessarily hard work], but maybe if i cant be sure i will have to use the api and get emby api to save out the current series and season posters to the current preferred storage scheme and delete everything else.. Indeed mayeb there is an emby function that would do that or some of this heavy lifting?

PenkethBoy
Posted

as to which image emby is using - i think you will find its the images in the folder - assuming you have save artwork in folders set for the library

other images are very likely ignored as in wrong directory or wrongly named etc

 

Simple to check for a few series just delete - the ones you think are wrong and see what happens

NB: folder.jpg is valid and IIRC would be used as poster - but i would check that

 

As for api - sure you can request all the images and save them to a "BACKUP" folder structure - then delete all the images - then restore back or do a hash check after you have removed the orphaned images to check if the ones remianing match the ones in your backup - multiple ways to do it.

do something similar for albums and artists

ginjaninja
Posted (edited)
14 hours ago, PenkethBoy said:

other images are very likely ignored as in wrong directory or wrongly named

thats the issue, in my experience all the old standards are not ignored, they all working still {i need to 100% check that} so its difficult to know which is in use when more than one is present.

 

14 hours ago, PenkethBoy said:

i think you will find its the images in the folder

yes but if you have \series\folder.jpg and \series\show.jpg and \series\poster.jpg which one is in use.

if you have \series\season01-poster.jog and \series\season 01\folder.jpg and \series\season 01\season-1.jpg which is in use.

i think the question is..when multiples exist..is their a consistent order of preference?

eg for series poster.jpg>show.jpg>folder.jpg

then my script would know which to keep

Edited by ginjaninja
PenkethBoy
Posted

Just in case its not clear - from my first post all those images were d/l by emby and i have not changed them or added to them or renamed anything

So apart from "poster" rather than folder - for me the images follow the naming guide very closely

ginjaninja
Posted (edited)
On 8/31/2020 at 12:57 PM, Happy2Play said:

The knowledge base shows the order of precedence, but to me it is slightly different then the images that Emby writes as it does not write folder.ext image. 

Scroll down to Images.

https://support.emby.media/support/solutions/articles/44001159110-tv-naming

 

thanks, i visited that page but couldnt see it for looking...just what i needed.

i use folder.jpg to ensure windows explorer ui is populated with folder image, but i think its time to let that go.

 

so for series poster the priority is

series\folder.ext>series\poster.ext>show.ext

(and the default for a blank slates is series\show.ext) (so "find the highest priority, move to series\show.ext, delete all others")

 

\series\season xx\season-x.jpg is no longer used and can just be deleted (guessing at some point emby copied it from \series\season xx\folder.jpg?)

so for seasons poster the priority is 

series\season\folder.ext>series\seasonXX-poster.ext

series\seasonXX-poster.ext>series\season\folder.ext

(and the default for a blank slates is series\seasonXX-poster.ext) (so "find the highest priority, move to series\seasonXX-poster.ext, delete all others")

now to work out the easiest way to do this.

Edited by ginjaninja

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...