Tagging double albums....

Main discussion forum
Post Reply
dcassidy
Newbie
Newbie
Posts: 1
Joined: Sat Jan 14, 2012 11:30 am

Tagging double albums....

Post by dcassidy »

Hi - just started using the Godfather...great program...

I am trying to rename a double CD from the Amazon data. The only problem is that when I get on to the second CD I cannot start at the offset from the first CD - basically becuase the info returned from Amazon looks like a complete and solitary CD.

I have my two albums in iTunes in two folders..differeing via "Disc n of 2" (each with say 20 tracks)

I would like to reTag and Rename based on AMazon;s output.

I load up folder 1 and rename and retag.

How do I now instruct Godfather to start at Track 21 ??? or is there an alternative method.

Thanks in advcance,

Desmond.

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

Re: Tagging double albums....

Post by jtclipper »

You can use a simple script after you finish with everything else and just before you hit Update tags.

Code: Select all

Program FixTracks;

const _TRACK_NUM = 20;

var
  i, iCount: integer;
begin

  iCount := on_getGrdRowCount;
  if iCount = 0 then exit;

  for i := 1 to iCount do begin
      on_setGrdRow( i );
      on_setGrdField( 'TRACK', IntToStr( _TRACK_NUM + i ) );
  end;

end.
Save this as (for example) fixtracks.scl in your scripts folder

S1000RR
Newbie
Newbie
Posts: 22
Joined: Sat Jan 28, 2012 3:56 am

Re: Tagging double albums....

Post by S1000RR »

Searching for a possibility to add a constant offset to the track number tags (like all CD1 files start with 101.. all CD2 files with 201 ...) I found this script and tried it.
First the extension ".scl" was not visible in the TAG > SCRIPT menu. Then I renamed the extension to ".sct" according to the other scripts which appear there.
After restarting TGF I found the script, set the const _TRACK_NUM = 100 and started the script. But following error message appears:
Compilng error: Unknown Identifier on_getGrdRowCount

So my 1st question: Is there another possibility where I can probably add e.g. 100 to all tracknumber tags in all CD1 folders? (Acually I dont even manage to bring all CD1 folders content to the grid. Multiple selection in the tree is not possible, with filtering for CD1 I dont get any result.)

My 2nd question if 1st is n.g.: How do I get the script working?

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

Re: Tagging double albums....

Post by jtclipper »

The script posted is for the online panel not the tag panel.
Try this one for the tag panel and for your specific task, it will read the last character of the file's folder and if it is a number it will prefix the track field with it.

Code: Select all

program PrefixTrack;

var
  sTmp: string;
begin
  if not tg_Init then exit; // no rows get out
  repeat
    sTmp := Copy( tg_GetField( 'Folder' ), Length( tg_GetField( 'Folder' ) ) ,1 );
    if (sTmp <> '') and (StrToIntDef( sTmp, 0 ) > 0) then begin // probably CD<n> folder
       tg_setField( 'Track', sTmp  + tg_getField( 'Track' ) );
    end;
  until not tg_Skip;
end.
To get multiple folders scanned just select 'sub folders' on the lower left part of the main window and scan the parent folder

S1000RR
Newbie
Newbie
Posts: 22
Joined: Sat Jan 28, 2012 3:56 am

Re: Tagging double albums....

Post by S1000RR »

The script works verry well and it will bring me to my goal.
However it is a workaround and I realized that a album with more than 100 songs will not match.
Actually the tracknumbers can be left like they are, only for renaming the track should get the hundreds.
You invested already much times for my concerns so I dont want to be insistable.
But if you like I would be glad if you can give me a possibility to modify the filename directly without touching the tracknumber.
Perfect would be if there will be a variable which is the last number of the folder which I can put in front of track. When its not a number the variable is just empty.
Albums like 1991 from Lynnrd Skynnrd or Santana 3 will also influence the renaming. If you manage to search the folder name for the combinations in the variable exceptions I suppose the script would bring better results.
However I understand if you close the thread at this point. Unfortunately I dont know Pascal, otherwise I would experiment myself... :-(

When I select parent folder using subfolder I get all subfolders selected. In my case I like to be able to select specific folders even in different levels. At least all which contain folders named with CD...n.

S1000RR
Newbie
Newbie
Posts: 22
Joined: Sat Jan 28, 2012 3:56 am

Re: Tagging double albums....

Post by S1000RR »

Since beeing TGF-addicted and playing with it like children with toy I found my workaround without affecting the tag track#:
1. Renaming all CDn songs with variable n%R (n is CD no. 1, 2, ...)
2. Organizing the songs with scanning the subfolder and saving into a new folder (created by variables in "Details Subfolder" on the right side in "Organizing")

However I couldnt find a possibility to multiselect specific all CD1 folders or filter the filetree at left side which means I have to do each CD folder after another which is little bit of handcraft work.
The rest works just awesome! Somehow the program is like the bird in the logo: The better you know it the more you like it...

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

Re: Tagging double albums....

Post by jtclipper »

I will have a look to see how easy it is to add full % variable functionality to the 'tag filters' so one can filters serve a wider purpose.

Post Reply