Author Topic: How to search for songs with year fields that do not contain the character "-"?  (Read 238 times)

alice

  • Newbie
  • *
  • Posts: 2
I used to record only the year itself in the year field for my music collection (ex. 2022). I eventually started recording the full release date in the year field (ex. 2022-11-04). I am now updating my old files to store the full date as well. I would like to be able to search for the songs that need updating by looking up all files for which the year field does not contain the character "-". Is there anyway to do a negative search like this with the search bar? I know you can use regular expressions in the search and replace tool and it would be nice to be able to use them in the search bar as well but I haven't figured out how. I also tried using custom searches but because the year field is a date it does not give the options for whether the field contains a phrase like the string metadata types do. As a sidenote I currently accomplish my task by sorting by year descending and clicking on years in the A-Z jump bar and so the first entries in the sort are the ones just with years.

hiccup

  • Sr. Member
  • ****
  • Posts: 7790
What you can do:

Create a virtual tag like:
label: year (v)
formula: <Year>

Then create a library filter or a playlist that has: 'does not contain -'

alice

  • Newbie
  • *
  • Posts: 2
What you can do:

Create a virtual tag like:
label: year (v)
formula: <Year>

Then create a library filter or a playlist that has: 'does not contain -'


This worked perfectly. Thank you.