Page 1 of 1

Tag Field's uses current grid field values

Posted: Tue Mar 18, 2014 3:55 am
by gaberad
Not sure if this is an actual bug per se, but thought I'd bring it up anyway, maybe I've missed a option setting somewhere.

What I'm trying to do is set the Artist as 'Up one directory' (%U1%) and set the Album Artist as 'Tag Field > Artist' (%A%) all in one go (it can be done separately, but that can get tedious after a while).

The problem I'm having is that 'Tag Field > Artist' is being pulling from the grid value, rather than the current tag field value.

e.g.
Prior to Apply
Capture.PNG
Capture.PNG (11.1 KiB) Viewed 5294 times
After Apply
Capture2.PNG
Capture2.PNG (12.17 KiB) Viewed 5294 times
I would have expected Album Artist to be 'Artist', but it has been given the value 'Folder Artist' i.e. the grid field value.

It is this expected behavior? If so, would it be possible to have separate 'Tag Field' (which would be the current tag values in the file) and 'Grid Field' values?

0.88 beta (Update 1)

Re: Tag Field's uses current grid field values

Posted: Tue Mar 18, 2014 5:38 am
by hopalongrock
Hi,

I usually do this sort of thing in two steps, in this case:
At 1st set
Album Artist to %A% in template, Scan and Update, and in next step set
Artist to the desired %U1% in template, Scan and Update.

Hopefully I understood what you want to achieve.

Re: Tag Field's uses current grid field values

Posted: Tue Mar 18, 2014 7:43 am
by gaberad
Yeah, that's what I have been doing, I was just looking for a way to do it in one step, and wasn't sure if the current behavior was deliberate or not.

Re: Tag Field's uses current grid field values

Posted: Tue Mar 18, 2014 9:28 am
by hopalongrock
gaberad wrote:Yeah, that's what I have been doing, I was just looking for a way to do it in one step, and wasn't sure if the current behavior was deliberate or not.
As for as I know, when you are in the grid, you have only access to the values in the grid.

In scripts we can handle the grid and the file, but we have start the scripts manually now

tg_init, tg_skip, tg_getfield and tg_setfield, tg_RefreshRow, ... reads/write from/to the grid.

tg_LoadFile enables the usage of the gTag variables, for example gtag.albumartist= ... sets Album Artist, you can save with gTag.SaveToFile, ...

Please look into sample scripts and the help.

In new versions there will event scripts, started automatically:

See the post at http://www.jtclipper.eu/godfatherforums ... vent#p1821
"I have in mind to introduce event scripts (triggers before/after read/save/delete/rename) in the next release."

I hope I am not wrong.

Re: Tag Field's uses current grid field values

Posted: Tue Mar 18, 2014 11:22 am
by jtclipper
The behavior is normal but you can easily do this using the new script aware variables (Options/Formatting/%Variables%/User)
Remember after pasting the code in a new script click OK on the options dialog to compile and insert it in the pop up menu

Code: Select all

begin
  gTag.AlbumArtist := gTag.Artist;
  var_result( gTag.ParseValue( '%U1%', false, false ) );
end.
Just assign this in the artist field on the template and it will take care of the album artist+artist fields at once.

*Edit*
I changed the way the template is used and things should be more straightforward now, you simply use the template to set your desired values.

beta is refreshed

Re: Tag Field's uses current grid field values

Posted: Tue Mar 18, 2014 4:13 pm
by hopalongrock
jtclipper wrote: I changed the way the template is used and things should be more straightforward now, you simply use the template to set your desired values.
If I am right, now a %% variable references always the current value - in the template the scanned (original) value, at rename the changed (new) value. Very logical.

Re: Tag Field's uses current grid field values

Posted: Tue Mar 18, 2014 4:28 pm
by jtclipper
That's the current implementation yes

Re: Tag Field's uses current grid field values

Posted: Thu May 07, 2015 7:59 am
by boring
I was just looking for a way to do it in one step, and wasn't sure if the current behavior was deliberate or not.