INTERACT FORUM

More => Old Versions => JRiver Media Center 24 for Windows => Topic started by: PreLives on February 03, 2019, 04:23:58 pm

Title: How to tag field from filename and list variable
Post by: PreLives on February 03, 2019, 04:23:58 pm
Is there an expression that I could use in my auto-import that would allow me to tag the an individual 'field' by looking at that 'fields' 'list of values' to see if one of the values is located within the file name.

For example:

File Name = Beatles - Hey Jude
Within my library, the lists of artists are Amy Winehouse; Beatles; Coldplay; etc.

I'd like to have the auto-import to do a sub-string search of the file name against the list of artists in my library and tag the [Artist] field based on the match. 

I tried... =Ifelse(isequal([Name], ListBuild(1, ;,[Artist]), 8 ) , [Result]

but don't know what to put in place of [Result] and I think the ListBuild is only generating a list from that specific files [Artist] field, which in this case is blank.

I'm aware of the 'Fill Properties From File Name' tool, but in this case, the naming conventions for the files are random, and I'd prefer to tag from import.
Title: Re: How to tag field from filename and list variable
Post by: blgentry on February 03, 2019, 05:10:26 pm
I think what you're seeking is for MC to kind of automatically figure out your file names and what they contain.  MC has some capabilities to do this; it's called Carnac.

https://wiki.jriver.com/index.php/Carnac

I'm not sure how many different formats Carnac understands for audio (the ordering of the tags in the file name).  The wiki only lists 2, but I would actually expect it to understand more than just those.

As far as I know, trying to do a match against existing fields won't work.  There's not even a way to get (for example) all artists from the [Artist] field using an expression. 

Are you aware of MC's "fill properties from filename" tool?  You can set up templates so MC will grab the artist name from one part of the file name, the song from another, etc.  If you were to set up 4 or 5 patterns like this, you could apply this tool to large groups of files which match the pattern and you should be able to get proper tags for a good majority of your files, as long as their names make some kind of sense.

Hopefully this gives you something to go on.  Good luck!

Brian.
Title: Re: How to tag field from filename and list variable
Post by: RoderickGI on February 03, 2019, 08:33:56 pm
As far as I know, trying to do a match against existing fields won't work.  There's not even a way to get (for example) all artists from the [Artist] field using an expression. 

This.

MC doesn't store a table of Artists anywhere. It just stores Artists against files it already knows about, and dynamically builds a list of Artists for use in the drop-down list you see within MC each time the list is required. That list is built by the MC code, and I don't know of any way to build an equivalent list to test again using the Expression language.

CARNAC and "Fill properties from filename" using templates are the tools to use to do what you want.
Title: Re: How to tag field from filename and list variable
Post by: Spike1000 on February 04, 2019, 03:12:53 am
Try an external tagging tool (I use MP3Tag). This one has a filename to tag function that uses expressions/templates eg %artist% - %title% . It won't do it at import time but you can bulk modify all your files (or as many as you're comfortable with) in a one off operation in advance  that would only take a couple of minutes.

It's handy for getting a global overview of the quality of your tagging in one big "excel" style grid.

Spike