Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Defining a range for auto-playlists (Read 852 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Defining a range for auto-playlists

I want to create a playlist that matches for a range of values. Specifically:
%path% HAS "Elvis" AND (%path% HAS "1968, 1969, 1970... or 1977")

Is there a way to create a range? I need two ranges: 1957-60 and 1968-77.

Similarly within the same playlist I want to exclude multiple folders specifically:
%path% HAS "Elvis" AND (%path% HAS "1970" OR %path% HAS "1971"...) AND NOT %path% HAS "High voltage" AND NOT %path% HAS "unedited masters" (so and so forth)

Is there a way to shorten multiple inclusions?


Re: Defining a range for auto-playlists

Reply #1
1. No. You could use Select
https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Title_Formatting_Reference#.24select.28n.2Ca1.2C....2CaN.29
In case you know exactly the position of the values you are looking for in the string, by stripping that part. Don't think that shortens the query anyway.

2 .No.

Re: Defining a range for auto-playlists

Reply #2
If you are willing to do *some* manual work, you can achieve this with Refacets plugin.

I have Refacets in my main window but you can, after installing it, access it via Library->Refacets and do the same without incoporating it to your main UI. You of course need to configure Refacets to show the columns you want, but after initial setting up, it works really nice. You can choose what you want each column to display and after that it's just select and unselect and "Create autoplaylist". I just tried and if you choose the albums you want then the new addition does not get added automatically, so it needs some manual work after every new album. The exclusion part is the hard trick, if you just want the artist and year, then it adds everything with those attributes but if you do to the folder column and choose what you want then only those folders are added and nothing in the future. But it's a sort of solution.

See the screenshots I posted
Two things are infinite: the universe and human stupidity; and I'm not sure about the universe

Re: Defining a range for auto-playlists

Reply #3
Yes, yes there is a way to create a range: years 1965..1970 (inclusive) can be converted to LESS/GREATER comparisons:

Code: [Select]
(date GREATER 1964 AND date LESS 1971)

This handles full dates (YYYY-MM-DD) gracefully, as well. Combining multiple ranges with OR should work as well.

Re: Defining a range for auto-playlists

Reply #4
^ AFTER and BEFORE are probably preferable keywords when dealing with date strings, unfortunately the OP was talking about finding dates in the %path% ... just have to do each one individually like they already had.

Re: Defining a range for auto-playlists

Reply #5
Ouch, thanks for pointing that out. In that case, the (path HAS 1965 OR path HAS 1966 OR ...) chain is probably easiest and best to maintain... however, using much too much title formatting, you might be able to extract the year-bearing substring from your path. In my collection, albums contain the year in `[yyyy]` brackets in their folder name, which can be extracted from the folder name with a fragile snippet like this and then compared against a range in the two `ifgreater` in the end:

Code: [Select]
$puts(y,$add(0,$substr($put(d,$directory(%path%,1)),$add(1,$put(s,$strchr($get(d),'['))),$add(4,$get(s)))))$ifgreater($get(y),1964,$ifgreater(1972,$get(y),1,0),0)

However, this can be quite brittle and depends very much on your folder layout. As a minor insurance, `$add(0)` converts all non-matches to a numeric zero, so that any non-matches are converted to a known value.

Re: Defining a range for auto-playlists

Reply #6
Ouch, thanks for pointing that out. In that case, the (path HAS 1965 OR path HAS 1966 OR ...) chain is probably easiest and best to maintain... however, using much too much title formatting, you might be able to extract the year-bearing substring from your path. In my collection, albums contain the year in `[yyyy]` brackets in their folder name, which can be extracted from the folder name with a fragile snippet like this and then compared against a range in the two `ifgreater` in the end:

Code: [Select]
$puts(y,$add(0,$substr($put(d,$directory(%path%,1)),$add(1,$put(s,$strchr($get(d),'['))),$add(4,$get(s)))))$ifgreater($get(y),1964,$ifgreater(1972,$get(y),1,0),0)

However, this can be quite brittle and depends very much on your folder layout. As a minor insurance, `$add(0)` converts all non-matches to a numeric zero, so that any non-matches are converted to a known value.

I did read up on GREATER and LESS than. I used mp3tags yesterday and extracted the performing dates into the date/year field for all live performances. The issue now is more manual in nature and that's ensuring every relevant song has correctly extracted year field/isn't missing the year field. I might have to keep referring back and forth to my auto-playlist and library to make sure there are no omissions.