INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: How to tag field from filename and list variable  (Read 543 times)

PreLives

  • Recent member
  • *
  • Posts: 6
How to tag field from filename and list variable
« 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.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: How to tag field from filename and list variable
« Reply #1 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.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: How to tag field from filename and list variable
« Reply #2 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.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

Spike1000

  • Citizen of the Universe
  • *****
  • Posts: 641
Re: How to tag field from filename and list variable
« Reply #3 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
Pages: [1]   Go Up