New Script Filter

You are missing a feature or need an enhancement? Post your suggestion here!
Post Reply
User avatar
Quentin D
Posts: 89
Joined: 20 Aug 2015 13:18
New Script Filter

Post by Quentin D »

Hi Bernd,
Could it be possible to add a new filter for the current day of week in the script options, such as "[Day Of Week] = 1" for Monday ?
I would like to use the same script and play certain tracks only on monday, another on tuesday, etc.
Thanks
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: New Script Filter

Post by radio42 »

A 'date or day filter' would not make sense for a script-line filter, as a script-line filter limits/selects certain tracks out of a media-lib...
and how should you select tracks out of a media lib by a given current date/day - as a track doesn't have any day attribute? That doesn't sound it makes logically sense.

But note, that there are already track relates 'Restrictions' as well as 'Rule Sets' available - e.g. see the 'Other' tab of the TAG Editor when editing a certain track!
Here you can already limit the playback of a track on certain days, days of the week, time ranges etc.

Else, you can still use e.g. the 'Comment' field of the track and e.g. use a comment text like this:
DayOfWeek=1
and then use a 'Contains' script-line-filter using the ${dow} macro (1=Mon...7=Sun) with it.
Something similar was asked here: viewtopic.php?f=8&t=1714
User avatar
Quentin D
Posts: 89
Joined: 20 Aug 2015 13:18
Re: New Script Filter

Post by Quentin D »

Ok, I see what you mean. The Other tab in the tag editor seems to be what I want, but the problem is that the tracks I want to restrict are weekly podcast, in a media library using auto watch, I don't want to do that manually...
Is it possible to do the same thing to a media library?
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: New Script Filter

Post by radio42 »

How should that be handled automatically (;-)?
As such, I guess you need to 'tag' your tracks accordingly (and yes, you can of course also tag your media lib files accordingly), or...
you need to create/organize your media libs accordingly (e.g. one lib per day of the week) and then pick them in related scripts (you would then also need one script per day of the week).
User avatar
Quentin D
Posts: 89
Joined: 20 Aug 2015 13:18
Re: New Script Filter

Post by Quentin D »

Thanks for the tip, i'll take a look ;-)
And btw, when I select multiples libraries in a line ("ANYOF:"), it seems works using the OR operator, resulting nothing depending of the filters (it select a library first, the applies the filters). I would like to use multiple libraries using the AND operator before the filters.
I hope I am clear :?
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: New Script Filter

Post by radio42 »

Yes, what you describe that is exactly how 'ANYOF:' is designed (it first selects randomly a media lib from the ANYOF list and then it applies the filter to that picked media lib)!

The other way around would be very inefficient and would logically result is exactly the same ;-)
(except the filter wouldn't match any track out of certain media libs; in which case you might exclude them from the ANYOF list anyhow)
User avatar
Quentin D
Posts: 89
Joined: 20 Aug 2015 13:18
Re: New Script Filter

Post by Quentin D »

Why would it be inefficient? I use very strict filters, such as :

Code: Select all

[Modification Age in Days] <= 7.0 And [Play Counter] <= 1 And [Last Played in Days] >= 1.0
In my example, every lib contains weekly podcasts. As it is a daily script, I get nothing if the random selected library was the same than the day before. I could make a script for each day, but if I edit the content, I have to edit others, that's why it could be useful for me ;)
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: New Script Filter

Post by radio42 »

It is inefficient when you think of multiple libs containing tens of thousand of tracks...
Anyhow, it is the way it works and there are no plans to change the current behavior.

In you case why don't you use a single media lib with all your 'podcasts'?
In case you also need them seperated you might in addition to the individual folders also use a common parent folder as a media lib and use that one for this script...
User avatar
Quentin D
Posts: 89
Joined: 20 Aug 2015 13:18
Re: New Script Filter

Post by Quentin D »

The 'podcasts' files are in different folder or hard drive, but i'll try to find a workaround.
Thanks
inl_inc
Posts: 76
Joined: 12 Dec 2013 18:42
Re: New Script Filter

Post by inl_inc »

You definitely want to use the day-parting rules under the Other tab as Bernd mentioned. First create a set of rules, for example Mondays, Tuesdays, or whatever. Then apply these rules to your tracks. If you keep your podcasts in a single library, a script entry to select a random track from the podcast library would always follow your dayparting rules. I.e. if it runs on Monday - it will only select a podcast with a Monday restriction on it ... etc.

Post Reply