INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Fill properties from property  (Read 2278 times)

leoric

  • World Citizen
  • ***
  • Posts: 164
Fill properties from property
« on: April 09, 2011, 05:49:45 am »

Very common situation... There is an album in single .ape. Accompanying .cue contains wrong info - both Name and Artist fields contains same strings in format [Artist] - [Name]. Seems like currently there is no way to automate fixing of this in MC. I guess that it should be pretty easy to implement a functionality similar to "Fill properties from filename" but using some property as a source. At least expose this as function, no GUI really needed. Thanks.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Fill properties from property
« Reply #1 on: April 09, 2011, 11:31:14 am »

This would be nice.

Perhaps as a workaround, you can rename the files based upon either Artist or Name (since they both contain identical strings containing both Artist and Name), and then use Fill properties from Filename to assign correct tag info.
Logged
The opinions I express represent my own folly.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Fill properties from property
« Reply #2 on: April 09, 2011, 01:19:12 pm »

You can use MC's expression language to edit tags in-line.  So, for example, I usually want my TV Show video files named like this:

3e02 for episode 2 in Season 3 of a particular show.  This is easy to accomplish quickly.  Make sure they are showing in the list in the right order, select them all, and hit F2 (to edit the name field).  Then type this:

=[Season]ePadNumber(Counter(),2)

So long as the [Season] field has already been filled out, it will result in the files all being renamed properly.  Then, if you want to go add the actual episode titles, you can pull up the EpGuide for that season and append them one at a time.

This flexible system, plus the Find and Replace and Move/Copy fields tools can do just about any massaging you need to in a simple manner.  Another example I hit a lot is more like what you described.  The files might come in with the [Name] field like this:

Pink Floyd - One of These Days
Pink Floyd - A Pillow of Winds
...etc

If the text you need to remove is all the same, it is easy.  Just use the Find and Replace tool.  Search on only the [Name] field, search for "Pink Floyd - " (without the quotes), and leave the replace box empty.  More complex procedures can be accomplished using the Expression language (the RemoveLeft() and RemoveRight() expressions can be particularly handy).
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Fill properties from property
« Reply #3 on: April 09, 2011, 02:51:05 pm »

More complex procedures can be accomplished using the Expression language (the RemoveLeft() and RemoveRight() expressions can be particularly handy).

So what's the solution for this case, where both Artist and Name contain the same [Artist] - [Name], where [Artist] and [Name] are a variable number of characters?  The Remove* functions require one to know a priori the length of removal.  This is a case where regular expressions are far more useful and generalized: for example, Artist might be:

s/(.+) - (.+)/\1/

(the RE might need to be more complex, depending upon the data, but this is the basic idea).
Logged
The opinions I express represent my own folly.

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Fill properties from property
« Reply #4 on: April 09, 2011, 03:44:57 pm »

Quote
So what's the solution for this case, where both Artist and Name contain the same [Artist] - [Name], where [Artist] and [Name] are a variable number of characters?

[Artist] = ListItem([Name], 0, / - ) and [Name] = ListItem([Name], 1, / - )
Logged

leoric

  • World Citizen
  • ***
  • Posts: 164
Re: Fill properties from property
« Reply #5 on: April 09, 2011, 04:00:05 pm »

[Artist] = ListItem([Name], 0, / - ) and [Name] = ListItem([Name], 1, / - )
Yes, this helped. Thanks a lot!
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Fill properties from property
« Reply #6 on: April 09, 2011, 04:01:44 pm »

Thanks Rick.  This will come in handy.  I forget about the list functions.
Logged
The opinions I express represent my own folly.

Frobozz

  • Citizen of the Universe
  • *****
  • Posts: 641
  • There is a small mailbox here.
Re: Fill properties from property
« Reply #7 on: April 09, 2011, 05:50:42 pm »

Will MC update the fields inside the CUE file when updating the library fields?
I don't do CUEs inside of MC so I'm not sure what the behavior is.

Another option for updating the fields with the CUE file itself is to use CUETools.
http://wiki.hydrogenaudio.org/index.php?title=CUETools
http://www.cuetools.net/doku.php
It can read/update the album, artist, and track info from FreeDB and MusicBrainz and rewrite the CUE with correct info.
Logged

Raphoune

  • Junior Woodchuck
  • **
  • Posts: 98
Re: Fill properties from property
« Reply #8 on: April 10, 2011, 04:56:47 pm »

I had the same kind of issue a few weeks ago, and Glynor suggested me the same workaround (expressions with in-line editing) which worked great...
But a few days ago, I imported new files, and had to do it the same way. A "Fill properties from property" panel could have saved my time by remembering the last expressions I used, just like the "Fill properties from filename" panel. I can do without, but it would be handy... (and would not cost much to develop)
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Fill properties from property
« Reply #9 on: April 10, 2011, 09:22:03 pm »

A "Fill properties from property" panel could have saved my time by remembering the last expressions I used, just like the "Fill properties from filename" panel. I can do without, but it would be handy... (and would not cost much to develop)

I agree.  I keep a notepad document in Dropbox with a bunch of my commonly used in-line expressions.  Some sort of wizard would be very handy.

PS.  I did know about the List Item expression, but I didn't know how complex the OP's need was, so I kept it simple.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/
Pages: [1]   Go Up