Working with gtags

Use this forum for everything concerning script usage
Post Reply
Benji99
Newbie
Newbie
Posts: 8
Joined: Thu Dec 02, 2010 7:51 pm

Working with gtags

Post by Benji99 »

Hi Dimitri,

I'm trying to get my script to work and I need to use gtags...
Looking at my old scripts, I was using a function called on_getGrdRowCount to get the number of audio tracks in the folder.
I would then use a for loop to cycle through the files and tag appropriately. It seems that on_getGrdRowCount is no longer a valid function, has it been replaced by something else? In the documentation, I found this function: on_getGrdAlbumRowCount, but it only returns 0...

Also while I'm at it, the functions on_setGrdRow and on_loadFile still work?

Thanks in advance!
Sebastien

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

Re: Working with gtags

Post by jtclipper »

Since the Online panel merged with the tag and other panels those functions are replaced with the equivalent tg_ ones

so in order to get through the files you need the standard

Code: Select all

  tg_Init;
  repeat
    tg_LoadFile; 
    // do something here
   
  until not tg_Skip;
(The on_getGrdAlbumRowCount returns the rowcount of the Online mini panel's track grid)

Benji99
Newbie
Newbie
Posts: 8
Joined: Thu Dec 02, 2010 7:51 pm

Re: Working with gtags

Post by Benji99 »

Hi Dimitris,

Sorry to bother you again, need a small clarification...

I used to use gTag.ExtraFieldsAdd( 'string', 'string' ); but it seems you added another attribute bComment: boolean = false. what is it for? I tried it would be True and False and don't see any difference with the results.

Thanks!

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

Re: Working with gtags

Post by jtclipper »

This is of minor importance, it is used to store 'user comments' an ID3 specific structure that allows multiple comments with a description.

Code: Select all

//This will add an ID3v2 user comment with 'My rating' as it's description
gTag.ExtraFieldsAdd( 'COMMENT/My rating', 'abc abc', true );

//This will add a User field as usual
gTag.ExtraFieldsAdd( 'My rating', 'abc abc', false );

Post Reply