Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Track field shows data from two fields (Read 1583 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Track field shows data from two fields

Some of my mp4 audio files display their track data like this: 1; 1

It seems that foobar displays two fields in the track field. How can I change this?

I'm using foobar2000 1.6.13

Re: Track field shows data from two fields

Reply #1
Anyone?  :(

Re: Track field shows data from two fields

Reply #2
First you'll need to find all the tracks with multiple values presumably in the tracknumber tag???

Assuming all files are in your library, use the Library menu>Search

Code: [Select]
"$meta_num(tracknumber)" GREATER 1

Now use Ctrl+A to select all results, right click, Properties.

Now double click the Track number field and ensure all values are identical. If you confirm this, you can close that dialog and then right click Track number > Format from other fields. Use this as the pattern

Code: [Select]
$meta(tracknumber,0)

Check the preview and then use the OK button. This writes the first value as the only value in the tag.

Re: Track field shows data from two fields

Reply #3
Thanks for your suggested solution. However, the music database I use (Mediamonkey), writes them back in every time I edit the metatags for compatibility reasons with iTunes. According to the manufacturer, there is no way to change the behavior.

Therefore, I hope for a reading / displaying solution in foobar.

Re: Track field shows data from two fields

Reply #4
Thanks for your suggested solution. However, the music database I use (Mediamonkey), writes them back in every time I edit the metatags for compatibility reasons with iTunes. According to the manufacturer, there is no way to change the behavior.

Therefore, I hope for a reading / displaying solution in foobar.
Use the last bit of code marc offered up as your tracknumber display.

What the code does is pulls the first of the tracknumber tags (it starts at 0), so instead of using it in a process to overwrite the entire tag you're just going to display it. The outcome should be the one you're looking for.

Re: Track field shows data from two fields

Reply #5
Is it two tracknumbers? Or discnumber / tracknumber? In the latter case you might need a more involved code to (1) decide if it has more than one field, and (2) if it has, possibly select the last one.

Re: Track field shows data from two fields

Reply #6
@Porcus


@PredUK
I'm not sure right now. Does that mean I have to do this every time I add new music?

Re: Track field shows data from two fields

Reply #7
Here is what you do:

Under Preferences -> Display -> Default User Interface -> Playlist View,
you will see a "Custom columns" window.
Add new.
Call it something like "Track!" to distinguish it.
Under Pattern, fill in
$meta(tracknumber,0)

Now you have the column defined. The next step is to right-click on a column in the playlist, and under Columns you will find this at the bottom and can select it for viewing.
Now it will be the rightmost column, but you can move it with the mouse.

This will not alter the actual metadata, only alter your view: It will instead of the entire %tracknumber% tag show the tag's first value.

Re: Track field shows data from two fields

Reply #8
Thank you very much. That was what I could not find. Works very well.

Only I could not find a way to place an extra '0' in front of a single digit track. It does not behave like %tracknumber%. Is there any way to have this as well?


Re: Track field shows data from two fields

Reply #10
https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Title_Formatting_Reference is a source of elevating your level of confusion to being totally lost in a more sophisticated forest :-)

To get the actual tags fixed, then - WARNING: back up before trying any of the following!

* Mp3tag may help. Dump a ton of files into the window, select all, Ctrl-x will cut (i.e. remove from file but keep in clipboard) and Ctrl-z (for "undo") will write back the tags in a sane format.
Could go wrong if you have a crash or power outage while it is working.

* This component: https://www.foobar2000.org/components/view/foo_sanitizer
Could go wrong: might remove more than you want it to, even if you choose to keep "*" (wildcard for "all" - but that isn't "all", it is "all that fb2k knows").

Re: Track field shows data from two fields

Reply #11
@marc2k3:
That works 👍

Thank you very much both for your help 🙏

Re: Track field shows data from two fields

Reply #12
The symptom is taken care of, but I'm still curious about the cause. Why would MediaMonkey think files need a multivalue tag for iTunes compatibility? Track number is one of the most basic, universal tags possible, isn't it?

Re: Track field shows data from two fields

Reply #13
What does Mp3tag show?
Click the "Extended tags" button. On my setup it is next to the Aa buttons.