MinimServer Forum

Full Version: splitting multi-tags but need some help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Still seeking for a solution that I have software in use which would simply re-merge the appearance of multiple genres stored within seperated genre tags. Since so re-tagging isn't an option at all. It'll end up in an endless retagging for the one or the other software title.

Found a soltution, but it's a bit ugly, better said uncomfortable.
Goes like this:

Assuming an example tag would look like this:
GENRE:Acoustic Rock; Alternative Pop/Rock; Post Grunge

a small util converts that into:
@GENRE=Acoustic Rock; Alternative Pop/Rock; Post Grunge
=GENRE=Acoustic Rock
+GENRE=Alternative Pop/Rock
+GENRE=Post Grunge
which Minimserver handles quite well if added to a tagupdate.txt config file.

workflow at the moment
1. a minimserver rescan with trace enabled for the log since then containing lines like
...main: adding file tag GENRE=Acoustic Rock; Alternative Pop/Rock; Post Grunge
should I mention such a log is more but 3 million lines (~240MBytes) not that fast.
2. process the log convert the lines as mentioned above and add them to my tagsupdate.txt config
3. restart Minimserver

what I'm now after is a way to get a list of all GENRES minimserver came across on a rescan, separated from the rest of the log. anyone with an idea?
You can use the writeAllTags option to get a sorted list of all tag values in the correct format for adding to a tag update file. This should not add any significant overhead to the normal rescanning time.

You could then use grep to extract the lines starting with GENRE and containing a semicolon.
(12-01-2019 22:10)simoncn Wrote: [ -> ]You can use the writeAllTags option to get

I knew there was something like this ... but I didn't remember.

Side effect this now really prints all my fingerprints & analysis in full length.
50 albums resulted in a 300K alltags.txt file, which means 150000 tracks would end up with something multiple times larger but a trace minimlog.

and yes egrep is your friend here, while I must admit I do dislike these cryptic bash'ing things and tend to simply fire up VisualStudio doing some lines of code So that I could control the server alongside Minimwatch from the Windows PC.

thanks for the hint with writealltags
... not to mention that I misscalculated the size of the alltags file due to the fact that around 40000 tracks also have embedded lyrics.
just for the sake I might forget about it in 2 years time ... or in case some others have a similar problem:

egrep 'GENRE=' /volume1/public/alltags.txt | sed 's/\r//g;s/^/\n@/ p;s/GENRE=//;s/\n@/=GENRE=/;s/; /\n+GENRE=/g' >/volume1/public/tagupdate.txt

seems to do the trick. Don't ask me if it could have been done lots easier, I'm definatly more into VisualStudio but bash'ing with crypto-alike linux commands.

The separator in here is "; " just in case someone wants to try while using a differnt one. (once used in the command)
the path&filename must get adjusted to your needs.
And a small misery remains, it simply processes all genres found within the alltags file. One could surely extend this command by filtering out the ones not containing any delimiter since these could get skipped. But I'm too lazy to do this right now.

And one could easily fire this command through plink.exe just in case one sits in front of a windows machine.
Reference URL's