Tag Field's uses current grid field values

Report a bug or a problem.
Post Reply
gaberad
Newbie
Newbie
Posts: 2
Joined: Tue Mar 18, 2014 3:31 am

Tag Field's uses current grid field values

Post 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 5220 times
After Apply
Capture2.PNG
Capture2.PNG (12.17 KiB) Viewed 5220 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)

hopalongrock
Sr. Member
Sr. Member
Posts: 289
Joined: Wed Sep 15, 2010 1:38 pm

Re: Tag Field's uses current grid field values

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

gaberad
Newbie
Newbie
Posts: 2
Joined: Tue Mar 18, 2014 3:31 am

Re: Tag Field's uses current grid field values

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

hopalongrock
Sr. Member
Sr. Member
Posts: 289
Joined: Wed Sep 15, 2010 1:38 pm

Re: Tag Field's uses current grid field values

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

User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: Tag Field's uses current grid field values

Post 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

hopalongrock
Sr. Member
Sr. Member
Posts: 289
Joined: Wed Sep 15, 2010 1:38 pm

Re: Tag Field's uses current grid field values

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

User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: Tag Field's uses current grid field values

Post by jtclipper »

That's the current implementation yes

boring
Newbie
Newbie
Posts: 1
Joined: Thu May 07, 2015 6:58 am

Re: Tag Field's uses current grid field values

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

Post Reply