I am trying to get my music organized. So i want to remove unnecessary tags and only have "contributing artists" tags, instead of a mixture of "contributing artists" and "composers"
I am using Taglib-Sharp for this.
So after this:
Add-Type -Path "$PWD\taglib-sharp.dll"
cd "$Home\Music"
$songs = ((Get-ChildItem *.mp3 -Recurse).Fullname)
$taglib = ($songs | % {[TagLib.File]::Create($_)})
I have my music library loaded inside $taglib. Now I'd like to search for ALL sub property's, that include stuff like "link.com". For example: $taglib has the properties "length", "name", "tag" [...].
While "tag" itself has "Artist", "Album", "Name" [...] properties.
So I want to iterate through all all sub properties of every element/song in $taglib and find a property, based on it's value. I've tried to make a function that takes an object and recursively calls itself whenever the object has property's:
function AllProps($obj){
foreach($member in (gm -inputobject $obj -membertype property).name){
if($member -eq $null) {
$obj
} else {
"$member"
AllProps -obj $obj.$member
}
}
}
But it get stuck in a loop ... Is there an easy way out? TIA!
Try something like this: