Metadata Multiple Genres Batch Process

Batch Process Movie XMLs with Multi Genres. (for hundreds/thousands of movies)

Requirements:
* Movie XMLs Generated with Thumbgen 1.2.9.1
* “Textrep” free software
http://www.download25.com/install/free-text-blocks-replacer.html

Important: Spacing,Indentation and Case are Crucial

Before Proceeding, Backup your Movie XML’s in case you make a mistake !

Launch “TEXTREP”:
Path = “Your Movies”  eg. C:\MOVIES
“Tick” include ‘Subfolders’ and ‘Case Sensitive’
File Mask = *.xml
Make sure you Movie XMLs are ‘Archived’ and not ‘Read Only’

STEP 1. Find What:
</mpaa>
  <genre>

Replace With:
</mpaa>

<?xml version="1.0" encoding="utf-8"?>
  300   300   Based on Frank Miller's graphic novel, "300" concerns the 480 B.C. Battle of Thermopylae, where the King of Sparta led his army against the advancing Persians; the battle is said to have inspired all of Greece to band together against the Persians, and helped usher in the world's first democracy.   09.12.2006   Based on Frank Miller's graphic novel, "300" concerns the 480 B.C. Battle of Thermopylae, where the King of Sparta led his army against the advancing Persians; the battle is said to have inspired all of Greece to band together against the Persians, and helped usher in the world's first democracy.   117     7.8   R   tt0416449   R</mpaa>   <genre>Action   Adventure   Fantasy   History       Gerard Butler         Lena Headey         David Wenham     Zack Snyder   Warner Bros. Pictures / Legendary Pictures / Virtual Studios / Hollywood Gang Productions / Atmosphere Entertainment MM     300.mkv   N/A

RESULT:


  7.8
  R
  <imdb_id>tt0416449</imdb_id>
  R</mpaa>Action
  Adventure
  Fantasy
  History
 
    Gerard Butler
 

STEP2. Find What:
</genre>
  <genre>

Replace With:
 /                                                  (*NOTE - There is a Space Before and After the Foward Slash)


  7.8
  R
  <imdb_id>tt0416449</imdb_id>
  R</mpaa>Action</genre>
  <genre>Adventure</genre>
  <genre>Fantasy</genre>
  <genre>History
 
    Gerard Butler
 

RESULT:


  7.8
  R
  <imdb_id>tt0416449</imdb_id>
  R</mpaa>Action / Adventure / Fantasy / History
 
    Gerard Butler
 

STEP3. Find What:
</mpaa>

Replace With:
</mpaa><genre>


  7.8
  R
  <imdb_id>tt0416449</imdb_id>
  R</mpaa>Action / Adventure / Fantasy / History
 
    Gerard Butler
 

RESULT:

trailer>
  7.8
  R<genre>
  <imdb_id>tt0416449</imdb_id>
  R</mpaa><genre>Action / Adventure / Fantasy / History
 
    Gerard Butler
 

STEP4. Find What:
<genre>
  <imdb_id>

Replace With:
<imdb_id>

trailer>
  7.8
  R<genre>
  <imdb_id>tt0416449</imdb_id>
  R</mpaa><genre>Action / Adventure / Fantasy / History
 
    Gerard Butler
 

RESULT:


  7.8
  R<imdb_id>tt0416449</imdb_id>
  RAction / Adventure / Fantasy / History
 
    Gerard Butler
 

FINISHED

A 4 Step Batch Procedure for lots of Movies which takes a second or two, to process.

3 Likes

After doing this how does the “Filter / Genre” behave?

Says “Unknown” …

A Workaround… create Genre Folders for your Movies eg. Action , Horror , Comedy etc.

If you dont want do that, then disregard the Batch Process Method and leave your XML’s with a Single Genre.

Wish I’d known about this method about a month ago Joey…I manually editted around 800 xml files!! :flushed:

Nevertheless this method will also be very useful for people who may want to use my WIP Theme.

Is there anyway to add Movie plot to the end of genre info, as this will need to be carried out to achieve plot info display using my Preview View?

Thanks

What would be the purpose for doing this?

Would it be worthwhile requesting TG to implement this feature built in?

Yes it would be nice if Thumbgen had the feature to combine the Genres.

The Thumbgen Author was asked the main question…   (plus an additional question)

http://forum.wdlxtv.com/viewtopic.php?f=25&t=6490&p=54093&hilit=live+hub#p54093

He answered the ‘additional question’ … but not the ‘main question’.

You can combine the Genres in Thumbgen.  It just won’t do it manually, in the Genre box under Movie Information, just change it from

Action,Adventure,Thriler (or whatever it is)

To

Action / Adventure / Thriller

Then click on the green check mark, then generate.

Yes, you do it that way as well… assuming you wish to redo all your movies xml and tgmd files.

The Batch process is for the hundreds/thousands  of movie xml’s  you’ve already previously generated.

Yes, true.  But I was referring to drizzt09’s question:

drizzt09 wrote:

What would be the purpose for doing this?

Would it be worthwhile requesting TG to implement this feature built in?

JoeySmyth wrote:

Says “Unknown” …

 

A Workaround… create Genre Folders for your Movies eg. Action , Horror , Comedy etc.

 

If you dont want do that, then disregard the Batch Process Method and leave your XML’s with a Single Genre.

Im not sure what firmware you’re on but my combined Genres show up just fine with the sort filter. I should mention I’m on the latest firmware and also did a cache clear and reset of the machine after editing the xml.

Thanks for the Textrep process :slight_smile:

My question was really on HOW the sort  came out.

Example:

The three Transformers movies all have the following genres:

Action … Adventure … Science Fiction

but in different orders so the product of the consolidation might look something like this.

#1 Action / Adventure / Science Fiction

#2 Adventure / Action / Science Fiction

#3 Science Fiction / Adventure / Action

Previously with firmware 3.01 before the consolidation they would all be filtered to different genres.  Does that change with the example above?

GCG

Joey what about my first question?

What would be the benefits to having

  1. Action / Adventure / Fantasy / History

over

  1. Action

    Adventure

    Fantasy

    History

And Tinwarble Yes you could probably manually do it in TG before generating but everything is automatically. The request I meant was to make it automatic. You dont have to change anything, but depending on the settings you select it will automatically generate the xml with either format 1 or format 2

The only benifit is that the HUB will display all the Genres that way.

And yes, it would be nice if there was that choice for it to do it automatically.  I did state that it wouldn’t do automatically, but my suggestion is that you could do it manually if you prefered it for now.  Also, once you have generated it this way, when or if you have to regenerate your info, TG will import the info the same way.

Hey Joey… Thanks for textrep program, I’m gonna merge to my util folder… If you need batch file to process the 4 step, Tell me… I’m gonna be happy to make it.   I Think, I’m gonna use to rename Title in XML to “%EPISODE%. %TITLE%” with filename philosophy %TVSERIE% - %SEASON%x%EPISODE% - %EPISODE TITLE%. Cause xml resort episode by title…

thanks…

P.S does a way to set output title form with thumbgen?  Like 1.Pilot and not Pilot who gonna resort in P letter ???

@sudheer

if you find the genre text too long, shorten the width and add scrolling text.

Example: the original, remove the yellow and alter the blue

<text x=“90” y=“169” w=“635” h=“26” text="@@genre" fontsize=“18” textcolor=“0x999999” align=“left” disable_tail_dots=“1” />

Example: shorter text and scrolling text
<text x=“90” y=“169” w=“300” h=“26” text="@@genre" fontsize=“18” textcolor=“0x999999” align=“left” speed=“1” delay=“2” />

Just saw your response here. Could you please tell me where to put this change? I am using TW@DarkLight theme AND I am not able to locate this.

Alos, now when i sort my videos based on Genre, it is showing in different combinations… for example,

action\drama\crime  (10 movies)

action\crime\drama   (25 movies)

drama\action\crime  (5 movies)

crime\drama\action  (7 movies)

is there a way to put them in a sorted order like action\crime\drama. so that i will get all 47 movies under this combination at one place? I am using the latest firmware. Thanks!

If you want all of the provided examples to be listed as              action\crime\drama

Just use Textrep to batch replace the other genres.  example:

Find:                    action\drama\crime< / genre>

Replace with:    action\crime\drama

Find:                    drama\action\crime< / genre>

Replace with:    action\crime\drama

etc.

The Genre from the Movie XML files are displayed with the  @@genre  variable in a Theme.

Example from Darklight Gallery View:

If the genre text spills over other info … change the width   w=“580” 

Or change the fontsize… smallest possible … h=“18” fontsize="16"

This provided information is accurate with Firmware 2.017.17

I Cannot guarantee it with the latest Firmware.