Author Topic: Help with the year field  (Read 240 times)

Sally-san

  • Newbie
  • *
  • Posts: 1
I just started using music bee, its amazing i love it. my only issue is my year tag.



The year field cant handle different formats, is there a setting/extension that can fix this? Is there a tool i can use to help me fix this mp3tag didnt seem to do the job

the Year (YYYY) field didnt work either because it just took the first 4 characters it didnt actually find the year in the description. So the year would me "15/0"

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1139
  • Heal The World
Hi there, welcome to the forum.

The year field cant handle different formats, is there a setting/extension that can fix this?
Is there a tool i can use to help me fix this.
"Fix" can mean a hundred things here. How should these <year> values look like once "fixed"?

What's the end goal here, to remove the day and month in the date stored in the <year> tag?

If all you want is a field to display just the year (4 digits), then,
create a MusicBee virtual tag with the formula:

Code
$IsMatch(<year>,"\d{4}")
Last Edit: May 16, 2024, 06:16:13 PM by Mayibongwe
The source code to any of my contributions is available on the same download link as the add-ons

MotleyG

  • Full Member
  • ***
  • Posts: 156
This probably needs more hands on than a simple single solution. What about dates like these that all refer to the same day?
15/06/2019
2019/06/15
15-06-2019
2019-06-15
20190615

These can be further compounded by additional info like time.

I'd suggest filtering the year field and looking for different characters like the slash / and dash - and working on those separately. Then next look for those with a length greater than 4 characters and fix those too.   

tjinc

  • Sr. Member
  • ****
  • Posts: 379
I think Mayibongwe meant:
Code
$RxMatch(<year>,"\d{4}")
which will give you the year only, but I do agree with MotleyG that it would probably be better to correct the underlying data in the <Year> field.


What does surprise me is that you say the <Year (yyyy)> field didn't work - it seems to work very well as seen here:

The only ones failing here are the text ones (and I've never actually seen this, I was just testing). I would expect that all the ones in your image should work.

One other question - what file format are your tracks ?  If they are mp3 then a file rescan should reset the <Year> field to your system short date format (but this only works for mp3).
Here is the same list after a file rescan: