Screenly Forum

Default Asset Duration

I think the default asset duration / play for should be changed to Forever instead of 1 month since I literally just experienced this where I had not used some assets for more than a month and every time I pressed ON nothing would happen, and I was like what is going on… then I realized that the Play for was defaulted to one month and it had expired, but yet I wanted all these Assets to play until i manually deleted them.
Basically, I think defaulting to an expiring date is not the proper choice.

@ealmonte32 Yes, i think that is a sensible feature. Technically speaking, there is no such thing as “forever,” but making the end time to something like 10 years into the future should suffice i believe.

Yeah I meant that the option you currently have labeled “Forever” which sets the year to “9999” should suffice as the “Forever” setting.

1 Like

Hi @ealmonte32 & @vpetersson, did this change get implimented? I’ve just tested my first OSE on ras pi using Balena and so far so good! This option though for the default Play For to be Forever would be awesome.
Thanks, Mike

Hello @SonicGoldfish
The default asset duration is currently a month (not sure viktor wants to change this to Forever), but you can simply click the edit button and select “Forever”, this will change the ending year to 9999 thus being sort of “forever”.

If you want to make your assets have the default duration as “Forever” aka 9999 as the year, you would need to edit the file ./screenly/server.py
then, look for the following lines:

# parse date via python-dateutil and remove timezone info
    asset['start_date'] = date_parser.parse(get('start_date')).replace(tzinfo=None)
    asset['end_date'] = date_parser.parse(get('end_date')).replace(tzinfo=None, year=9999)

As you can see, yours will probably not have that “year=9999” at the end of tzinfo=None, so you would just need to change it like I did and save the file, then restart the services by running:
sudo systemctl restart screenly-*
that would make sure all screenly services are restarted which will reload the viewer with the new settings.

1 Like

@ealmonte32 thanks for all the information. I’ll definitely be making the change. It would be good to have this as an option to change under settings if possible, much the same as the default asset display time is.
Thanks again and keep up the excellent work!