INTERACT FORUM

Please login or register.

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

Author Topic: Auto Write Expression to [Artist] Field  (Read 3721 times)

timwtheov

  • Galactic Citizen
  • ****
  • Posts: 354
Auto Write Expression to [Artist] Field
« on: May 01, 2016, 12:41:45 pm »

Maybe I'm dense, but I can't find out how to permanently write an expression to a field for all new files entered.  What I'm trying to do is populate the [Artist] field via the following expression:

=ListBuild(1, ; , [Soloists], [Conductor], [Orchestra], [Ensemble])

I can highlight all my files in my main Classical view scheme ("Classical Works") and copy/paste this expression into [Artist], and it works perfectly; but how do I work it so that it just happens as soon as [Soloists], [Conductor], et al are entered into their respective fields? Seems like I'm missing something in "Customize View" or somewhere else. 

Thanks for any and all help!!!!

Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871
Re: Auto Write Expression to [Artist] Field
« Reply #1 on: May 02, 2016, 11:35:31 am »

If these tags are present in the files to begin with, you could set it up as an auto-import rule.
If not, the best you could probably do would be to set up a custom expression-based field.
It would make things easier to copy from this custom field to the artist one, if that's what you want, but I don't know that it's possible to have this happen automatically. I'd probably just use the new field instead.
 
I'd suggest using something like this if you're creating a new field.
Code: [Select]
If(IsEmpty(ListBuild(1, ; , [Soloists], [Conductor], [Orchestra]), 0), [Album Artist (auto)], ListBuild(1, ; , [Soloists], [Conductor], [Orchestra]))

Or this if you want to restrict it to files where the genre is Classical.
Code: [Select]
If(!IsEqual([Genre], Classical, 1), [Album Artist (auto)], If(IsEmpty(ListBuild(1, ; , [Soloists], [Conductor], [Orchestra]), 0), [Album Artist (auto)], ListBuild(1, ; , [Soloists], [Conductor], [Orchestra])))
Logged

timwtheov

  • Galactic Citizen
  • ****
  • Posts: 354
Re: Auto Write Expression to [Artist] Field
« Reply #2 on: May 02, 2016, 12:16:34 pm »

That's what I was afraid of.  I actually tried it with a new library field, and though it worked, I was hoping for a little more automation.  I'll try your second suggestion, though: like the sound of it.

Thanks much!!!!

[Edit] Forgot: I considered the auto-import rule, too, though I do the majority of my tagging in Media Center, so this probably wouldn't work for me, unless I started using Musichi's classical/jazz tagging program more thoroughly than I do (right now I just tag [Composer] and [Composition] in there and then import). 
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: Auto Write Expression to [Artist] Field
« Reply #3 on: May 02, 2016, 01:36:00 pm »

if you have a good disk structure, you can use auto-import tagging very effectively...
Logged

timwtheov

  • Galactic Citizen
  • ****
  • Posts: 354
Re: Auto Write Expression to [Artist] Field
« Reply #4 on: May 02, 2016, 06:24:18 pm »

I used to have a semi-decent disk structure, but since getting Media Center, I no longer do!
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Auto Write Expression to [Artist] Field
« Reply #5 on: May 02, 2016, 06:35:39 pm »

What are you trying to do?  The [Artist] field is a built in, but it's not "special" .  Why not put all of this into another field?  Is there some reason you are stuck on putting this info into [Artist]?

Brian.
Logged

timwtheov

  • Galactic Citizen
  • ****
  • Posts: 354
Re: Auto Write Expression to [Artist] Field
« Reply #6 on: May 02, 2016, 10:40:46 pm »

Primarily for my handheld (Galaxy S5), whose audio program I use (ProPlayer) doesn't show many (any?) custom tags.  For Media Center itself, sure, I can just create another field, but I was trying to get all that information into [Artist] in as automated a way as possible (classical tagging already takes a long time, and I have many, many thousands of files to tag). 
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Auto Write Expression to [Artist] Field
« Reply #7 on: May 03, 2016, 09:45:13 am »

If you want this in all of your files, you can certainly paste your expression into the [Artist] field and watch as MC saves the values to all of your files.  But I think you knew that.

What about going forward?  What's the easy way to get this to happen for new files?  Well, presumably, when you import new files, you'll be manipulating all of those fields you listed:  Conductor, Orchestra, etc.  So you probably want to review all new files you import, so you can set these values as soon as possible.

You can set up a view that sees only files that you have not "approved" yet.  This view will show you all of your new files that you haven't set an approved flag on.  Then, you set all of the values you want, then set them all to "approved".  Part of this process could certainly be copying your expression to the Artist field.  An easy way of doing this would be to set up a calculated expression field with your expression.  Call it something like [artist exp].  Then, when you are editing new files, just go into [Artist] and type:  =[artist exp] .  That will copy in your expression based values.

To set up an administrative view like I've described, you normally set up a field and call it something like [approved] .  Make it's type integer and it's edit type "check".  That way all new files will get a default value of approved = 0 .  Then you can edit them with a checkbox field.  A check means "1" or approved.

Brian.
Logged

timwtheov

  • Galactic Citizen
  • ****
  • Posts: 354
Re: Auto Write Expression to [Artist] Field
« Reply #8 on: May 03, 2016, 03:19:23 pm »

Brian, thanks much for the great suggestion! However, I do have something like this already, I suppose, though it's not quite "approve/disapprove." I have classical files on many different external hard drives, so I set up a drive\folder-specific view scheme, and the "approval" comes from [Grouping] (which gets filled with "Orchestral," "Concerto," "Solo Instrument," "Choral," "Opera," and non-opera/choral "Vocal").  That's the last blank I fill, which I guess counts as something like "approve."

And yes, I had already updated all my old, fully tagged files with my own Listbuild expression. 

I also took RD James's advice and expression (above) to create [Artist List], which I can then quickly Move/Copy Fields into [Artist] (or I can use the =[Artist List] there too--thanks for the suggestion, as I didn't realize you could do that with other fields, though I suppose it should have occurred to me). I think I'm alright with this in terms of workflow.  It's funny: once you get a slight taste of how expression language can speed things up in terms of tagging, you seem to want more and more automation!

Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Auto Write Expression to [Artist] Field
« Reply #9 on: May 03, 2016, 03:56:15 pm »

Sounds like you have a solid handle on it.  Awesome.  :)

Good luck going forward.  Expressions are definitely your friends.

Brian.
Logged
Pages: [1]   Go Up