Jump to content

Best way to to remove genres from 1000 items?


yaksplat
Go to solution Solved by yaksplat,

Recommended Posts

yaksplat

I have over 1000 items that I want to remove the genres from.  Is there an easy way to go about doing this?  I still want the genres that I'm removing from these items to be available elsewhere, so I don't want to just use genre cleaner and map them to something else.

 

Thoughts?

 

 

  • Like 1
Link to comment
Share on other sites

Unfortunately we don't have bulk edit yet in the web interface. It's on the list, but not done yet. So you might have to rely on someone posting some mass xml updating tricks, which I've seen people do before.

Link to comment
Share on other sites

Yeah, I did something similar with stripping tags out of the xml files, but did it with a regex in notepad++

http://mediabrowser.tv/community/index.php?/topic/3996-changes-to-tags/?p=61612

 

Thanks for posting the powershell, it will probably come in handy.

 

Are you the same yaksplat that has a blog about custom MAME arcade mahines?

Link to comment
Share on other sites

  • Solution
yaksplat

powershell script to remove genres out of all xml files:


$path     = "<path goes here>"

$files    = Get-Childitem $path *.xml -Recurse | Where-Object { !($_.psiscontainer) }

Function Editxml([string]$filename)
{
    $xml =

(get-content $filename)
    $genres = $xml.Genres
    $xml.Title.Genres.RemoveAll()
    $xml.save($filename)
}
 
Function FindFiles
{
  Foreach ($file In $files)
  {
  Editxml $file.FullName
  }
}
 

FindFiles

 

 

 

Edited by yaksplat
  • Like 3
Link to comment
Share on other sites

That's me.  As far as I know, I'm the only Yaksplat online, going back to when I made it up in '95 :)

 

At the moment I'm in the process of restoring an old carnival digger.

 

https://www.youtube.com/watch?v=sx3T78oLU0o

 

Yeah, I figured that was you. Those arcade machines you built are awesome! I would love to have one of those.

Link to comment
Share on other sites

BATTLE DONKEY

I googled ur blog n have been reading up on ur mame cabinet build. I've wanted to make one myself for awhile, very informative. I never really put much thought into the power switch until I read ur blog, didn't realise there would be so much involved in having a single button to power everything up. Mind u I'm clueless to this stuff so to me it seems like a lot of work lol

Link to comment
Share on other sites

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