Current day expire time for news
-
- Posts: 15
- Joined: 12 Aug 2016 16:48
Current day expire time for news
Hi Bernd,
Is there a way to schedule news for the current day only? By setting the Max. Age to 1, the news are currently played during 24 hours relative to the file's timestamp.
It would be useful to have an option to check the validity relative to the day, instead of relative to the timestamp,
e. g.: I add an audio file in the news folder at 6 PM, I set the Max. Age to 1, after 11:59:59 PM the file expires. If I set the Max. Age to 2, it should expire the next day at midnight, not after 48 hours.
This would be used in situations where the news are only valid during the current day, having been added in the same day.
Thanks!
Andrei
Radio Terra @ Romania
Is there a way to schedule news for the current day only? By setting the Max. Age to 1, the news are currently played during 24 hours relative to the file's timestamp.
It would be useful to have an option to check the validity relative to the day, instead of relative to the timestamp,
e. g.: I add an audio file in the news folder at 6 PM, I set the Max. Age to 1, after 11:59:59 PM the file expires. If I set the Max. Age to 2, it should expire the next day at midnight, not after 48 hours.
This would be used in situations where the news are only valid during the current day, having been added in the same day.
Thanks!
Andrei
Radio Terra @ Romania
Re: Current day expire time for news
That is a good point and I'll add this to the ToDo/Feature list!
Bernd - radio42
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
-
- Posts: 15
- Joined: 12 Aug 2016 16:48
Re: Current day expire time for news
Excellent news! Thanks a lot!
Re: Current day expire time for news
I already took a look to the current code. And it is actually already only measuring full calendar days based on the file's 'LastWriteTime' (which is the modification date) - however, it considers only the full date portion and NOT the time.
E.g. when a file is last modified on: 2017-08-27 14:55; it would have on the next day (regardless of the time) already an age of 1 day.
The problem is, that I currently check, if the 'Age' is greater than the 'Max Age'.
As such if the 'Max Age' is set to 1, it would only expire the day after the next day.
As in the example:
2017-08-27 : Age=0
2017-08-28 : Age=1
2017-08-29 : Age=2 expired
I will change this check in the next version to expired = 'Age' >= 'Max Age'.
E.g. when a file is last modified on: 2017-08-27 14:55; it would have on the next day (regardless of the time) already an age of 1 day.
The problem is, that I currently check, if the 'Age' is greater than the 'Max Age'.
As such if the 'Max Age' is set to 1, it would only expire the day after the next day.
As in the example:
2017-08-27 : Age=0
2017-08-28 : Age=1
2017-08-29 : Age=2 expired
I will change this check in the next version to expired = 'Age' >= 'Max Age'.
Bernd - radio42
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
Re: Current day expire time for news
A v4.0.3.68-update is available addressing the above issue.
Bernd - radio42
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution