Help - Search - Members - Calendar
Full Version: Small problem with masstagger in 0.8.3
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
andreas
Hi,

maybe, I'm just stupid. I'm trying to do the following:

Files are organized like this:
artist\date - album\album - tracknumber - title
or in case of multiple CDs:
artist\date - album\CD n\album - tracknumber - title

I know about discnumber tag, but since it's mostly not present in my files and my albums are named "album - CD n" in case of multiple CDs, I tried it with the following:

CODE
%artist%\%date% -
$if($stricmp($left($right(%album%,4),2),CD),
$caps2($left(%album%,$sub($len(%album%),7)))\$right(%album%,4),
$caps2(%album%))
\$caps2(%album%) - $num(%tracknumber%,2) - $caps2(%title%)


This is supposed to be used with Move/Rename files in masstagger.
When editing the new rule in masstagger, the preview line shown under the the editor field for the formatting string looks just like I'd expected. But when choosing the new rule to be applied to files I get a [SYNTAX ERROR IN FORMATTING STRING] right after "date -".

What am I doing wrong?
Why is the preview different from the actual application of the rule?
Anybody a idea?

I know, it'll surely be a typo or something alike, but after looking at the string for quite some time now, counting the braces forward and backward, I think, I'm just too blind to see.

Thanks in advance,
Andreas

EDIT: added line breaks into format string
put format string into code tag and reformatted for better readability
MrMuffin
I tried to do something similar to what you're doing, but found that foobar doesn't like it if you put a directory seperator, '\' , inside of an IF statement. Exact same thing happened to me, and I just had to go about it differently. For multiple CD albums I just append the disk number in front of the track number, so it goes like this:

1.01 - title
1.02 - title
...
2.01 - title

and so on.
andreas
Hm?
Thanks for the hint, you're obviously right.
I continued playing around a bit, but I still didn't come up with a solution.
I tried to put the problematic part (where I generate the subdir "CD n") into a temporary variable, but this doesn't work either.
Also masstagger seems to handle "\" and "/" exactly in the same way. It doesn't like "/" in if-statements either.
This is also true, if I generate the path-separator ("/" or "\") with $char(47) or $char(92).

The hint with changing the filename surely works, but is no option for me, because I'm in the middle of sorting. And changing the name's format,k would mean, starting all over again. Thanks though, but I should have thought about this about two years ago... sad.gif

So I guess, I do have to stick to two separate rules and switch between them manually?

Or has anybody some other idea?

EDIT: typo
kjoonlee
You could install 0.9 instead of 0.8.3. I think there were some changes related to this problem.
andreas
QUOTE(kjoonlee @ May 24 2006, 20:52) *

You could install 0.9 instead of 0.8.3. I think there were some changes related to this problem.


We're getting off-topic here:
I do already have installed 0.9.1 and am happily tweaking it, waiting for all my beloved plugins to get ported and exploring all the new possibilities. It is installed in parallel though and I can't use it up to now, because of the ID3-Tag V2.4 issue, discussed all around here. And I'm afraid I wont switch to 0.9.1 until this hasn't changed (at the moment this seems to be never sad.gif ), because I do have several devices, which are not correctly reading those tags. These are namely my phone, my mp3-Stick, my DVD-player (I'll probably throw that out of the window, and perhaps the next one will) and the CD-player in my car (a Becker Mexico Pro 7932). Especially the last one is an absolute "no-go" for Foobar 0.9.1, because it would mean to retag every file before using it in the car. I'm trying to convince Becker for half a year now, to update their firmware, but sadly, I'm running out of hope.
And please don't tell me, 0.9 won't touch the tags. I want to use Foobar to manage the tags, want to use foo_playcount and other things, so this is no option.
0.9 is terrific, but I'm not able to use it for my needs. This is no accusation against the developers, since foobar 0.9 is free, I think they have the right to develop it in any way they want to. Only for me, 0.9 is no option, 0.8.3 fits my needs and I can only hope, that there're still some 3td party developers continuing to support their plugins.
kjoonlee
You're missing my point. If it's installed in parallel, why not just run 0.9.1 once in a while to move files?
andreas
Quite easy. If I used 0.9 to move my files, I could as well use any other tool to move my files. 0.8.3 won't recognize it, with all negative implications:
- need to remove files from all playlists
- remove dead files entries from the database
- readd the moved files into the database
...
kjoonlee
And all of that's quite easy. Just drag-and-drop the new directories onto foobar2000, then use hotkeys to delete dead entries and remove duplicates.

Ctrl-Del and Alt-Del work fine for me.

I even use Ctrl-PageUp and Ctrl-PageDown to navigate playlist tabs. Easy.
andreas
I do know this is possible.
Removing dead entries does take quite some time, if we're talking about a larger amount of files.
And even worse a larger amount of playlists.

I think, we're loosing the point here.
I'm not looking for other ways to achieve this manually (which I do for quite some time now, including your proposed hot-keys), but the topic of this thread is, that I was trying to automate this stuff and it didn't work out as expected. There's no criticism in this, but my simple wish, why it didn't work out (which I know now, and obviously I wasn't that dumb as i expected) and if there's another format string to work around this.
Nevertheless thanks for your hints.

I know now, that slashes and backslashes irritate the masstagger, and need to think about a new way to achieve this.
Purple Monkey
The best you can do is evaluate the $if() per directory. The good thing is that foobar will consider any '\\' or '//'s as a single directory seperator, so if you don't want a directory just make sure that there is no output from that $if() statement.
andreas
Ah, man, great biggrin.gif
Thanks a lot! That was the information I was missing and looking for.

Now, the string works with only very little changes just as I wanted it to.

CODE

%artist%/%date% -
$if(
$stricmp($left($right(%album%,4),2),CD),
$caps2($left(%album%,$sub($len(%album%),7))),
$caps2(%album%)
)
/
$if(
$stricmp($left($right(%album%,4),2),CD),
$right(%album%,4),
)
/$caps2(%album%) - $num(%tracknumber%,2) - $caps2(%title%)


(Inserted newlines for better readability, I guess, you nered to remove them to use the string)
Thanks Purple Monkey,
I really appreciate your help,
Andreas
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.