From 142d7111e560a86a8408735dc9517a1b26e3d317 Mon Sep 17 00:00:00 2001 From: libretime-bot Date: Sat, 22 Jun 2024 09:19:47 +0000 Subject: [PATCH] feat(legacy): add current date macro to string block criteria (#3013) ### Description It is useful to be able to automatically filter tracks to a certain date or day when scheduling tracks for playback. This adds the ability to do just that in any string filter with the `date{format}` macro. Closes: #3012 libretime/libretime@451652bc4002b142ab9cf33ae517451c4966134f --- docs/user-manual/playlists.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/user-manual/playlists.md b/docs/user-manual/playlists.md index 4cf99aa..d7e5ab1 100644 --- a/docs/user-manual/playlists.md +++ b/docs/user-manual/playlists.md @@ -37,6 +37,7 @@ Smart blocks are automatically filled with media files from the LibreTime librar To create a smart block, click the **Smartblocks** button on the left sidebar, and select **New** from the toolbar. Like a playlist, smart blocks can have a title and description, which you can edit. This helps you find relevant smart blocks in searches. Fill out the smart block's **Name**, **Search Criteria**, and **Limit to** sections. The search criteria can be any one of LibreTime's metadata categories, such as **Title**, **Creator** or **Genre**. The modifier depends on whether the metadata in question contains letters or numbers. For example, **Title** has modifiers including _contains_ and _starts with_, whereas the modifiers for **BPM** include _is greater than_ and _is in the range_. +To filter tracks using today's date information, use the `now{}` macro. Format characters are listed in the [php documentation](https://www.php.net/manual/en/datetime.format.php). For example, to filter to tracks with a **Title** that ends in `Instrumental Jan 2024` where `Jan 2024` is the current month and year, add a criteria for **Title** with a modifier of **ends with** and a value of `Instrumental now{M Y}`. If you have a large number of files which meet the criteria that you specify, you may wish to limit the duration of the smart block using the **Limit to** field, so that it fits within the show you have in mind. Select **hours**, **minutes** or **items** from the drop-down menu, and click the **Generate** button again, if it's a static smart block. Then click the **Save** button.