Play on Time Script

Ready-to-use scripts, modules and plugins for Silverjuke.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
User avatar
bertkessels
Posts: 15
Joined: 6. Nov 05, 14:05
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Play on Time Script

Postby bertkessels » 30. Dec 07, 22:16

NEW - Version 2.0 now available for download!

Hi,

Here's a script for playing tracks on a certain date and time.
Up to four schedules can be defined and are stored in the ini file.
In each schedule you can specify:
- name of the schedule (name is shown for a few sec when playing starts)
- start date/time
- play it once or repeat it each hour, day or week
- stop playing yes/no after the track has played (switches autoplay off)
- the track/url to be played

Each schedules can be switched on or off.

Some examples:
- play "happy new year" at exactly 00:00 on dec 31th
- play "late again" daily at closing time 02:00 and then stop playing
- play "monday monday" weekly at monday 9:00

Hope you find it useful.
Please let me know your remarks or suggestions for improvements.

Cheers,
Bert

17 Jan 2010
Latest version added:
- bug: bug in auto-adjusting next play date/time fixed;
- new: play date and play time can now be entered separately;
- new: allows dates in the past for all schedules (gives warning for schedule Once);
14 feb 2010
- bug: fix in saving/loading config settings
29 Dec 2010 - Version 2.0
- Change: numbers of schedules is increased to 7 (was 4)
- Change: added "Wait until next song" option (No/Yes) to delay playing until current song has finished
- Change: added an entry "Play On Time Schedules..." in the configuration dialog ("Advanced Page".);
- BugFix: daylight saving time is now recognized and next playing time is adapted accordingly; only for daily and weekly repeating schedules.
Attachments
play_on_time_tool.sj
Install this script by placing it in the SJ directory.
SJ loads it at startup.
(9.98 KiB) Downloaded 625 times
PlayOnTime Dialog.jpg
PlayOnTime Dialog.jpg (20.46 KiB) Viewed 4871 times
play_on_time_tool.sj
Version 1.0 (february 2010) with bug fix for adjust next play date/time and new dialog.
(12.37 KiB) Downloaded 475 times
play_on_time_tool.sj
Version 2.0 (december 2010) fixes daylight saving time problems and adds new features ("Wait" option and max 7 schedules).
(12.37 KiB) Downloaded 310 times
Last edited by bertkessels on 28. Dec 10, 21:36, edited 4 times in total.

User avatar
bertkessels
Posts: 15
Joined: 6. Nov 05, 14:05
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Play on Time Script

Postby bertkessels » 5. Jan 08, 11:13

Here's a new version of the play_on_time_tool.sj with some small improvements:

- active schedules are indicated (*)
- reset of all schedules asks for confirmation
- warning "next play time is in the past" fixed

Note that the stop after this track option does not work properly with versions before 1.52 (which is the current beta version of Silverjuke).

Cheers,
Bert
Attachments
play_on_time_tool.sj
(10.38 KiB) Downloaded 544 times
play_on_time_tool.sj
Latest version (december 2008).
Fixes use of PlayOnTime in combination with autoPlay.
(12.07 KiB) Downloaded 418 times
Last edited by bertkessels on 5. Jan 09, 14:43, edited 1 time in total.

Guest
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Play on Time Script

Postby Guest » 29. Jan 08, 11:33

The script is great and *almost what I have been eagerly awaiting someone to create. Instead of just calling a certain song to play is there any method that it can be used to call up different play lists at different times of the day/days of the week?

When I saw this posting I immediately downloaded it and tried it out only to find that when I have it reference a playlist instead of an mp3 file it errors and says it cannot open the file.

This feature would be awesome for automating the music I play without needing employee interaction. Basically I need to switch between different types of music for day or evening or late evening and am currently doing it with various playlists set to heavy shuffle so that each day is different, but have to manually initialize the playlists at the different times of the day.

Thank you so much.

User avatar
ScAtMaN
Posts: 19
Joined: 30. Jan 08, 12:36
Location: Cambridge UK
Contact:

Re: Play on Time Script

Postby ScAtMaN » 7. Feb 08, 14:55

Just what I'm looking for too.

Does anyone have a solution to this?

mach
Posts: 4
Joined: 12. Nov 07, 16:58
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Play on Time Script

Postby mach » 23. Feb 08, 15:05

+1
I would contribute for it

User avatar
Werner
Posts: 610
Joined: 26. Dec 05, 12:39
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Play on Time Script

Postby Werner » 23. Feb 08, 17:08

Thank You, this work great .

:-D

User avatar
athlone
Posts: 13
Joined: 30. Dec 08, 16:44
Location: Stadt Schwentinental
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Play on Time Script

Postby athlone » 10. Mar 09, 14:05

I have a problem
the script will disable the auto-play function.

janosch1968
Posts: 9
Joined: 17. Mar 09, 21:28
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Play on Time Script

Postby janosch1968 » 31. Mar 09, 22:00

Hi,
the script is great.
is it maybe possible to improve the script by playing the sheduled song after the current played song and not at the time that was set in the event.
Example:
Song is playing - end of the song is maybe 11.03 AM
Event - Song play at 11.00 AM
So the event song waits till 11.03 to play.

Sorry about my bad english but i hope you understand what i mean

greetings
Heinz

enipoc
Posts: 4
Joined: 13. Nov 08, 19:44
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Play on Time Script

Postby enipoc » 10. Jun 09, 02:22



[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “Extensions”