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: Autocomplete tag value based on another tag value (Read 3404 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Autocomplete tag value based on another tag value

Is there a way, preferably within foobar, to autocomplete a missing tag field based on an already existing same tag value for that field where another tag field value is commonly present.
Perhaps an example can explain it more simply. Say I have for the artist Queen 100 different files. Of all these files 70 have a %musicbrainz_artistid% tag present while the rest have not. Is it possible to autocomplete the other Queen files who don't have the %musicbrainz_artistid% tag present. So basically if Y is present then autocomplete Y of all X where Y is missing and X=X based on Y present in X. In this case Y=musicbrains_artistid and X= artist.

I have my doubts this is possible with foobar2000 and I think MP3tag can't do this either. If so are there any other options how one would approach this?

Re: Autocomplete tag value based on another tag value

Reply #1
...

Re: Autocomplete tag value based on another tag value

Reply #2
With foo_customdatabase you can store the musicbrainz id in a virtual tag (which is actually stored in the custom database and not in the music file itself), using the artist name as a key value or possibly a combination of the artist name and one or more disambiguation tags. Once a specific musicbrainz id value is linked to an artist, it will be automatically associated to every file  by that same artist, as a calculated value.

Unfortunately the component is known as buggy, even though I've been using it for months in a similar way, for genre classification, and have no issues.
I'm late

Re: Autocomplete tag value based on another tag value

Reply #3
I like to avoid using anything that doesn't store info in the tags themselves for workflow/config build reasons and cross use of other foobar2000 components.

Re: Autocomplete tag value based on another tag value

Reply #4
Me too, on the other hand writing them as virtual tags ensures the referential integrity of the data. Anyway mind that you can refer to cutomdb tags in titleformatting expressions just like id3 tags. I use custom tags in other components scripts, like foo_run and esplaylist.
I'm late

Re: Autocomplete tag value based on another tag value

Reply #5
OP: Do you mean "autocomplete" as in type-ahead-and-get-suggestion, or do you mean to automatically populate?

Re: Autocomplete tag value based on another tag value

Reply #6
Perhaps I should have used automatically populate instead of autocomplete. Yes, I mean automatically populate.

Re: Autocomplete tag value based on another tag value

Reply #7
I'm not sure you could do it completely automatically with Mp3Tag, but it should be easy enough to set it up so you can do it with a few mouse clicks. I don't know anything about MusicBrainz but assuming %musicbrainz_artistid% is field in an ID3 tag, you should be able to create the field under Tools/Options/Tag Panel. Name it however you like but then you'll have it shown in the left tag panel.

Load all the MP3's that should have the same artist ID tag, highlight them all, type Queen into the MusicBrainz Artist ID field (or select it from the drop down list if some fields already contain the correct data) right click on the highlighted files and select save.

Just make sure the rest of the fields are correct, or have "keep" or "blank" selected as appropriate. You should also be able to create a custom column to display the field data that way too, if you wish.


Re: Autocomplete tag value based on another tag value

Reply #8
It think you misinterpreted the purpose of my question. Automation is the purpose, If I need to add artists one by one and fix the tags it kinda defeats the purpose because I'm doing that already.

Here's a more practical example for illustration purposes. Say you have a large library with a multitude of different artists, lets say 1000 different artist, and you've spend your time to add all their respective musicbrainz_artistids. And then you think you're finished but notice after a few months of adding new music with lots of various artists compilation  you got a couple of hundreds of artists to again fill the tag value and 90% of those already have those musicbrainz_artistid tags present but in other files. So instead of again searching for the musicbrainz_artistid tag either via web or via your already present tags doesn't matter, takes as much work since you still have to go artist by artist.
To automate this process would mean a algorithm could iterate over the combinations of values artist - musicbrainz_artistid and see which one have the corresponding musicbrainz_artistids missing and fill in the gaps if it finds an already existing musicbrainz_artistid for that artist in the other artist - musicbrainz_artistid combination and do this for a multitude of artists and not just one by one. The larger your collection of already present musicbrainz_artistid the higher the chance of course it would find ids and fill it in for you.

Maintaining consistent ids across the board is a never ending job with lots of repetition for fixing the same artists over and over again because a music library always grows. A tool to automate this process would just mean an occasional scan once in a while and then fix the remaining artists who are newcomers (ie not present with an mbrainz id already existing in library) yourself.

Re: Autocomplete tag value based on another tag value

Reply #9
The whole point of the method I offered is you can do them in groups, not one by one, so for your example it's easy enough to find the 30 Queen files that have an empty MusicBrainz Artist ID field and fill them all at once. In fact all you need to do is group all the files by artist and select the ones that should have Queen in the MusicBrainz Artist ID field and fill them all with "Queen" as described. No need to know which ones have an empty MusicBrainz Artist ID field as such.

You can also create an Action to do it automatically, and only for those with an empty MusicBrainz Artist ID field if you group them first. I'd not done it before myself so I wasn't sure you could, but I worked out how to create an Action to copy the Artist field to the Album field easily enough, and the principle should be the same.

Create another column for MusicBrainz Artist ID. Load your collection into Mp3Tag. (Optionally) click on the "Artist" column to sort by artist. Next sort by MusicBrainz Artist ID, which should put all the files with an empty MusicBrainz Artist ID field together at the top, and they'll be sorted by Artist if you sorted by Artist first.

Create a new Action for "Format Value" to copy one field's data to another, like so. This example copies the artist field to the album field, which I selected from the list, but you should be able to specify it as %album% if need be.



Then it should simply be a matter of highlighting all the files with an empty MusicBrainz Artist ID field, right clicking, selecting Convert/Actions, and ticking your newly created Action in the popup window. Or select it from the Actions menu at the top.

Re: Autocomplete tag value based on another tag value

Reply #10

To automate this process would mean a algorithm could iterate over the combinations of values artist - musicbrainz_artistid and see which one have the corresponding musicbrainz_artistids missing and fill in the gaps if it finds an already existing musicbrainz_artistid for that artist in the other artist - musicbrainz_artistid combination and do this for a multitude of artists and not just one by one. The larger your collection of already present musicbrainz_artistid the higher the chance of course it would find ids and fill it in for you.


The problem is that by using only the artist value , you may have more than one musicbrainz_artistid.
How could the automation select the right value ?
eg The artist "tears" has 6 different .
https://musicbrainz.org/search?query=tears&type=artist&method=indexed

I suggest  to either use Picard https://picard.musicbrainz.org/  or beets http://beets.io/  to supplement your tagging.

 

Re: Autocomplete tag value based on another tag value

Reply #11
The whole point of the method I offered is you can do them in groups, not one by one, so for your example it's easy enough to find the 30 Queen files that have an empty MusicBrainz Artist ID field and fill them all at once. In fact all you need to do is group all the files by artist and select the ones that should have Queen in the MusicBrainz Artist ID field and fill them all with "Queen" as described. No need to know which ones have an empty MusicBrainz Artist ID field as such.

You can also create an Action to do it automatically, and only for those with an empty MusicBrainz Artist ID field if you group them first. I'd not done it before myself so I wasn't sure you could, but I worked out how to create an Action to copy the Artist field to the Album field easily enough, and the principle should be the same.

Create another column for MusicBrainz Artist ID. Load your collection into Mp3Tag. (Optionally) click on the "Artist" column to sort by artist. Next sort by MusicBrainz Artist ID, which should put all the files with an empty MusicBrainz Artist ID field together at the top, and they'll be sorted by Artist if you sorted by Artist first.

Create a new Action for "Format Value" to copy one field's data to another, like so. This example copies the artist field to the album field, which I selected from the list, but you should be able to specify it as %album% if need be.



Then it should simply be a matter of highlighting all the files with an empty MusicBrainz Artist ID field, right clicking, selecting Convert/Actions, and ticking your newly created Action in the popup window. Or select it from the Actions menu at the top.

MP3tag by no means has the capacity to iterate and check and retrieve corresponding combination of values and then autopopulate and do this for not one but x amount of artists at once. Your method formats values between tag fields within the same file, sure you can group them but you'd still be working on an artist by artist basis which I can do fine enough within foobar with automatically add values but the reason I started this thread is to search for something to avoid that and work with multiple artists at once.
While any advice is appreciated please restrain from posting if you don't fully understand what is being asked, I don't like to waste my time trying to explain myself over and over again when I made it sufficiently clear from the beginning (or at least after a few posts).

Re: Autocomplete tag value based on another tag value

Reply #12
@zeremy  I would think during iteration when multiple id values are found for an artist then autopopulate for said artist would be skipped and not filled.
If by using picard or beets you're suggesting to get the values online that would still mean I would need to look up all files where I have missing ids. And that would also only work for albums that are found in the online database.

Re: Autocomplete tag value based on another tag value

Reply #13
Yes , you could skip ambiguous entries.
Using beets you could match the corresponding artist with acoustid (chromaprint) , it doesn't have to be a complete album.
But yes it will be an online search and there must be a match in the database.

You could easily find missing entries with a query http://beets.readthedocs.io/en/v1.4.3/reference/query.html

Re: Autocomplete tag value based on another tag value

Reply #14
Yes , you could skip ambiguous entries.
Using beets you could match the corresponding artist with acoustid (chromaprint) , it doesn't have to be a complete album.
But yes it will be an online search and there must be a match in the database.

You could easily find missing entries with a query http://beets.readthedocs.io/en/v1.4.3/reference/query.html


Beets looks interesting, will look into that a bit further. Thanks.