You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(legacy): now macro should use show start time when available (#3175)
### Description
Previously the `now` macro used the current time. This is a bit
confusing for autoloading playlists with dynamic smart blocks, as you
have to think about when autoloading happens. This just makes the
autoload datetime be the show start datetime.
**This is a new feature**:
Yes
**I have updated the documentation to reflect these changes**:
Yes
### Testing Notes
**What I did:**
I started up libretime, created an autoloading playlist with a dynamic
block set for one hour ahead. I then created a show with the autoloading
playlist one hour ahead of now and saw that it autoloaded properly and
that the hour matched the show start hour and not the current hour. I
also verified that the now functionality was not changed when not
autoloading by using the preview tracks button on the dynamic smart
block.
**How you can replicate my testing:**
See `What I did` section.
### **Links**
_Issues links or other related resources. Use the line Closes:
#bug_number to
link a bug in the issue tracker._
libretime/libretime@5d7df2f
Copy file name to clipboardExpand all lines: docs/user-manual/playlists.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ Smart blocks are automatically filled with media files from the LibreTime librar
37
37
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.
38
38
39
39
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_.
40
-
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}`. The macro uses the configured station timezone to resolve dates and times.
40
+
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}`. The macro uses the configured station timezone to resolve dates and times. For dynamic autoloading smart blocks the datetime used is the start datetime of the show. In all other cases the current datetime is used.
41
41
42
42
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.
0 commit comments